6 Commits

Author SHA1 Message Date
c13603ebb9 remove hypr from home-manager config 2025-10-09 10:05:39 +02:00
493859058e grub config now included 2025-10-09 10:03:12 +02:00
24667d777e grub devices now 2025-10-09 10:01:09 +02:00
c2563b0521 need to remove watt 2025-10-09 09:57:11 +02:00
d3b2e18af9 not on 25.11 yet 2025-10-09 09:54:27 +02:00
a2ca62e0af little whoopsie 2025-10-09 09:49:10 +02:00
53 changed files with 1253 additions and 1229 deletions

1
.envrc
View File

@@ -1 +0,0 @@
use flake

4
.gitignore vendored
View File

@@ -1,4 +1,2 @@
# Result is a symlink to the built iso
result
# direnv binaries
.direnv
result

View File

@@ -1,12 +1,14 @@
# This example uses YAML anchors which allows reuse of multiple keys
# without having to repeat yourself.
# Also see https://github.com/Mic92/dotfiles/blob/d6114726d859df36ccaa32891c4963ae5717ef7f/nixos/.sops.yaml
# for a more complex example.
keys:
- &remy_usb age1027e2vu808mvf95m4f0am3aeg88n8vgzt56s04ndpkgm7awzeajspxl6tu
- &remy_yoga ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX4zsiXSSWbE75C0wyBVwaHOw6Gsbh/WqQsgEhvPwT8 remy@nyx
- &host_yoga age1ckqer7nxzq7q58v9xaqy8ac9vx2va69a46t86wp9m78pj5dpuy3sq8xeaj
- &remy_yoga age1t2stzdjfwrtekk23w43623fdvt9awdujth765f8l6mu9g6l4537q4gw8d0
# - &admin_bob age12zlz6lvcdk6eqaewfylg35w0syh58sm7gh53q5vvn7hd7c6nngyseftjxl
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *remy_usb
- *remy_yoga
- *host_yoga

View File

@@ -47,21 +47,6 @@ nix build .#nixosConfigurations.bcachefs-iso.config.system.build.isoImage
This will create an iso image in the result directory.
### Macos install
Initial install of nix using the determinate nix installer. Then a "full" bootstrap that installs all required packages such as `nh`, `git` etc.:
```
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#Remys-MacBook-Pro
```
> some modifications might be necessary (i.e. due to faulty git setup at that stage).
```
# could also try something like this:
nix-shell -p git nh
```
Finally, the desired state has been reached where `nh` is available:
```
nh darwin switch .
```
## Installation
TODO - disable root user
```

653
flake.lock generated

File diff suppressed because it is too large Load Diff

252
flake.nix
View File

@@ -1,57 +1,39 @@
{
description = "Nix config entry point";
# since secrets live in a submodule, enable submodules by default
inputs.self.submodules = true;
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Managing flatpak apps
nix-flatpak.url = "github:gmodena/nix-flatpak";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
# hyprland, plugins and related utils
hyprland.url = "github:hyprwm/Hyprland";
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix/release-25.05";
# zen browser
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
zen-browser.url = "github:0xc000022070/zen-browser-flake";
# IMPORTANT: we're using "libgbm" and is only available in unstable so ensure
# to have it up-to-date or simply don't specify the nixpkgs input
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
# power management
watt = {
url = "github:NotAShelf/watt/?ref=v0.3.2";
inputs.nixpkgs.follows = "nixpkgs";
};
# secrets
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
# quickshell
dankMaterialShell = {
url = "github:AvengeMedia/DankMaterialShell";
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
nix4vscode = {
url = "github:nix-community/nix4vscode";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
mac-app-util = {
# see https://github.com/hraban/mac-app-util/issues/39#issuecomment-3503946041
url = "github:hraban/mac-app-util";
inputs.cl-nix-lite.url = "github:r4v3n6101/cl-nix-lite/url-fix";
};
};
outputs = {
@@ -61,138 +43,102 @@
home-manager,
stylix,
sops-nix,
nix4vscode,
nix-darwin,
mac-app-util,
quickshell,
...
} @ inputs:
let
system = "x86_64-linux";
username = "remy";
name = "Rémy";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
lib = nixpkgs.lib;
systems = {
# HP Spectre x360 2018
Nixtre = {
hostModules = [
./hosts/spectre-x360-2018
];
userModules = [
./users/remy_spectre
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
extraModules = [
inputs.stylix.nixosModules.stylix
inputs.sops-nix.nixosModules.sops
];
};
# Portable usb stick
nichts = {
hostModules = [
./hosts/mobile-usb
];
userModules = [
./users/remy_usb
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
extraModules = [
inputs.stylix.nixosModules.stylix
inputs.sops-nix.nixosModules.sops
];
};
# Lenovo yoga 7 pro
nyx = {
hostModules = [
./hosts/yoga-7-pro
];
userModules = [
./users/remy_yoga
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
];
extraModules = [
inputs.stylix.nixosModules.stylix
inputs.sops-nix.nixosModules.sops
{ nixpkgs.overlays = [ inputs.nix4vscode.overlays.default ]; }
];
};
};
in
{
# For each entry in `systems` create a nixosConfiguration
nixosConfigurations = lib.mapAttrs (_name: cfg:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs pkgs-unstable; };
modules =
cfg.hostModules ++
cfg.extraModules ++
[ home-manager.nixosModules.home-manager {
# Common home-manager flags
home-manager = {
backupFileExtension = ".backup";
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs pkgs-unstable; };
};
# Merge in all the user fragments for this host
home-manager.users.remy = lib.mkMerge cfg.userModules;
}
]
;
}
) systems;
## NixOS configurations are the main output of this flake
# HP Spectre x360 2018
nixosConfigurations.Nixtre = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
darwinConfigurations."Remys-MacBook-Pro" = nix-darwin.lib.darwinSystem {
modules = [
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = ".backup";
home-manager.extraSpecialArgs = { inherit inputs pkgs-unstable; };
./hosts/spectre-x360-2018
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.remy.imports = [
./users/remy_macos
mac-app-util.homeManagerModules.default
];
}
mac-app-util.darwinModules.default
{ nixpkgs.overlays = [ inputs.nix4vscode.overlays.default ]; }
./hosts/macbook-pro
home-manager.users.remy.imports = [
./users/remy_spectre
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
}
];
};
# ## Useful nix build tools
# # iso builder TODO
# nixosConfigurations.bcachefs-iso = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [
# "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
# ({ lib, pkgs, ... }: {
# boot.supportedFilesystems = [ "bcachefs" ];
# boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
# })
# ];
# };
# devshell for this configuration
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
packages = [
pkgs.sops
nixosConfigurations.nichts = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/mobile-usb
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.remy.imports = [
./users/remy_usb
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
}
];
};
# tell sops where the public ssh key to "seed" the age key from is located
SOPS_AGE_SSH_PRIVATE_KEY_FILE = "/home/remy/.ssh/main_key";
nixosConfigurations.nyx = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/yoga-7-pro
sops-nix.nixosModules.sops
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.remy.imports = [
./users/remy_yoga
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
}
];
};
# nixosConfigurations.raspberry-pi = nixpkgs.lib.nixosSystem {
# system = "aarch64-linux";
# modules = [
# ./hosts/raspberry-pi/configuration.nix
# ];
# };
## Home Manager configurations here?
## Useful nix build tools
# iso builder TODO
nixosConfigurations.bcachefs-iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
({ lib, pkgs, ... }: {
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
})
];
};
};
}

View File

@@ -1,26 +0,0 @@
{ config, lib, pkgs, ... }:
{
users.users.remy = {
home = "/Users/remy";
};
system.primaryUser = "remy";
nix.enable=false;
nixpkgs.config.allowUnfree = true;
security.pam.services.sudo_local.touchIdAuth = true;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Enable alternative shell support in nix-darwin.
# programs.fish.enable = true;
# Set Git commit hash for darwin-version.
# system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
nixpkgs.hostPlatform = "aarch64-darwin";
}

View File

@@ -1,15 +0,0 @@
{
config = {
#nix-config = {
# networking.hostName = "nyx";
# userName = "remy";
#};
};
# Merge the configuration and hardware configuration
imports = [
./configuration.nix
../../modules/macos/tiling.nix
];
}

View File

@@ -13,6 +13,7 @@
imports = [
./configuration.nix
./hardware-configuration.nix
./usb_config.nix
# ../../modules/nixos/backup.nix
../../modules/nixos/bluetooth.nix
@@ -24,9 +25,10 @@
../../modules/nixos/ld.nix
../../modules/nixos/monitoring.nix
../../modules/nixos/networking.nix
../../modules/nixos/nh.nix
../../modules/nixos/pipewire.nix
../../modules/nixos/podman.nix
../../modules/nixos/power.nix
# ../../modules/nixos/power.nix
../../modules/nixos/stylix.nix
../../modules/nixos/user.nix

View File

@@ -11,6 +11,7 @@
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = [ ];
fileSystems."/" =

View File

@@ -8,7 +8,7 @@
boot.loader.grub.efiSupport = true;
# location at install time. Since the drive is a USB drive this is expcected to change on each device
boot.loader.grub.device = "/dev/sdb";
boot.loader.grub.devices = ["/dev/sdb"];
boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.systemd-boot.enable = false;

View File

@@ -5,21 +5,17 @@
{ config, lib, pkgs, ... }:
{
boot.loader = {
systemd-boot.enable = true;
timeout = 0;
efi.canTouchEfiVariables = true;
};
services.logind.settings.Login = {
# because it is so inconveniently located
HandlePowerKey = "ignore";
# handled by the dm instead
# HandleLidSwitch = "ignore"; # needs to be set because it is not passed to other events
HandleLidSwitchDocked = "ignore";
};
# cause it is so inconveniently located
services.logind.powerKey = "ignore";
services.logind.lidSwitch = "sleep";
services.logind.lidSwitchDocked = "ignore";
# requires too many shenanigans so I just install using --no-root-passwd
# users.users.root.hashedPassword = "!";

View File

@@ -22,10 +22,10 @@
../../modules/nixos/ld.nix
../../modules/nixos/monitoring.nix
../../modules/nixos/networking.nix
../../modules/nixos/nh.nix
../../modules/nixos/pipewire.nix
../../modules/nixos/podman.nix
../../modules/nixos/power.nix
../../modules/nixos/sops.nix
../../modules/nixos/stylix.nix
../../modules/nixos/user.nix

View File

@@ -19,16 +19,11 @@
];
# https://github.com/lwfinger/rtw89/issues/240
# boot.extraModprobeConfig = ''
# options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
# options rtw89_core disable_ps_mode=y
# '';
boot.extraModprobeConfig = ''
options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
options rtw89_core disable_ps_mode=y
'';
# ipu is apparently required to make the webcam available as a camera device
hardware.ipu6 = {
enable = true;
platform = "ipu6";
};
services.fwupd.enable = true;

View File

@@ -1,27 +1,12 @@
{pkgs, inputs, ...}:
{
imports = [
inputs.zen-browser.homeModules.beta
];
programs.zen-browser = {
programs.firefox = {
## Enable the Firefox web browser
enable = true;
## Global preferences
policies = {
BlockAboutConfig = true;
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
DisableAppUpdate = true;
DisableFeedbackCommands = true;
DisableTelemetry = true;
DisablePocket = true;
DontCheckDefaultBrowser = true;
OfferToSaveLogins = false;
DefaultDownloadDirectory = "\${home}/Downloads";
ExtensionSettings = with builtins;
let extension = shortId: uuid: {
name = uuid;
@@ -32,20 +17,128 @@
};
in listToAttrs [
(extension "ublock-origin" "uBlock0@raymondhill.net")
(extension "ghostery" "firefox@ghostery.com")
(extension "tabliss" "extension@tabliss.io")
(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}")
(extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
(extension "ghostery" "firefox@ghostery.com")
];
};
# ## Per-profile preferences
# profiles.default = {
# search = {
# force = true;
# default = "ddg";
# privateDefault = "ddg";
# order = ["ddg" "google"];
# };
# };
## Per-profile preferences
profiles.default = {
search = {
force = true;
default = "ddg";
privateDefault = "ddg";
order = ["ddg" "google"];
};
settings = {
"browser.startup.homepage" = "about:home";
# Disable irritating first-run stuff
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.feeds.showFirstRunUI" = false;
"browser.messaging-system.whatsNewPanel.enabled" = false;
"browser.rights.3.shown" = true;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"browser.startup.homepage_override.mstone" = "ignore";
"browser.uitour.enabled" = false;
"startup.homepage_override_url" = "";
"trailhead.firstrun.didSeeAboutWelcome" = true;
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.bookmarks.addedImportButton" = true;
# Disable "save password" prompt
"signon.rememberSignons" = false;
# Harden
"privacy.trackingprotection.enabled" = true;
"dom.security.https_only_mode" = true;
# Disable Pocket
"extensions.pocket.enabled" = false;
# Disable telemetry
"toolkit.telemetry.enabled" = false;
# Remove bookmarks toolbar
"browser.toolbars.bookmarks.visibility" = "never";
# Restore session on startup
"browser.startup.page" = 3;
# Automatically enable extensions
"extensions.autoDisableScopes" = 0;
};
};
};
home.packages = with pkgs; [
inputs.zen-browser.packages."${system}".default
# inputs.zen-browser.packages."${system}".default.override {
# policies = {
# DisableAppUpdate = true;
# DisableTelemetry = true;
# OfferToSaveLogins = false;
# AutofillAddressEnabled = true;
# AutofillCreditCardEnabled = false;
# # BlockAboutConfig = true;
# DefaultDownloadDirectory = "\${home}/Downloads";
# ExtensionSettings = with builtins;
# let extension = shortId: uuid: {
# name = uuid;
# value = {
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
# installation_mode = "normal_installed";
# };
# };
# in listToAttrs [
# (extension "ublock-origin" "uBlock0@raymondhill.net")
# (extension "ghostery" "firefox@ghostery.com")
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
# ];
# };
# }
];
# programs.zen-browser = {
# enable = true;
# policies = {
# DisableAppUpdate = true;
# DisableTelemetry = true;
# OfferToSaveLogins = false;
# AutofillAddressEnabled = true;
# AutofillCreditCardEnabled = false;
# # BlockAboutConfig = true;
# DefaultDownloadDirectory = "\${home}/Downloads";
# ExtensionSettings = with builtins;
# let extension = shortId: uuid: {
# name = uuid;
# value = {
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
# installation_mode = "normal_installed";
# };
# };
# in listToAttrs [
# (extension "ublock-origin" "uBlock0@raymondhill.net")
# (extension "ghostery" "firefox@ghostery.com")
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
# ];
# };
# };
}

View File

@@ -1,16 +1,25 @@
{pkgs, ...}:
let
baseExtensions = pkgs.nix4vscode.forVscode [
baseExtensions = with pkgs.vscode-extensions; [
# QOL
"mhutchie.git-graph"
"redhat.vscode-yaml"
mhutchie.git-graph
redhat.vscode-yaml
github.copilot
github.copilot-chat
# Nix environment selector
"arrterian.nix-env-selector"
# continue.continue
"github.copilot"
"github.copilot-chat"
arrterian.nix-env-selector
];
# baseExtensions = with pkgs; [
# (vscode-with-extensions.override {
# vscodeExtensions = with vscode-extensions; [
# bbenoist.nix
# ];
# })
# ];
baseSettings = {
# visual
"window.titleBarStyle" = "native";
@@ -92,29 +101,31 @@ in
{
programs.vscode = {
enable = true;
# install vscode in a FHS environment to allow extensions with prebuilt binaries
# package = pkgs.vscode.fhs;
profiles.default = {
userSettings = baseSettings // {
"window.newWindowProfile" = "development";
};
extensions = [];
};
profiles.development = {
extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [
extensions = baseExtensions ++ (with pkgs.vscode-extensions; [
# python
"ms-python.python"
"ms-python.isort"
"ms-python.debugpy"
"ms-python.vscode-pylance"
ms-python.python
ms-python.isort
ms-python.debugpy
ms-python.vscode-pylance
# nix language
"jnoortheen.nix-ide"
jnoortheen.nix-ide
# Flutter and co
"dart-code.flutter"
"dart-code.dart-code"
];
dart-code.flutter
dart-code.dart-code
]);
keybindings = baseKeybindings;
@@ -123,18 +134,29 @@ in
profiles.science = {
extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [
extensions = baseExtensions ++ (with pkgs.vscode-extensions; [
# python + jupyter
"ms-python.python"
"ms-python.isort"
"ms-python.debugpy"
"ms-python.vscode-pylance"
"ms-toolsai.vscode-jupyter-slideshow"
"ms-toolsai.jupyter"
"ms-toolsai.jupyter-hub"
"ms-toolsai.jupyter-renderers"
ms-python.python
ms-python.isort
ms-python.debugpy
ms-python.vscode-pylance
ms-toolsai.vscode-jupyter-slideshow
ms-toolsai.jupyter-renderers
# Typst
"myriad-dreamin.tinymist"
myriad-dreamin.tinymist
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "jupyter";
publisher = "ms-toolsai";
version = "2025.3.2025032101";
sha256 = "sha256-s2qEUl9J6EOije6MasZOnHErYs3NYXBqLSfMT03vEH0=";
}
{
name = "jupyter-hub";
publisher = "ms-toolsai";
version = "2024.10.1002831100";
sha256 = "sha256-5IRczwXbYkDdYEOXvQnnH+HJNLvsRsrZ6fnoVCveqrs=";
}
];
keybindings = baseKeybindings ++ [
@@ -174,17 +196,10 @@ in
"workbench.colorCustomizations" = {
"statusBar.background" = "#003f9293";
};
};
};
profiles.cloud = {
extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [
"Tim-Koehler.helm-intellisense"
"HashiCorp.terraform"
"signageos.signageos-vscode-sops"
];
keybindings = baseKeybindings;
userSettings = baseSettings;
};
};
}

View File

@@ -11,7 +11,7 @@
createDirectories = true;
documents = "${config.home.homeDirectory}/Documents";
download = "${config.home.homeDirectory}/Downloads";
pictures = "${config.home.homeDirectory}/Pictures";
pictures = "${config.home.homeDirectory}/Pictures";#
# do not create the following
desktop = null;
music = null;

View File

@@ -13,12 +13,18 @@
programs.fish = {
enable = true;
generateCompletions = true;
# enableCompletion = true;
plugins = [
{ name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; }
{ name = "z"; src = pkgs.fishPlugins.z.src; }
{ name = "pure"; src = pkgs.fishPlugins.pure.src; }
{
name = "fzf-fish";
src = pkgs.fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "v10.3";
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
}
# add others here
];
functions = {
@@ -41,5 +47,4 @@
fi
'';
};
}

View File

@@ -0,0 +1,47 @@
{pkgs, config, lib, ...}:
let
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
in
{
config = {
services.fusuma = {
enable = true;
settings = {
swipe = {
"3" = {
up = {
command = "exec ${hyprctl} dispatch fullscreen 1";
};
down = {
command = "exec ${lib.getExe config.nix-config.launcher}";
};
};
};
pinch = {
"4" = {
"in" = {
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
};
"out" = {
command = "exec ${hyprctl} dispatch togglespecialworkspace magic";
};
};
};
hold = {
"5" = {
command = "exec ${lib.getExe config.nix-config.launcher}";
threshold = 0.1;
};
};
threshold = {
pinch = 0.1;
};
};
};
};
}

View File

@@ -1,23 +1,9 @@
{
config,
lib,
...
}:
let
cfg = config.nix-config.hypr;
in
{
options = {
nix-config.hypr.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable an opinionated hyprland+quickshell setup as a desktop environment.";
};
};
imports = [
./hyprland
./hyprpaper.nix
./hyprlock.nix
./hypridle.nix
./waybar.nix
];
}

View File

@@ -9,6 +9,7 @@ in
default = [
"gnome-keyring-daemon --start --components=secrets"
"wl-paste --watch cliphist store"
"${lib.getExe pkgs.waybar}"
"${lib.getExe pkgs.hypridle}"
# TODO - currently broken
"${pkgs.owncloud-client}"

View File

@@ -2,7 +2,6 @@
imports = [
./autostart.nix
./general.nix
./gestures.nix
./keybinds.nix
./layouts.nix
./packages.nix

View File

@@ -19,8 +19,7 @@ in
};
config = {
wayland.windowManager.hyprland = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
settings = {
@@ -29,11 +28,10 @@ in
# };
general = {
resize_on_border = true;
gaps_in = 3;
gaps_out = 3;
gaps_in = 5;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgb(98971A) rgb(CC241D) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "master";
};
@@ -56,11 +54,16 @@ in
sensitivity = 0.5;
};
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 4;
workspace_swipe_touch = true;
};
decoration = {
rounding = 10;
rounding = 7;
# active_opacity = 0.95;
inactive_opacity = 0.9;
dim_inactive = false;
dim_strength = 0.1;
shadow = {
enabled = false;
@@ -91,16 +94,6 @@ in
"float, class:org.gnome.Nautilus"
# when there is a single window, deactivate border and gaps
# "border_size 0, onworkspace:w[tv1], "
# File pickers and dialogs
"float, title:^(Save As)$"
"float, title:^(Open File)$"
"size 50% 50%, title:^(Open File)$"
"center, title:^(Open File)$"
# Disable idle when gaming
"idleinhibit always, class:^(steam_app_)"
"idleinhibit always, class:^(gamescope)$"
];
};

View File

@@ -1,21 +0,0 @@
{inputs, pkgs, lib, config, ...}:
let
cfg = config.nix-config.hypr;
in
{
config = {
wayland.windowManager.hyprland = {
settings = {
gesture = [
# 4 finger swipe to switch workspace
"4, horizontal, workspace"
"3, up, fullscreen"
"3, down, float"
"4, vertical, scale: 0.5, special, magic"
];
};
};
};
}

View File

@@ -1,4 +1,3 @@
# Note that some keybindings are delegated to other components, e.g. the quickshell module
{inputs, pkgs, lib, config, ...}:
let
cfg = config.nix-config.hypr;
@@ -6,6 +5,8 @@ in
{
config = {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
settings = {
"$mod" = "SUPER";
@@ -16,11 +17,14 @@ in
"$mod, return, exec, kitty"
"$mod, b, exec, ${cfg.browser}"
"$mod, s, exec, ${cfg.ide}"
"$mod, e, exec, ${lib.getExe pkgs.nautilus}"
"$mod, e, exec, nautilus"
# Lock screen
"$mod, l, exec, loginctl lock-session"
# Clipboard management
"$mod, V, exec, cliphist list | ${lib.getExe config.nix-config.launcher} --dmenu | cliphist decode | wl-copy"
# Close window
"$mod, Q, killactive,"
# Force close window
@@ -50,10 +54,10 @@ in
"$mod+Ctrl, right, movetoworkspace, +1"
# Switch workspace
"$mod, left, workspace, e-1"
"$mod, right, workspace, e+1"
"$mod, mouse_down, workspace, e-1"
"$mod, mouse_up, workspace, e+1"
"$mod, left, workspace, -1"
"$mod, right, workspace, +1"
"$mod, mouse_down, workspace, -1"
"$mod, mouse_up, workspace, +1"
# move to scratch workspace
@@ -75,6 +79,9 @@ in
", XF86Cut, exec, hyprshot -m region -o ~/Pictures/Screenshots"
"Shift, XF86Cut, exec, hyprshot -m window -o ~/Pictures/Screenshots"
# Power menu
", XF86PowerOff, exec, ${lib.getExe config.nix-config.powerMenu}"
# Other pickers using the same launcher
"$mod+Ctrl, space, exec, ${lib.getExe config.nix-config.filePicker}"
"$mod, period, exec, ${lib.getExe config.nix-config.emojiPicker}"
@@ -82,11 +89,20 @@ in
# repeatable bindings
binde = [
# Fn keys
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Reshape the window in focus
"$mod, MINUS, resizeactive, -2% -2%"
"$mod, KP_Subtract, resizeactive, -2% -2%"
"$mod, PLUS, resizeactive, 2% 2%"
"$mod, KP_Add, resizeactive, 2% 2%"
];
# lock-screen bindings
@@ -119,17 +135,20 @@ in
"$mod, mouse:273, resizewindow"
];
};
# extraConfig = ''
# bind= , XF86AudioMicMute, submap, player_submap
extraConfig = ''
bind= , XF86AudioMicMute, submap, player_submap
submap=player_submap
bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
submap=reset
'';
# submap=player_submap
# bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
# bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
# bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
# submap=reset
# '';
};
};
}

View File

@@ -8,33 +8,35 @@ in
settings = {
master = {
# no_gaps_when_only = true;
# default: single app is centered/fullscreen; when more apps are added it splits
orientation = "right";
# keep center-master behaviour when there is exactly 1 slave (i.e. single app appears fullscreen)
slave_count_for_center_master = 1;
# only split in two columns
mfact = 0.6;
# TODO - I am not yet happy about the layout + toggle keybinds
orientation = "center";
# equivalent toalways_center_master = true;
slave_count_for_center_master = 0;
# new_is_master = false;
# allow_small_split = true;
# special_scale_factor = 0.80;
mfact = 0.34;
inherit_fullscreen = false;
# always_center_master = false;
# allow a maximum of 3 windows in the master area for 3-column layout
};
# #create special workspaces with no gaps
# workspace = [
# "w[t1], gapsout:0, gapsin:0"
# "w[tg1], gapsout:0, gapsin:0"
# "f[1], gapsout:0, gapsin:0"
# ];
#create special workspaces with no gaps
workspace = [
"w[t1], gapsout:0, gapsin:0"
"w[tg1], gapsout:0, gapsin:0"
"f[1], gapsout:0, gapsin:0"
];
# # automatically assign windows to workspaces when there is only one window
# windowrulev2 = [
# "bordersize 0, floating:0, onworkspace:w[t1]"
# "rounding 0, floating:0, onworkspace:w[t1]"
# "bordersize 0, floating:0, onworkspace:w[tg1]"
# "rounding 0, floating:0, onworkspace:w[tg1]"
# "bordersize 0, floating:0, onworkspace:f[1]"
# "rounding 0, floating:0, onworkspace:f[1]"
# ];
# automatically assign windows to workspaces when there is only one window
windowrulev2 = [
"bordersize 0, floating:0, onworkspace:w[t1]"
"rounding 0, floating:0, onworkspace:w[t1]"
"bordersize 0, floating:0, onworkspace:w[tg1]"
"rounding 0, floating:0, onworkspace:w[tg1]"
"bordersize 0, floating:0, onworkspace:f[1]"
"rounding 0, floating:0, onworkspace:f[1]"
];
misc = {
vfr = false;
@@ -43,14 +45,12 @@ in
# Keybind to toggle between 2 and 3 column master layout
bind = [
# Toggle master layout between 2 and 3 columns (press $mod + m)
"$mod, m, exec, hyprctl dispatch layoutmsg orientationcenter"
"$mod, m, exec, hyprctl dispatch layoutmsg mfact exact 0.34"
# Toggle master layout between 3 and 2 columns (press $mod + Shift + m)
"$mod, Shift+m, exec, hyprctl dispatch layoutmsg orientationright"
"$mod, Shift+m, exec, hyprctl dispatch layoutmsg mfact exact 0.6"
# Toggle master layout between 2 and 3 columns
"$mod, m, exec, hyprctl dispatch layoutmsg orientationleft"
"$mod, m, exec, hyprctl dispatch layoutmsg mfact exact 0.5"
# "SUPER_SHIFT,C,exec,hyprctl dispatch layoutmsg swap_master_count 2 3"
];
};
};
};

View File

@@ -9,6 +9,7 @@ in
pkgs.nautilus
pkgs.gnome-control-center
pkgs.gnome-bluetooth # needed by gnome-control-center to manage bluetooth
pkgs.brightnessctl
pkgs.cliphist
pkgs.wl-clipboard
pkgs.gcr # Provides org.gnome.keyring.SystemPrompter

View File

@@ -0,0 +1,66 @@
{
pkgs,
lib,
...
}:
let
wallpapers = [
../../../wallpapers/codioful-formerly-gradienta-lweK7Wme_jo-unsplash.jpg
../../../wallpapers/codioful-formerly-gradienta-n2XqPm7Bqhk-unsplash.jpg
../../../wallpapers/luke-chesser-eICUFSeirc0-unsplash.jpg
../../../wallpapers/luke-chesser-pJadQetzTkI-unsplash.jpg
../../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg
];
monitor = ""; # leave empty to set the wallpaper on all monitors
wallpaperPicker = pkgs.writeShellScriptBin "wallpaper-picker" ''
#!/usr/bin/env bash
# use an array of wallpapers to randomly select one
wallpapers=(${pkgs.lib.concatStringsSep " " (map (p: "${p}") wallpapers)})
# select a random wallpaper from the array
index=$((RANDOM % ${toString (builtins.length wallpapers)}))
wallpaper="''${wallpapers[index]}"
echo "Setting wallpaper to: $wallpaper"
hyprctl hyprpaper unload all
hyprctl hyprpaper reload "${monitor},$wallpaper"
'';
in {
home.packages = [wallpaperPicker];
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
};
};
# systemd.user = {
# services.wallpaperRandomizer = {
# Install = {WantedBy = ["graphical-session.target"];};
# Unit = {
# Description = "Set random desktop background using hyprpaper";
# After = ["graphical-session-pre.target"];
# PartOf = ["graphical-session.target"];
# };
# Service = {
# Type = "oneshot";
# ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
# IOSchedulingClass = "idle";
# };
# };
# timers.wallpaperRandomizer = {
# Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
# Timer = {OnUnitActiveSec = "6h";};
# Install = {WantedBy = ["timers.target"];};
# };
# };
}

View File

@@ -0,0 +1,331 @@
{inputs, pkgs, lib, config, ...}:
let
cfg = config.nix-config.style;
in
{
options.nix-config.waybar = {
burninPrevention = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable burn-in prevention for Waybar";
example = ''
burninPrevention = true;
'';
};
};
config = {
# required to autoload fonts from packages installed via Home Manager
fonts.fontconfig.enable = true;
# waybar requires font-awesome
home.packages = [
pkgs.pavucontrol
];
# enable waybar
programs.waybar.enable = true;
programs.waybar = {
settings = {
mainBar = {
layer = "top";
position = "top";
margin-top = 5;
# margin-bottom = 2;
# margin-left = 5;
# margin-right = 5;
# margin between the modules
spacing = 2;
modules-left = [
"hyprland/workspaces"
"hyprland/window"
];
modules-center = [
"clock"
"custom/notification"
];
modules-right = [
"tray"
"privacy"
"network"
"bluetooth"
"wireplumber"
"battery"
"backlight"
"idle_inhibitor"
];
# module specific settings
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
active = "";
default = "";
};
};
"hyprland/window"= {
"icon" = true;
"separate-outputs" = true;
"format" = "{}";
"rewrite" = {
"(.*) Mozilla Firefox" = "$1";
"(.*) Zen Browser" = "$1";
"(.*) - fish" = "> [$1]";
"(.*) - Visual Studio Code" = "$1";
};
};
"clock" = {
format = "{:%H:%M}";
interval = 1;
tooltip-format = "{calendar}";
# calendar = {
# format = "%Y-%m-%d\n󰃰 %A\n\n%H:%M";
# start-day = 1; # Monday
# first-weekday = 1; # Monday
# week-number = false;
# long-weekdays = true;
# hide-if-empty = false;
# };
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
tooltip = "true";
};
"bluetooth" = {
format-on = "󰂯";
format-off = "󰂲";
format-disabled = "󰂲";
format-connected-battery = "{device_battery_percentage}% 󰂯";
format-alt = "{device_alias} 󰂯";
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
tooltip-format-enumerate-connected = "{device_alias}\n{device_address}";
tooltip-format-enumerate-connected-battery = "{device_alias}\n{device_address}\n{device_battery_percentage}%";
on-click-right = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center bluetooth";
};
"battery" = {
interval = 60;
states = {
good = 80;
warning = 30;
critical = 10;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% 󰂄";
format-plugged = "{capacity}% 󰂄";
format-icons = [ "󰁻" "󰁼" "󰁾" "󰂀" "󰂂" "󰁹" ];
};
"backlight" = {
# format = "{percent}% {icon}";
format = "{icon}";
tooltip-format = "{percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
"wireplumber" = {
scroll-step = 1;
format = "{volume}% {icon}";# {format_source}";
format-bluetooth = "{volume}% {icon}";# {format_source}";
format-bluetooth-muted = " {icon}";# {format_source}";
format-muted = "";# {format_source}";
format-alt = "{format_source} {icon}";
# format-source = " {volume}%";
# format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
default = [
""
""
""
];
};
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
on-click-right = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center sound";
};
"memory" = {
interval = 5;
format = "󰍛 {}%";
max-length = 10;
};
"tray" = {
spacing = 5;
};
"custom/notification" = {
format = "{icon} {}";
format-icons = {
notification = "<span foreground='red'><sup></sup></span>";
none = "";
dnd-notification = "<span foreground='red'><sup></sup></span>";
dnd-none = "";
inhibited-notification = "<span foreground='red'><sup></sup></span>";
inhibited-none = "";
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
dnd-inhibited-none = "";
};
return-type = "json";
exec-if = "which swaync-client";
exec = "swaync-client -swb";
on-click = "swaync-client -t -sw";
on-click-right = "swaync-client -d -sw";
escape = true;
};
"network" = {
format = "󰤭";
format-ethernet = " {ipaddr}";
format-wifi = "{icon}";
format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ];
format-disconnected = "󰤭";
tooltip-format = " {ifname} via {gwaddr}";
tooltip-format-wifi = ''
󰤨 {essid}({signalStrength}%), {frequency} GHz (Interface: {ifname})
IP: {ipaddr} GW: {gwaddr}
<span color='#a6da95'>{bandwidthUpBits}</span> <span color='#ee99a0'>{bandwidthDownBits}</span> <span color='#c6a0f6'>󰹹{bandwidthTotalBits}</span>
'';
tooltip-format-ethernet = ''
{ifname} - {ipaddr}/{cidr}
<span color='#a6da95'>{bandwidthUpBits}</span> <span color='#ee99a0'>{bandwidthDownBits}</span> <span color='#c6a0f6'>󰹹{bandwidthTotalBits}</span>
'';
tooltip-format-disconnected = "Disconnected";
on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi";
};
"privacy" = {
icon-spacing = 4;
# icon-size" = 18;
transition-duration = 250;
modules = [
{
type = "screenshare";
tooltip = true;
# tooltip-icon-size = 24
}
{
type = "audio-out";
tooltip = true;
# tooltip-icon-size = 24
}
{
type = "audio-in";
tooltip = true;
# tooltip-icon-size = 24
}
];
};
};
};
style = ''
* {
font-family: "${cfg.monospaceFont}";
font-weight: bold;
font-size: ${builtins.toString (cfg.fontSizes.desktop + 5)}px;
}
window#waybar {
background-color: transparent;
}
.module {
background: rgba(0, 0, 0, 0.6);
color: white;
border-radius: 7px;
margin: 1px 3px;
padding: 1px 6px;
animation: bgFade 3600s infinite alternate, textColorFade 3600s infinite alternate;
}
box.module button:hover {
box-shadow: inset 0 -3px #ffffff;
}
/*.modules-left {
padding: 3px;
}
.modules-right {
padding: 3px;
}
.modules-center {
padding: 3px;
}*/
#workspaces button {
color: white;
background: none;
animation: textColorFade 3600s infinite alternate;
}
#battery.warning {
background:rgba(240, 165, 0, 0.6);
}
#battery.critical {
background:rgba(255, 0, 0, 0.6);
}
#battery.charging {
background-color:rgba(14, 173, 0, 0.6);
}
#privacy {
color: #ffffff;
background:rgba(240, 165, 0, 0.6);
border-radius: 7px;
margin: 1px 3px;
padding: 1px 6px;
}
@keyframes bgFade {
0% {
background-color: white;
}
100% {
background-color: black;
}
}
@keyframes textColorFade {
0% {
color: black;
}
/* 45% {
color: black;
} */
60% {
color: rgb(29, 38, 96);
}
/* 55% {
color: white;
} */
100% {
color: white;
}
}
'';
};
};
}

View File

@@ -1,25 +1,13 @@
{pkgs, ...}:
{
home.packages = [
pkgs.kubie
pkgs.kubectl
];
# Add the shell alias
programs.fish.shellAliases = {
k = "kubectl";
};
# set the kubectl autocompletions for fish
# the fish functions are generated by kubectl itself, we do this at compile time and write them a single time to avoid generating them at each shell start
# the command is kubectl completion fish
# which becomes
programs.fish.completions."kubectl" = builtins.readFile "${pkgs.runCommand "kubectl-completion" {} ''
${pkgs.kubectl}/bin/kubectl completion fish > $out
''}";
programs.kubeswitch = {
enable = true;
enableFishIntegration = true;
};
}

View File

@@ -1,21 +0,0 @@
{pkgs, ...}:
{
# on macos we don't set the default shell to fish
# instead we just tell the terminal to run fish as the first command
# this means that the first thing fish should do is to clear the screen
programs.fish = {
interactiveShellInit = "clear";
};
# stylix will be tricky as well, so we just install the fonts manually
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
nerd-fonts.fira-code
noto-fonts-color-emoji
] ++ [ # some more packages that are not available as flatpaks
pkgs.spotify
];
}

View File

@@ -0,0 +1,110 @@
{ config, pkgs, lib, ... }:
let
cfg = config.nix-config.style;
in
{
services.swaync = {
enable = true;
settings = {
control-center-margin-top = 13;
control-center-margin-bottom = 0;
control-center-margin-right = 14;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = true;
notification-icon-size = 48;
notification-body-image-height = 160;
notification-body-image-width = 200;
notification-window-width = 400;
timeout = 6;
timeout-low = 3;
timeout-critical = 0;
image-visibility = "when-available";
transition-time = 200;
hide-on-clear = false;
hide-on-action = true;
script-fail-notify = true;
widgets = [
"dnd"
"buttons-grid"
"mpris"
"volume"
"backlight"
"title"
"notifications"
];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;
button-text = "";
};
dnd = {
text = "Do Not Disturb";
};
label = {
max-lines = 1;
text = "Notification";
};
mpris = {
image-size = 50;
image-radius = 0;
};
volume = {
label = "";
};
backlight = {
label = "󰃠";
device = "amdgpu_bl2";
};
buttons-grid = {
actions = [
{
label = "";
command = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
type = "toggle";
}
{
label = "";
command = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
type = "toggle";
}
{
label = "󰤨";
command = "nm-connection-editor";
}
{
label = "󰂯";
command = "blueman-manager";
}
{
label = "󱡽";
command = "bash -c $HOME/.config/hypr/scripts/airplaneMode.sh";
type = "toggle";
}
{
label = "";
command = "shutdown now";
}
{
label = "";
command = "hyprlock";
}
{
label = "";
command = "~/.config/hypr/scripts/wlogout.sh";
}
];
};
};
};
style = ''
* {
font-family: "monospace";
}
'';
};
}

View File

@@ -1,59 +1,36 @@
{
config,
inputs,
lib,
pkgs,
builtins,
...
}:
let
cfg = config.nix-config.quickshell;
qs = inputs.quickshell.packages.x86_64-linux.default;
in
{
programs.dankMaterialShell.enable = true;
programs.dankMaterialShell = {
enableSystemd = true;
enableSystemMonitoring = false;
enableClipboard = true;
enableVPN = true;
enableBrightnessControl = true;
enableColorPicker = false;
enableDynamicTheming = true;
enableAudioWavelength = false;
enableCalendarEvents = false;
enableSystemSound = true;
# default = {
# settings = ''{}'';
# session = ''{}'';
# };
# plugins = {};
options.nix-config.quickshell.enable = lib.mkEnableOption {
name = "quickshell";
description = "Whether to enable quickshell.";
default = true;
};
wayland.windowManager.hyprland = {
settings = {
binde = [
# Brightness
", XF86MonBrightnessDown, exec, dms ipc call brightness decrement 5 \"\""
", XF86MonBrightnessUp, exec, dms ipc call brightness increment 5 \"\""
config = lib.mkIf cfg.enable {
home.packages = [
qs
pkgs.qt6.qtimageformats
pkgs.qt6.qt5compat
pkgs.qt6.qtmultimedia
pkgs.qt6.qtdeclarative
pkgs.qt6.qtsvg
pkgs.qt6.qtwayland
pkgs.qt6.qtbase
# Audio volume + playback
", XF86AudioMute, exec, dms ipc call audio mute"
", XF86AudioLowerVolume, exec, dms ipc call audio decrement 5"
", XF86AudioRaiseVolume, exec, dms ipc call audio increment 5"
];
"$mod, XF86AudioMute, exec, dms ipc call mpris playPause"
"$mod, XF86AudioLowerVolume, exec, dms ipc call mpris previous"
"$mod, XF86AudioRaiseVolume, exec, dms ipc call mpris next"
# also allow the dedicated media keys to control playback
", XF86AudioPlay, exec, dms ipc call mpris playPause"
", XF86AudioPrev, exec, dms ipc call mpris previous"
", XF86AudioNext, exec, dms ipc call mpris next"
];
bind = [
", XF86PowerOff, exec, dms ipc call powermenu toggle"
# used to be ", XF86PowerOff, exec, ${lib.getExe config.nix-config.powerMenu}"
"$mod, V, exec, dms ipc call clipboard toggle"
# used to be "$mod, V, exec, cliphist list | ${lib.getExe config.nix-config.launcher} --dmenu | cliphist decode | wl-copy"
];
};
# add the quickshell config (whole directory) to XDG_CONFIG_HOME
# home.file.".config/quickshell/config".source = ./config;
};
}

View File

@@ -90,7 +90,7 @@ in
};
emoji = {
package = pkgs.noto-fonts-color-emoji;
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};

View File

@@ -1,11 +0,0 @@
# Write an importable nix file that copies a folder from this repo into the store and creates a symlink to a predictible directory in my home file
{
lib, pkgs, ...
}:
{
# Copy the entire wallpapers directory into the Nix store and symlink it to ~/wallpapers
home.file."wallpapers" = {
source = ../../wallpapers;
target = "Pictures/wallpapers";
};
}

View File

@@ -1,11 +0,0 @@
{pkgs, ...}:
{
# Add aliases for the various environments in aws so that their contexts can be easily switched
programs.fish.shellAliases = {
cdev = "aws-vault exec dev --";
cstage = "aws-vault exec stage --";
cprod = "aws-vault exec prod --";
clogs = "aws-vault exec logs --";
cshared = "aws-vault exec shared --";
};
}

View File

@@ -1,7 +0,0 @@
{pkgs, ...}:
{
home.packages = [
pkgs.gnupg
pkgs.sops
];
}

View File

@@ -1,19 +0,0 @@
{
config,
lib,
...
}:
let
cfg = config.nix-config.hypr;
in
{
options = {
};
imports = [
./aliases.nix
./cryptography.nix
./git.nix
./kluster.nix
];
}

View File

@@ -1,14 +0,0 @@
{
config,
lib,
...
}:
{
programs.git = {
enable = true;
settings = {
user.name = "Remy Moll";
user.email = "remy.moll@artidis.com";
};
};
}

View File

@@ -1,14 +0,0 @@
{pkgs, ...}:
{
home.packages = [
pkgs.kubernetes-helm
pkgs.awscli2
pkgs.aws-vault
pkgs.k9s
# some parsers
pkgs.ripgrep
pkgs.jq
pkgs.yq
];
}

View File

@@ -1,79 +0,0 @@
{ config, pkgs, lib, ... }:
{
# Enable yabai service
# Caution: at the very least yabai requires Accessibility permissions to be granted
# https://github.com/koekeishiya/yabai/issues/2688
services.yabai = {
enable = true;
config = {
layout = "bsp";
focus_follows_mouse = "autoraise";
window_placement = "second_child";
window_topmost = "on";
window_shadow = "float";
# by default, set balanced split ratio and auto balance => three windows will be evenly spaced on an ultrawide monitor
split_ratio = "0.50";
auto_balance = "on";
mouse_modifier = "alt";
mouse_action1 = "move";#
mouse_action2 = "resize";
window_opacity = "on";
normal_window_opacity = 0.9;
top_padding = 0;
bottom_padding = 0;
left_padding = 0;
right_padding = 0;
window_gap = 10;
};
extraConfig = ''
# Example: rules for floating windows
yabai -m rule --add app="System Preferences" manage=off
'';
};
# # Enable skhd service
# services.skhd = {
# enable = true;
# package = pkgs.skhd;
# skhdConfig = ''
# # Focus windows with Command + Arrow keys
# cmd - left : yabai -m window --focus west
# cmd - right : yabai -m window --focus east
# cmd - up : yabai -m window --focus north
# cmd - down : yabai -m window --focus south
# # Swap windows with Command + Shift + Arrow keys
# cmd + shift - left : yabai -m window --swap west
# cmd + shift - right : yabai -m window --swap east
# cmd + shift - up : yabai -m window --swap north
# cmd + shift - down : yabai -m window --swap south
# # Move windows with Command + Control + Arrow keys
# cmd + ctrl - left : yabai -m window --warp west
# cmd + ctrl - right : yabai -m window --warp east
# cmd + ctrl - up : yabai -m window --warp north
# cmd + ctrl - down : yabai -m window --warp south
# # Resize windows with Command + Option + Arrow keys
# cmd + alt - left : yabai -m window --resize left:-50:0
# cmd + alt - right : yabai -m window --resize right:50:0
# cmd + alt - up : yabai -m window --resize top:0:-50
# cmd + alt - down : yabai -m window --resize bottom:0:50
# # Toggle window float with Command + F
# cmd - f : yabai -m window --toggle float
# # Toggle window fullscreen with Command + Enter
# cmd - return : yabai -m window --toggle zoom-fullscreen
# '';
# };
}

View File

@@ -12,20 +12,24 @@
};
config = lib.mkIf config.nix-config.gnome.enable {
services = {
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# displayManager.gdm.enable = true;
# desktopManager.gnome.enable = true;
gnome = {
core-apps.enable = false;
core-developer-tools.enable = false;
games.enable = false;
};
# gnome = {
# core-apps.enable = false;
# core-developer-tools.enable = false;
# games.enable = false;
# };
# Exclude some packages to keep the installation lean
environment.gnome.excludePackages = with pkgs; [
gnome-tour
gnome-user-docs
];
# # Exclude some packages to keep the installation lean
# environment.gnome.excludePackages = with pkgs; [
# gnome-tour
# gnome-user-docs
# ];
# };
xserver.enable = true;
xserver.displayManager.gdm.enable = true;
xserver.desktopManager.gnome.enable = true;
};
};
}

View File

@@ -22,7 +22,7 @@ in
defaultSession = "hyprland";
};
services.displayManager.gdm = {
services.xserver.displayManager.gdm = {
enable = true;
wayland = true;
};

View File

@@ -13,11 +13,6 @@ in
type = lib.types.str;
default = "nixos";
};
nix-config.networking.vpn = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
config = {
@@ -35,60 +30,6 @@ in
# enable = false;
# };
# # VPN setup
networking.networkmanager.ensureProfiles = {
environmentFiles = [ config.sops.secrets.vpnEnvironment.path ];
profiles.wg-home = {
connection = {
id = "wg-home";
type = "wireguard";
interface-name = "wgh";
autoconnect = false;
};
ipv4 = {
address = "10.0.0.2/32";
method = "manual";
};
wireguard = {
listen-port = 51820;
private-key = "$HOME_PRIVATE_KEY";
};
"wireguard-peer.y/TBD/c0GkrRtekDkCb8TUnYYil8bSRPIjPDY650pz8=" = {
endpoint = "$HOME_ENDPOINT";
allowed-ips = "192.168.1.0/16";
};
};
profiles.wg-fritzbox = {
connection = {
id = "wg-fritzbox";
type = "wireguard";
interface-name = "wgfb";
autoconnect = false;
};
ipv4 = {
address = "192.168.178.201/24";
dns = "192.168.178.1";
method = "manual";
};
wireguard = {
listen-port = 51820;
private-key = "$FRITZBOX_PRIVATE_KEY";
};
"wireguard-peer.Jf/seKAL7kWm2qX9gf5Ln8FiN7OlPQB3CyRovDIOEHw=" = {
endpoint = "$FRITZBOX_ENDPOINT";
allowed-ips = "192.168.178.0/24;fd73:ea00:5841::/64";
preshared-key = "$FRITZBOX_PRESHARED_KEY";
};
};
};
};
}

View File

@@ -22,42 +22,38 @@
config = {
# environment.systemPackages = [
# pkgs.power-profiles-daemon
# ];
services.power-profiles-daemon.enable = true;
# services.tlp = {
# enable = true;
# settings = {
# # # processor chooses frequencies itself but respects the limits set by the user
# # CPU_DRIVER_OPMODE_ON_AC = "guided";
# # CPU_DRIVER_OPMODE_ON_BAT = "guided";
# # processor chooses frequencies itself but respects the limits set by the user
# CPU_DRIVER_OPMODE_ON_AC = "guided";
# CPU_DRIVER_OPMODE_ON_BAT = "guided";
# # # governor dictates global behavior of the CPU
# # CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# # CPU_SCALING_GOVERNOR_ON_AC = "performance";
# # governor dictates global behavior of the CPU
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
# # # energy performance policy (EPP) sets the energy/performance balance
# # CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
# # CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# # energy performance policy (EPP) sets the energy/performance balance
# CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# # # clock speeds reported by `sudo tlp-stat`
# # # 623377 [kHz] and 5090910 [kHz]
# # clock speeds reported by `sudo tlp-stat`
# # 623377 [kHz] and 5090910 [kHz]
# # CPU_SCALING_MIN_FREQ_ON_AC = 623377;
# # CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
# # CPU_SCALING_MIN_FREQ_ON_BAT = 0;
# # # reduce max frequency on battery to save power
# # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
# # # Allow the CPU to boost
# # CPU_BOOST_ON_AC = 1;
# # CPU_BOOST_ON_BAT = 1;
# # Allow the CPU to boost
# CPU_BOOST_ON_AC = 1;
# CPU_BOOST_ON_BAT = 1;
# # RADEON_DPM_PERF_LEVEL_ON_AC = "high";
# # # WIFI_PWR_ON_BAT = "off";
# RADEON_DPM_PERF_LEVEL_ON_AC = "high";
# WIFI_PWR_ON_BAT = "off";
# # enable battery charge thresholds on the default battery
# STOP_CHARGE_THRESH_BAT0 = 1;
@@ -73,17 +69,17 @@
AllowSuspendThenHibernate=yes
'';
# services.watt = {
# enable = true;
# settings = {
# battery_charge_thresholds = [
# 40
# 80
# ];
# };
# };
services.watt = {
enable = true;
settings = {
battery_charge_thresholds = [
40
80
];
};
};
services.upower.enable = true;
# write the watt-config under /etc/watt.toml
services.irqbalance = {

View File

@@ -1,12 +0,0 @@
{
inputs,
...
}:
{
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.defaultSopsFile = ./../../secrets/vpn.env;
sops.secrets.vpnEnvironment = {
sopsFile = ./../../secrets/vpn.env;
format = "dotenv";
};
}

Submodule secrets updated: a51d89c420...2aef0ad374

View File

@@ -9,14 +9,11 @@
home.username = "remy";
home.homeDirectory = "/home/remy";
## Utils relevant to this user only
programs.git = {
enable = true;
settings = {
user.name = "Remy Moll";
user.email = "me@moll.re";
};
userName = "Remy Moll";
userEmail = "me@moll.re";
};
## XDG configuration
@@ -25,7 +22,6 @@
mimeApps = {
enable = true;
defaultApplications = {
# TODO
"inode/directory" = "org.gnome.Nautilus.desktop";
"application/zip" = "org.gnome.FileRoller.desktop";
"application/octet-stream" = "org.gnome.GHex.desktop";

View File

@@ -1,23 +0,0 @@
{ config, pkgs, lib, ... }:
with lib.hm.gvariant;
{
config = {
home.stateVersion = "24.05";
};
imports = [
../../modules/home-manager/browser.nix
../../modules/home-manager/code.nix
../../modules/home-manager/dev.nix
../../modules/home-manager/fish.nix
../../modules/home-manager/kubectl.nix
../../modules/home-manager/macos-fixes.nix
../../modules/home-manager/nh.nix
../../modules/home-manager/obsidian.nix
../../modules/home-manager/work
];
}

View File

@@ -3,12 +3,12 @@ with lib.hm.gvariant;
{
config = {
nix-config = {
hypr = {
internal-screen = {
resolution = "auto";
scale = "auto";
};
};
# hypr = {
# internal-screen = {
# resolution = "auto";
# scale = "auto";
# };
# };
};
};
@@ -21,18 +21,17 @@ with lib.hm.gvariant;
../../modules/home-manager/documents.nix
../../modules/home-manager/fish.nix
../../modules/home-manager/flatpaks.nix
../../modules/home-manager/hypr
# ../../modules/home-manager/hypr
../../modules/home-manager/keepassxc.nix
../../modules/home-manager/kitty.nix
../../modules/home-manager/kubectl.nix
../../modules/home-manager/obsidian.nix
../../modules/home-manager/owncloud-client.nix
../../modules/home-manager/nh.nix
../../modules/home-manager/ssh.nix
../../modules/home-manager/stylix.nix
../../modules/home-manager/thunderbird.nix
../../modules/home-manager/wofi.nix
../../modules/home-manager/xdg-portals.nix
# ../../modules/home-manager/xdg-portals.nix
];
}

View File

@@ -9,9 +9,9 @@ with lib.hm.gvariant;
scale = "1.6";
};
};
# quickshell = {
# enable = true;
# };
quickshell = {
enable = true;
};
};
};
@@ -25,12 +25,13 @@ with lib.hm.gvariant;
../../modules/home-manager/documents.nix
../../modules/home-manager/fish.nix
../../modules/home-manager/flatpaks.nix
../../modules/home-manager/fusuma.nix
../../modules/home-manager/hypr
../../modules/home-manager/keepassxc.nix
../../modules/home-manager/kitty.nix
../../modules/home-manager/kubectl.nix
../../modules/home-manager/launcher.nix
../../modules/home-manager/nh.nix
../../modules/home-manager/notifications.nix
../../modules/home-manager/obsidian.nix
../../modules/home-manager/owncloud-client.nix
../../modules/home-manager/quickshell
@@ -38,7 +39,7 @@ with lib.hm.gvariant;
../../modules/home-manager/stylix.nix
../../modules/home-manager/thunderbird.nix
../../modules/home-manager/uxplay.nix
../../modules/home-manager/wallpaper.nix
# ../../modules/home-manager/wofi.nix
../../modules/home-manager/xdg-portals.nix
];
}