From 689b27c243c596049b2d67ecc308d4e3928c5df2 Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:33:31 +0100 Subject: [PATCH 01/10] feat: adds basic `skhd` service for `azalea` --- modules/core/skhd.nix | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 modules/core/skhd.nix diff --git a/modules/core/skhd.nix b/modules/core/skhd.nix new file mode 100644 index 0000000..45bb59e --- /dev/null +++ b/modules/core/skhd.nix @@ -0,0 +1,87 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + services.skhd = { + enable = true; + skhdConfig = '' + shift + alt - 1: yabai -m window --space 1 + shift + alt - 2: yabai -m window --space 2 + shift + alt - 3: yabai -m window --space 3 + shift + alt - 4: yabai -m window --space 4 + shift + alt - 5: yabai -m window --space 5 + shift + alt - 6: yabai -m window --space 6 + shift + alt - 7: yabai -m window --space 7 + shift + alt - 8: yabai -m window --space 8 + shift + alt - 9: yabai -m window --space 9 + shift + alt - 0: yabai -m window --space 10 + + # focus window + alt - h : yabai -m window --focus west + alt - j : yabai -m window --focus south + alt - k : yabai -m window --focus north + alt - l : yabai -m window --focus east + + # move window + shift + alt - h : yabai -m window --warp west + shift + alt - j : yabai -m window --warp south + shift + alt - k : yabai -m window --warp north + shift + alt - l : yabai -m window --warp east + + + # Float / Unfloat window + alt - space : \ + yabai -m window --toggle float; \ + yabai -m window --toggle border + + # cmd - d : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end') + cmd - return: open -a Kitty -n + + + + + + # Linux-style word navigation and deletion + ctrl - backspace [ + @native_apps ~ # Terminal apps handle natively + * | alt - backspace # Other apps: delete word + ] + + ctrl - left [ + @native_apps ~ # Terminal apps handle natively + * | alt - left # Other apps: move word left + ] + + ctrl - right [ + @native_apps ~ # Terminal apps handle natively + * | alt - right # Other apps: move word right + ] + + # Home/End key behavior (with shift for selection) + home [ + @native_apps ~ # Terminal apps handle natively + * | cmd - left # Other apps: line start + ] + + shift - home [ + @native_apps ~ # Terminal apps handle natively + * | cmd + shift - left # Other apps: select to line start + ] + + # Ctrl+Home/End for document navigation + ctrl - home [ + @native_apps ~ # Terminal apps handle natively + * | cmd - up # Other apps: document start + ] + + ctrl - end [ + @native_apps ~ # Terminal apps handle natively + * | cmd - down # Other apps: document end + ] + + ''; + }; +} From 9e8f8959f659ee4961ccdd2c2be23747a569e4f6 Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:33:44 +0100 Subject: [PATCH 02/10] feat: `yabai` too --- modules/core/yabai.nix | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 modules/core/yabai.nix diff --git a/modules/core/yabai.nix b/modules/core/yabai.nix new file mode 100644 index 0000000..b3836ca --- /dev/null +++ b/modules/core/yabai.nix @@ -0,0 +1,82 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + services.yabai = { + enable = true; + enableScriptingAddition = true; + config = { + # external_bar = "all:0:0"; + layout = "bsp"; + auto_balance = "on"; + window_placement = "second_child"; + window_opacity = "off"; + window_border = "on"; + window_border_placement = "inset"; + window_border_width = 2; + window_border_radius = 3; + window_shadow = "float"; + active_window_opacity = "1.0"; + normal_window_opacity = "1.0"; + + mouse_modifier = "cmd"; + # set modifier + right-click drag to resize window (default: resize) + mouse_action2 = "resize"; + # set modifier + left-click drag to resize window (default: move) + mouse_action1 = "move"; + + mouse_follows_focus = "off"; + focus_follows_mouse = "autofocus"; + + # gaps + top_padding = 0; + bottom_padding = 0; + left_padding = 0; + right_padding = 0; + window_gap = 0; + }; + + extraConfig = '' + # osascript -e 'tell application id "tracesOf.Uebersicht" to refresh' + # rules + yabai -m rule --add app=".*" sub-layer=normal + yabai -m rule --add app="^System Settings$" manage=off + yabai -m rule --add app="^System Information$" manage=off + yabai -m rule --add app="^System Preferences$" manage=off + yabai -m rule --add title="Preferences$" manage=off + yabai -m rule --add title="Settings$" manage=off + yabai -m rule --add app="Finder$" manage=off + + # workspace management + yabai -m space 1 --label web + yabai -m space 2 --label terminal + yabai -m space 6 --label config + yabai -m space 7 --label notes + yabai -m space 8 --label chat + yabai -m space 9 --label music + yabai -m space 10 --label mail + + yabai -m rule --add app="Element" space=chat + yabai -m rule --add app="Signal" space=chat + yabai -m rule --add app="Spotify" space=music + + yabai -m rule --add app="Calendar" space=mail + yabai -m rule --add app="Mail" space=mail + + yabai -m rule --add app='About This Mac' manage=off + yabai -m rule --add app='System Information' manage=off + yabai -m rule --add app='System Preferences' manage=off + + yabai -m signal --add event=dock_did_restart \ + action="sudo yabai --load-sa" + sudo yabai --load-sa + + # yabai -m config external_bar all:40:0 + # exec ~/.config/borders/bordersrc & + ''; + }; + +} From 3a778d41040e428848db8e442ad1070ebd4abcdc Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:34:39 +0100 Subject: [PATCH 03/10] feat: adds `system` variable to each host, switch to stable home-manager too --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 69dea20..1824872 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { alejandra.url = "github:kamadorueda/alejandra/3.0.0"; - home-manager.url = "github:nix-community/home-manager"; + home-manager.url = "github:nix-community/home-manager/release-25.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; hyprland.url = "github:hyprwm/Hyprland"; hyprland.inputs.nixpkgs.follows = "nixpkgs"; @@ -63,6 +63,7 @@ ]; specialArgs = { host = "sakura"; + system = "aarch64-darwin"; inherit self inputs username; }; }; @@ -75,6 +76,7 @@ ]; specialArgs = { host = "sakura"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -85,6 +87,7 @@ ]; specialArgs = { host = "yoshino"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -95,6 +98,7 @@ ]; specialArgs = { host = "ichiyo"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -105,6 +109,7 @@ ]; specialArgs = { host = "violet"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -115,6 +120,7 @@ ]; specialArgs = { host = "dandelion"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -125,6 +131,7 @@ ]; specialArgs = { host = "lily"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -135,6 +142,7 @@ ]; specialArgs = { host = "zinnia"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -145,6 +153,7 @@ ]; specialArgs = { host = "posy"; + system = "aarch64-linux"; inherit self inputs username; }; }; @@ -155,6 +164,7 @@ ]; specialArgs = { host = "hazel"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -165,6 +175,7 @@ ]; specialArgs = { host = "daisy"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -175,6 +186,7 @@ ]; specialArgs = { host = "iris"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -185,6 +197,7 @@ ]; specialArgs = { host = "sunflower"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -195,6 +208,7 @@ ]; specialArgs = { host = "imilia"; + system = "x86_64-linux"; inherit self inputs username; }; }; @@ -205,6 +219,7 @@ ]; specialArgs = { host = "april"; + system = "x86_64-linux"; inherit self inputs username; }; }; From 41b52bf10146dbd979b1045719111ebf68af166b Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:34:51 +0100 Subject: [PATCH 04/10] flake: switch to stable `home-manager` --- flake.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 51d7eb9..04d5df6 100644 --- a/flake.lock +++ b/flake.lock @@ -340,15 +340,16 @@ ] }, "locked": { - "lastModified": 1769776025, - "narHash": "sha256-70a1kVC08AMTvPc7iqQsJbbD4Y1fukakMVudz4oY9SM=", + "lastModified": 1770260404, + "narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=", "owner": "nix-community", "repo": "home-manager", - "rev": "0fba737f8d5571d41467f3d99a878e11b8c0f0f0", + "rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-25.11", "repo": "home-manager", "type": "github" } From 436e095f1e9ee943ff2f9bd678c34f06ba46a43e Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:36:13 +0100 Subject: [PATCH 05/10] feat: move `antialias` setting to `fonts.nix` --- modules/home/fonts.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/fonts.nix b/modules/home/fonts.nix index 93abc8a..be7ed7b 100644 --- a/modules/home/fonts.nix +++ b/modules/home/fonts.nix @@ -1,5 +1,7 @@ { pkgs, ... }: { + fonts.fontconfig.antialias = false; + home.packages = with pkgs; [ scientifica # nerd-fonts._0xproto From db35ebd33fddababf95c320d961e04aa742bedb3 Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 22:38:16 +0100 Subject: [PATCH 06/10] feat: adds `default.azalea.nix` --- modules/home/default.azalea.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 modules/home/default.azalea.nix diff --git a/modules/home/default.azalea.nix b/modules/home/default.azalea.nix new file mode 100644 index 0000000..0bb0cc2 --- /dev/null +++ b/modules/home/default.azalea.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + imports = + [ (import ./git.nix) ] + ++ [ (import ./htop.nix) ] + ++ [ (import ./kitty.nix) ] + ++ [ (import ./nvim.nix) ] + ++ [ (import ./zathura.nix) ] + ++ [ (import ./packages.nix) ] + ++ [ (import ./scripts/scripts.nix) ] + ++ [ (import ./ssh.nix) ] + ++ [ (import ./zsh.nix) ] + ++ [ (import ./qutebrowser.nix) ] + ++ [ (import ./tmux.nix) ]; +} From b9a89bd0793cd6330e546c7de6c577edc123c0e1 Mon Sep 17 00:00:00 2001 From: ahwx Date: Mon, 9 Feb 2026 23:29:25 +0100 Subject: [PATCH 07/10] feat: reorganize packages --- modules/home/packages.nix | 50 ++++++++++----------------------------- roles/desktop.nix | 3 ++- roles/gui.nix | 15 ++++++++++++ roles/laptop.nix | 2 ++ roles/server.nix | 1 + 5 files changed, 32 insertions(+), 39 deletions(-) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index c039254..161c191 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -2,19 +2,6 @@ { home.packages = with pkgs; [ # Environment shit - tesseract - yubikey-touch-detector - wireguard-tools - openresolv - xdg-utils - killall - libnotify - openssl - pamixer - playerctl - wl-clipboard - cliphist - poweralertd ffmpeg zip unzip @@ -23,16 +10,12 @@ gcc gnumake python3 - nautilus qbittorrent # CLI shit imagemagick - foot - # termpdfpy # shit broke again smfh vimv pass - lm_sensors neofetch hyfetch glow @@ -54,29 +37,27 @@ yarn cargo rustc - # wikit - # reader nmap - # speedtest-go - powertop + speedtest-go android-tools sshpass net-tools nmap aerc + w3m - aspell - aspellDicts.de - aspellDicts.nl - aspellDicts.uk + # aspell + # aspellDicts.de + # aspellDicts.nl + # aspellDicts.uk # Hunspell dictionaries for spell checking - hunspell - hunspellDicts.de_DE # German - hunspellDicts.en_GB-ise # UK English with -ise spellings - hunspellDicts.en_US - hunspellDicts.nl_NL # Dutch - hunspellDicts.nl_nl # Dutch (alternative) + # hunspell + # hunspellDicts.de_DE # German + # hunspellDicts.en_GB-ise # UK English with -ise spellings + # hunspellDicts.en_US + # hunspellDicts.nl_NL # Dutch + # hunspellDicts.nl_nl # Dutch (alternative) # Install pip packages # python3 @@ -84,12 +65,5 @@ # (writeShellScriptBin "install-pip-packages" '' # This script does not run, yet. # pip install --user --break-system-packages # '') - - # Email/calendar/etc - # neomutt - w3m - # khard - # khal - # vdirsyncer ]; } diff --git a/roles/desktop.nix b/roles/desktop.nix index 23c75df..7ddfc59 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -22,6 +22,7 @@ in home.packages = with pkgs; [ # Home packages swaylock + lm_sensors ]; }; }; @@ -39,7 +40,7 @@ in hardware.openrgb = { enable = true; package = pkgs.openrgb-with-all-plugins; - motherboard = "amd"; + motherboard = "intel"; server = { port = 6742; # autoStart = true; diff --git a/roles/gui.nix b/roles/gui.nix index 43eebda..006e896 100644 --- a/roles/gui.nix +++ b/roles/gui.nix @@ -82,6 +82,21 @@ in mpv kdePackages.kdeconnect-kde libgnome-keyring + foot + nautilus + tesseract + yubikey-touch-detector + wireguard-tools + openresolv + xdg-utils + killall + libnotify + openssl + pamixer + playerctl + wl-clipboard + cliphist + poweralertd # Gaming lunar-client diff --git a/roles/laptop.nix b/roles/laptop.nix index f747485..b89c345 100644 --- a/roles/laptop.nix +++ b/roles/laptop.nix @@ -25,6 +25,8 @@ in home.packages = with pkgs; [ acpi brightnessctl + powertop + lm_sensors ]; }; }; diff --git a/roles/server.nix b/roles/server.nix index 5a81e7d..1133281 100644 --- a/roles/server.nix +++ b/roles/server.nix @@ -20,6 +20,7 @@ in kitty.terminfo foot.terminfo powertop + lm_sensors ]; services = { From 2c8e6f0b225985ee18b6f730d98c7db809d46754 Mon Sep 17 00:00:00 2001 From: ahwx Date: Tue, 10 Feb 2026 11:33:27 +0100 Subject: [PATCH 08/10] chore: comment out the linux navigation as that breaks `skhd` for now --- modules/core/skhd.nix | 69 ++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/modules/core/skhd.nix b/modules/core/skhd.nix index 45bb59e..c64a4f5 100644 --- a/modules/core/skhd.nix +++ b/modules/core/skhd.nix @@ -38,50 +38,45 @@ yabai -m window --toggle border # cmd - d : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "stack" else "bsp" end') - cmd - return: open -a Kitty -n + alt - return: open -a Kitty -n + # # Linux-style word navigation and deletion + # ctrl - backspace [ + # @native_apps ~ # Terminal apps handle natively + # * | alt - backspace # Other apps: delete word + # ] + # ctrl - left [ + # @native_apps ~ # Terminal apps handle natively + # * | alt - left # Other apps: move word left + # ] + # ctrl - right [ + # @native_apps ~ # Terminal apps handle natively + # * | alt - right # Other apps: move word right + # ] + # # Home/End key behavior (with shift for selection) + # home [ + # @native_apps ~ # Terminal apps handle natively + # * | cmd - left # Other apps: line start + # ] - # Linux-style word navigation and deletion - ctrl - backspace [ - @native_apps ~ # Terminal apps handle natively - * | alt - backspace # Other apps: delete word - ] + # shift - home [ + # @native_apps ~ # Terminal apps handle natively + # * | cmd + shift - left # Other apps: select to line start + # ] - ctrl - left [ - @native_apps ~ # Terminal apps handle natively - * | alt - left # Other apps: move word left - ] - - ctrl - right [ - @native_apps ~ # Terminal apps handle natively - * | alt - right # Other apps: move word right - ] - - # Home/End key behavior (with shift for selection) - home [ - @native_apps ~ # Terminal apps handle natively - * | cmd - left # Other apps: line start - ] - - shift - home [ - @native_apps ~ # Terminal apps handle natively - * | cmd + shift - left # Other apps: select to line start - ] - - # Ctrl+Home/End for document navigation - ctrl - home [ - @native_apps ~ # Terminal apps handle natively - * | cmd - up # Other apps: document start - ] - - ctrl - end [ - @native_apps ~ # Terminal apps handle natively - * | cmd - down # Other apps: document end - ] + # # Ctrl+Home/End for document navigation + # ctrl - home [ + # @native_apps ~ # Terminal apps handle natively + # * | cmd - up # Other apps: document start + # ] + # ctrl - end [ + # @native_apps ~ # Terminal apps handle natively + # * | cmd - down # Other apps: document end + # ] ''; }; } From 65b895488ab6b991193fc82b631d3546c6b3b8fc Mon Sep 17 00:00:00 2001 From: ahwx Date: Tue, 10 Feb 2026 11:33:56 +0100 Subject: [PATCH 09/10] fix: increase readability for kitty --- modules/home/kitty.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix index 39371d6..d74381d 100644 --- a/modules/home/kitty.nix +++ b/modules/home/kitty.nix @@ -7,12 +7,12 @@ font = { name = "GohuFont 14 Nerd Font Mono"; - size = 9; + size = 12; }; settings = { confirm_os_window_close = 0; - background_opacity = "0.50"; + background_opacity = "0.75"; window_padding_width = 10; scrollback_lines = 10000; enable_audio_bell = false; From 5e88ba467e7537a49567585b2c39ccc700e8cd96 Mon Sep 17 00:00:00 2001 From: ahwx Date: Tue, 10 Feb 2026 11:34:49 +0100 Subject: [PATCH 10/10] feat: update `azalea` system settings; install packages; import modules; etc --- hosts/azalea/default.nix | 102 ++++++++++++++++++++++++++++++--------- 1 file changed, 80 insertions(+), 22 deletions(-) diff --git a/hosts/azalea/default.nix b/hosts/azalea/default.nix index 5517758..2715f5b 100644 --- a/hosts/azalea/default.nix +++ b/hosts/azalea/default.nix @@ -1,35 +1,51 @@ -{ username, ... }: +{ + pkgs, + inputs, + self, + ... +}: { imports = [ - #./hardware-configuration.nix - #./../../modules/core + # ./../../modules/core/homebrew.nix + ./../../modules/core/user.nix + ./../../modules/core/skhd.nix + ./../../modules/core/yabai.nix #./../../modules/core/virtualization.nix #./../../modules/services/tailscale.nix #./../../modules/services/mpd.nix - #./../../modules/services/smart-monitoring.nix - #./../../modules/services/mullvad.nix - #./../../modules/home/steam.nix - #./../../modules/services/ollama.nix - #./../../modules/services/automount.nix ]; - environment.systemPackages = [ - pkgs.vim - ]; - - security.pam.enableSudoTouchIdAuth = true; - system.primaryUser = username; - + security.pam.services.sudo_local.touchIdAuth = true; nix.settings.experimental-features = "nix-command flakes"; - - system.configurationRevision = self.rev or self.dirtyRev or null; - - system.stateVersion = 6; - + # system.configurationRevision = self.rev or self.dirtyRev or null; + system = { + primaryUser = "liv"; + stateVersion = 6; + defaults = { + dock = { + autohide = true; + mru-spaces = false; + show-recents = false; + # showHidden = true; + }; + finder = { + AppleShowAllExtensions = true; + FXPreferredViewStyle = "clmv"; + }; + iCal."first day of week" = "Monday"; + screencapture.include-date = true; + screencapture.type = "png"; + spaces.spans-displays = true; + }; + }; nixpkgs.hostPlatform = "aarch64-darwin"; homebrew = { enable = true; + #taps = { + # "homebrew/homebrew-core" = inputs.homebrew-core; + # "homebrew/homebrew-cask" = inputs.homebrew-cask; + #}; onActivation = { autoUpdate = true; cleanup = "uninstall"; @@ -39,16 +55,58 @@ caskArgs = { no_quarantine = true; }; + brews = [ + "imagemagick" + "virt-manager" + ]; casks = [ + "qbittorrent" "libreoffice" "signal" - "handbrake" - "tailscale" "ungoogled-chromium" # "orca-slicer" "element" "raycast" "anki" + "kitty" + "spotify" + "nextcloud" + "handbrake-app" + "tailscale-app" + "ungoogled-chromium" + "karabiner-elements" + "bitwarden" + "gimp" + "betterdisplay" + "mullvad-vpn" + "maccy" + "spotmenu" + ]; + }; + + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + # imports = [ ../flake/modules/home/zsh.nix ]; + environment.systemPackages = [ + pkgs.vim + inputs.nixvim.packages.${pkgs.system}.default + pkgs.lazygit + pkgs.eza + pkgs.exiftool + pkgs.fzf + ]; + + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ + "jitsi-meet-1.0.8043" + "olm-3.2.16" + "libsoup-2.74.3" + ]; + overlays = [ + self.overlays.default + inputs.nur.overlay + inputs.nixocaine.overlays.default ]; }; }