From cd4e08cab33cee589750f2e4abdf14c4f880dfb1 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 18:20:24 +0100 Subject: [PATCH 01/81] Fix hyprland new module --- flake.nix | 1 + .../home-manager/desktop/hyprland/default.nix | 11 +++++++---- modules/home-manager/zion.nix | 16 ++++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 5333636..c36207f 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ }; neonix = { url = "github:rgroemmer/neonix"; + inputs.nixpkgs.follows = "nixpkgs"; }; krewfile = { url = "github:brumhard/krewfile"; diff --git a/modules/home-manager/desktop/hyprland/default.nix b/modules/home-manager/desktop/hyprland/default.nix index b5182b0..db1b12f 100644 --- a/modules/home-manager/desktop/hyprland/default.nix +++ b/modules/home-manager/desktop/hyprland/default.nix @@ -20,7 +20,7 @@ in options.roles.desktop.hyprland = { enable = mkEnableOption "Enable hyprland"; - package = mkOption { type = types.nullOr types.pkgs; }; + package = mkPackageOption pkgs "hyprland" {nullable = true;}; hyprlock = { enable = mkEnableOption "Enable hyprlock"; @@ -45,7 +45,7 @@ in inherit (cfg) package; systemd.enable = false; # Disable for uswm - portalPackage = pkgs.xdg-desktop-portal-wlr; + # portalPackage = pkgs.xdg-desktop-portal-wlr; inherit (windows) extraConfig; settings = { @@ -66,8 +66,11 @@ in }; monitor = [ - "DP-8,1920x1080@60.0,auto,auto" - "DP-9,1920x1080@60.0,auto,auto" + "DP-8,highres,auto,auto" + "DP-9,highres,auto,auto" + + "DP-2,highres,0x0,auto" + "DP-1,highres,auto,auto" ]; input = { diff --git a/modules/home-manager/zion.nix b/modules/home-manager/zion.nix index 7f33eae..5abbf13 100644 --- a/modules/home-manager/zion.nix +++ b/modules/home-manager/zion.nix @@ -1,4 +1,8 @@ -{lib, ...}: { +{ + lib, + pkgs, + ... +}: { imports = [ ./common @@ -9,10 +13,14 @@ roles = { workdevice = false; - desktop = { - hyprland = { + desktop.hyprland = { + enable = true; + package = pkgs.hyprland; + + hyprlock.enable = true; + hypridle = { enable = true; - hyprlock = true; + cmd = "hyprlock"; }; }; }; From f713bbf4176559169ec97d6b6d783ffbdaabf68c Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 19:20:21 +0100 Subject: [PATCH 02/81] Entzerrung hyprland module --- docs/style.md | 6 + .../desktop/hyprland/config/decoration.nix | 12 -- .../desktop/hyprland/config/programs.nix | 15 -- .../desktop/hyprland/config/windows.nix | 66 --------- .../desktop/hyprland/config/workspaces.nix | 44 ------ .../home-manager/desktop/hyprland/default.nix | 138 +++++------------- .../home-manager/desktop/hyprland/options.nix | 23 +++ .../desktop/hyprland/settings/autostart.nix | 17 +++ .../desktop/hyprland/settings/binds.nix | 23 +++ .../desktop/hyprland/settings/global.nix | 46 ++++++ .../desktop/hyprland/settings/monitor.nix | 19 +++ .../desktop/hyprland/settings/windows.nix | 74 ++++++++++ .../desktop/hyprland/settings/workspaces.nix | 52 +++++++ 13 files changed, 296 insertions(+), 239 deletions(-) delete mode 100644 modules/home-manager/desktop/hyprland/config/decoration.nix delete mode 100644 modules/home-manager/desktop/hyprland/config/programs.nix delete mode 100644 modules/home-manager/desktop/hyprland/config/windows.nix delete mode 100644 modules/home-manager/desktop/hyprland/config/workspaces.nix create mode 100644 modules/home-manager/desktop/hyprland/options.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/autostart.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/binds.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/global.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/monitor.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/windows.nix create mode 100644 modules/home-manager/desktop/hyprland/settings/workspaces.nix diff --git a/docs/style.md b/docs/style.md index bd04e39..52f1cc1 100644 --- a/docs/style.md +++ b/docs/style.md @@ -35,3 +35,9 @@ - Imports all `Home` configuration for this `host`. - Defines **host specific configuration** + +// TODO: Define structure +- `Module` design + - `option.nix` + - `default.nix` + - `imports = []` diff --git a/modules/home-manager/desktop/hyprland/config/decoration.nix b/modules/home-manager/desktop/hyprland/config/decoration.nix deleted file mode 100644 index 7640e07..0000000 --- a/modules/home-manager/desktop/hyprland/config/decoration.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - blur = { - enabled = true; - size = 3; - passes = 2; - ignore_opacity = true; - new_optimizations = true; - }; - rounding = 5; - active_opacity = 0.98; - inactive_opacity = 0.85; -} diff --git a/modules/home-manager/desktop/hyprland/config/programs.nix b/modules/home-manager/desktop/hyprland/config/programs.nix deleted file mode 100644 index 9224096..0000000 --- a/modules/home-manager/desktop/hyprland/config/programs.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - bind = [ - "SUPER,RETURN, exec, uwsm app -- alacritty" - "SUPER,E, exec, uwsm app -- fuzzel" - "SUPER,P, exec, wlogout" - "SUPER,Q, killactive" - - # Mumble - "SUPER,Z, exec, mumble rpc togglemute" - "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" - - # Notification center - "SUPER,N, exec, swaync-client -t" - ]; -} diff --git a/modules/home-manager/desktop/hyprland/config/windows.nix b/modules/home-manager/desktop/hyprland/config/windows.nix deleted file mode 100644 index 6a666d0..0000000 --- a/modules/home-manager/desktop/hyprland/config/windows.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - windowrule = [ - # Force floating - "float, class:steam" - "float, class:com.nextcloud.desktopclient.nextcloud" - - # Resize - "size 20% 50%, class:com.nextcloud.desktopclient.nextcloud" - "move 78% 4%, class:com.nextcloud.desktopclient.nextcloud" - "move 68% 4%, class:^(.*ZSTray.*)$" - "move 40% 40%, title:^(.*Mumble Server Connect.*)$" - ]; - - windowrulev2 = [ - "workspace 4, class:^(firefox_firefox)$" - "workspace 5, class:^(chromium-browser)$" - - "workspace special:aux silent, class:^(.*mumble.*)$" - "workspace special:aux silent, class:^(.*keepassxc.*)$" - ]; - - bind = [ - # Window actions - "SUPER,F, fullscreen, 1" - "SUPER+SHIFT,F, fullscreen" - - # Movement - "SUPER,H, movefocus, l" - "SUPER,J, movefocus, d" - "SUPER,K, movefocus, u" - "SUPER,L, movefocus, r" - - # Window movement - "SUPER+SHIFT,H, movewindow,l" - "SUPER+SHIFT,J, movewindow, d" - "SUPER+SHIFT,K, movewindow, u" - "SUPER+SHIFT,L, movewindow, r" - - # Layout toggle - "SUPER,T, togglesplit," - "SUPER,U, togglefloating," - ]; - - extraConfig = '' - # Resize mouse - bindm = SUPER, mouse:272, movewindow - bindm = SUPER, mouse:273, resizewindow - - # Resize mode - bind = SUPER, R, submap, resize - submap = resize - bind = , H, resizeactive, -60 0 - bind = , J, resizeactive, 0 60 - bind = , K, resizeactive, 0 -60 - bind = , L, resizeactive, 60 0 - - bind = SHIFT, H, resizeactive, -20 0 - bind = SHIFT, J, resizeactive, 0 20 - bind = SHIFT, K, resizeactive, 0 -20 - bind = SHIFT, L, resizeactive, 20 0 - - bind = , return, submap, reset - bind = , escape, submap, reset - submap = reset - ''; -} diff --git a/modules/home-manager/desktop/hyprland/config/workspaces.nix b/modules/home-manager/desktop/hyprland/config/workspaces.nix deleted file mode 100644 index cf70fe2..0000000 --- a/modules/home-manager/desktop/hyprland/config/workspaces.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - workspace = [ - # Special - "special:scratchy" - "special:aux" - - # Assignment work (upper usb-c slot) - "1,monitor:DP-8,default:true" - "2,monitor:DP-8" - "3,monitor:DP-8" - "4,monitor:DP-9,default:true" - "5,monitor:DP-9" - "6,monitor:DP-9" - - "1,monitor:DP-1" - ]; - - bind = [ - # Workspace selection - "SUPER,1, workspace, 1" - "SUPER,2, workspace, 2" - "SUPER,3, workspace, 3" - "SUPER,4, workspace, 4" - "SUPER,5, workspace, 5" - "SUPER,6, workspace, 6" - "SUPER,7, workspace, 7" - "SUPER,8, workspace, 8" - "SUPER,9, workspace, 9" - - # Workspace window movement - "ALT,1, movetoworkspace, 1" - "ALT,2, movetoworkspace, 2" - "ALT,3, movetoworkspace, 3" - "ALT,4, movetoworkspace, 4" - "ALT,5, movetoworkspace, 5" - "ALT,6, movetoworkspace, 6" - - # Special workpace handling - "SUPER,O, togglespecialworkspace, scratchy" - "SUPER,M, togglespecialworkspace, aux" - "SUPER SHIFT,O, movetoworkspace, special:scratchy" - "SUPER SHIFT,M, movetoworkspace, special:aux" - ]; -} diff --git a/modules/home-manager/desktop/hyprland/default.nix b/modules/home-manager/desktop/hyprland/default.nix index db1b12f..f44b33b 100644 --- a/modules/home-manager/desktop/hyprland/default.nix +++ b/modules/home-manager/desktop/hyprland/default.nix @@ -16,117 +16,51 @@ in ./addons/hyprpaper.nix ./addons/hyprlock.nix ./addons/hypridle.nix - ]; - - options.roles.desktop.hyprland = { - enable = mkEnableOption "Enable hyprland"; - package = mkPackageOption pkgs "hyprland" {nullable = true;}; - - hyprlock = { - enable = mkEnableOption "Enable hyprlock"; - }; - hypridle = { - enable = mkEnableOption "Enable hypridle"; - cmd = mkOpt types.str "Path to locking binary"; - }; - }; - - config = - let - windows = import ./config/windows.nix; - programs = import ./config/programs.nix; - workspaces = import ./config/workspaces.nix; - in - mkIf cfg.enable { - catppuccin.hyprland.enable = true; - - wayland.windowManager.hyprland = { - enable = true; - inherit (cfg) package; - systemd.enable = false; # Disable for uswm - - # portalPackage = pkgs.xdg-desktop-portal-wlr; - inherit (windows) extraConfig; - - settings = { - general = { - gaps_in = 8; - gaps_out = 10; - border_size = 3; - }; - - # Auto tile new windows - dwindle = { - preserve_split = "yes"; - special_scale_factor = 0.8; - }; - xwayland = { - force_zero_scaling = true; - }; + # Settings + ./settings/autostart.nix + ./settings/binds.nix + ./settings/global.nix + ./settings/monitor.nix + ./settings/windows.nix + ./settings/workspaces.nix - monitor = [ - "DP-8,highres,auto,auto" - "DP-9,highres,auto,auto" - - "DP-2,highres,0x0,auto" - "DP-1,highres,auto,auto" - ]; - - input = { - kb_layout = "eu"; - repeat_rate = 45; - repeat_delay = 150; - accel_profile = "flat"; - sensitivity = 1; # -1.0 - 1.0, 0 means no modification. - }; + # Module options + ./options.nix + ]; - decoration = import ./config/decoration.nix; + config = lib.mkIf cfg.enable { + catppuccin.hyprland.enable = true; - exec-once = [ - "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" - "[ workspace special:scratchy silent ] alacritty -t scratchy" - "sleep 5 && hyprctl dispatch closewindow class:ZSTray" - "sleep 5 && uwsm app -- mumble --tray" - ]; + wayland.windowManager.hyprland = { + enable = true; + inherit (cfg) package; - inherit (windows) windowrule windowrulev2; - inherit (workspaces) workspace; + systemd.enable = false; # Disable for uswm + }; - bind = windows.bind ++ programs.bind ++ workspaces.bind; + home.packages = with pkgs; [ + hyprland-qtutils + slurp + ]; - # source = [ - # "~/.config/hypr/monitors.conf" - # "~/.config/hypr/workspaces.conf" - # ]; + xdg.portal = { + enable = true; + config = { + common = { + default = ["hyprland" "gtk"]; }; }; - - home.packages = with pkgs; [ - hyprland-qtutils - slurp + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-hyprland ]; - - xdg.portal = { - enable = true; - config = { - common = { - default = [ - "hyprland" - "gtk" - ]; - }; - }; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-hyprland - ]; - }; - - # environment.d defines environment variables for the user session, beyond shell level. - # It is processed by `systemd --user`, basically after login. - xdg.configFile."environment.d/envvars.conf".text = '' - PATH="$HOME/.nix-profile/bin:$PATH" - ''; }; + + # environment.d defines environment variables for the user session, beyond shell level. + # It is processed by `systemd --user`, basically after login. + xdg.configFile."environment.d/envvars.conf".text = '' + PATH="$HOME/.nix-profile/bin:$PATH" + ''; + }; } diff --git a/modules/home-manager/desktop/hyprland/options.nix b/modules/home-manager/desktop/hyprland/options.nix new file mode 100644 index 0000000..d2dedb6 --- /dev/null +++ b/modules/home-manager/desktop/hyprland/options.nix @@ -0,0 +1,23 @@ +{ + pkgs, + lib, + ... +}: +with lib; { + options.roles.desktop.hyprland = { + enable = mkEnableOption "Enable hyprland"; + + package = mkPackageOption pkgs "hyprland" { + nullable = true; + }; + + hyprlock = { + enable = mkEnableOption "Enable hyprlock"; + }; + + hypridle = { + enable = mkEnableOption "Enable hypridle"; + cmd = mkOption {type = types.str;}; + }; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/autostart.nix b/modules/home-manager/desktop/hyprland/settings/autostart.nix new file mode 100644 index 0000000..334d610 --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/autostart.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + exec-once = [ + "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + "[ workspace special:scratchy silent ] alacritty -t scratchy" + "sleep 5 && hyprctl dispatch closewindow class:ZSTray" + "sleep 5 && uwsm app -- mumble --tray" + ]; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/binds.nix b/modules/home-manager/desktop/hyprland/settings/binds.nix new file mode 100644 index 0000000..a6a2428 --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/binds.nix @@ -0,0 +1,23 @@ +{ + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + bind = [ + "SUPER,RETURN, exec, uwsm app -- alacritty" + "SUPER,E, exec, uwsm app -- fuzzel" + "SUPER,P, exec, wlogout" + "SUPER,Q, killactive" + + # Mumble + "SUPER,Z, exec, mumble rpc togglemute" + "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" + + # Notification center + "SUPER,N, exec, swaync-client -t" + ]; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/global.nix b/modules/home-manager/desktop/hyprland/settings/global.nix new file mode 100644 index 0000000..4bdad1d --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/global.nix @@ -0,0 +1,46 @@ +{ + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + general = { + gaps_in = 8; + gaps_out = 10; + border_size = 3; + }; + + # Auto tile new windows + dwindle = { + preserve_split = "yes"; + special_scale_factor = 0.8; + }; + + input = { + kb_layout = "eu"; + repeat_rate = 45; + repeat_delay = 150; + accel_profile = "flat"; + sensitivity = 1; # -1.0 - 1.0, 0 means no modification. + }; + + xwayland = { + force_zero_scaling = true; + }; + + decoration = { + blur = { + enabled = true; + size = 3; + passes = 2; + ignore_opacity = true; + new_optimizations = true; + }; + rounding = 5; + active_opacity = 0.98; + inactive_opacity = 0.85; + }; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/monitor.nix b/modules/home-manager/desktop/hyprland/settings/monitor.nix new file mode 100644 index 0000000..44aade5 --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/monitor.nix @@ -0,0 +1,19 @@ +{ + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + wayland.windowManager.hyprland.settings = { + monitor = [ + "DP-8,highres,auto,auto" + "DP-9,highres,auto,auto" + + "DP-2,highres,0x0,auto" + "DP-1,highres,auto,auto" + ]; + }; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/windows.nix b/modules/home-manager/desktop/hyprland/settings/windows.nix new file mode 100644 index 0000000..de5192d --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/windows.nix @@ -0,0 +1,74 @@ +{ + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + windowrule = [ + # Force floating + "float, class:steam" + "float, class:com.nextcloud.desktopclient.nextcloud" + + # Resize + "size 20% 50%, class:com.nextcloud.desktopclient.nextcloud" + "move 78% 4%, class:com.nextcloud.desktopclient.nextcloud" + "move 68% 4%, class:^(.*ZSTray.*)$" + "move 40% 40%, title:^(.*Mumble Server Connect.*)$" + ]; + + windowrulev2 = [ + "workspace 4, class:^(firefox_firefox)$" + "workspace 5, class:^(chromium-browser)$" + + "workspace special:aux silent, class:^(.*mumble.*)$" + "workspace special:aux silent, class:^(.*keepassxc.*)$" + ]; + + bind = [ + # Window actions + "SUPER,F, fullscreen, 1" + "SUPER+SHIFT,F, fullscreen" + + # Movement + "SUPER,H, movefocus, l" + "SUPER,J, movefocus, d" + "SUPER,K, movefocus, u" + "SUPER,L, movefocus, r" + + # Window movement + "SUPER+SHIFT,H, movewindow,l" + "SUPER+SHIFT,J, movewindow, d" + "SUPER+SHIFT,K, movewindow, u" + "SUPER+SHIFT,L, movewindow, r" + + # Layout toggle + "SUPER,T, togglesplit," + "SUPER,U, togglefloating," + ]; + + extraConfig = '' + # Resize mouse + bindm = SUPER, mouse:272, movewindow + bindm = SUPER, mouse:273, resizewindow + + # Resize mode + bind = SUPER, R, submap, resize + submap = resize + bind = , H, resizeactive, -60 0 + bind = , J, resizeactive, 0 60 + bind = , K, resizeactive, 0 -60 + bind = , L, resizeactive, 60 0 + + bind = SHIFT, H, resizeactive, -20 0 + bind = SHIFT, J, resizeactive, 0 20 + bind = SHIFT, K, resizeactive, 0 -20 + bind = SHIFT, L, resizeactive, 20 0 + + bind = , return, submap, reset + bind = , escape, submap, reset + submap = reset + ''; + }; +} diff --git a/modules/home-manager/desktop/hyprland/settings/workspaces.nix b/modules/home-manager/desktop/hyprland/settings/workspaces.nix new file mode 100644 index 0000000..4cde305 --- /dev/null +++ b/modules/home-manager/desktop/hyprland/settings/workspaces.nix @@ -0,0 +1,52 @@ +{ + lib, + config, + ... +}: let + cfg = config.roles.desktop.hyprland; +in { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + workspace = [ + # Special + "special:scratchy" + "special:aux" + + # Assignment work (upper usb-c slot) + "1,monitor:DP-8,default:true" + "2,monitor:DP-8" + "3,monitor:DP-8" + "4,monitor:DP-9,default:true" + "5,monitor:DP-9" + "6,monitor:DP-9" + + "1,monitor:DP-1" + ]; + + bind = [ + # Workspace selection + "SUPER,1, workspace, 1" + "SUPER,2, workspace, 2" + "SUPER,3, workspace, 3" + "SUPER,4, workspace, 4" + "SUPER,5, workspace, 5" + "SUPER,6, workspace, 6" + "SUPER,7, workspace, 7" + "SUPER,8, workspace, 8" + "SUPER,9, workspace, 9" + + # Workspace window movement + "ALT,1, movetoworkspace, 1" + "ALT,2, movetoworkspace, 2" + "ALT,3, movetoworkspace, 3" + "ALT,4, movetoworkspace, 4" + "ALT,5, movetoworkspace, 5" + "ALT,6, movetoworkspace, 6" + + # Special workpace handling + "SUPER,O, togglespecialworkspace, scratchy" + "SUPER,M, togglespecialworkspace, aux" + "SUPER SHIFT,O, movetoworkspace, special:scratchy" + "SUPER SHIFT,M, movetoworkspace, special:aux" + ]; + }; +} From ab0d541cdc8a7963036223e5c3ee194b2b500661 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 20:05:12 +0100 Subject: [PATCH 03/81] Move home.nix to hosts --- flake.nix | 16 ++++++++++++++++ .../firefly.nix => hosts/firefly/home.nix | 5 +---- .../home-manager/zion.nix => hosts/zion/home.nix | 5 +---- modules/home-manager/default.nix | 8 ++++++++ 4 files changed, 26 insertions(+), 8 deletions(-) rename modules/home-manager/firefly.nix => hosts/firefly/home.nix (93%) rename modules/home-manager/zion.nix => hosts/zion/home.nix (91%) create mode 100644 modules/home-manager/default.nix diff --git a/flake.nix b/flake.nix index c36207f..3078131 100644 --- a/flake.nix +++ b/flake.nix @@ -113,4 +113,20 @@ }; }; }; + + homeConfigurations = { + # Main workstation + "rap@zion" = lib.homeManagerConfiguration { + modules = [./hosts/zion/home.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = {inherit inputs outputs;}; + }; + # Firefly workmachine + "rapsn@firefly" = lib.homeManagerConfiguration { + modules = [./hosts/firefly/home.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = {inherit self inputs outputs;}; + }; + }; + }; } diff --git a/modules/home-manager/firefly.nix b/hosts/firefly/home.nix similarity index 93% rename from modules/home-manager/firefly.nix rename to hosts/firefly/home.nix index f5c89fb..402b432 100644 --- a/modules/home-manager/firefly.nix +++ b/hosts/firefly/home.nix @@ -4,10 +4,7 @@ ... }: { imports = [ - ./common - - ./cli - ./desktop + ../../modules/home-manager ]; roles = { diff --git a/modules/home-manager/zion.nix b/hosts/zion/home.nix similarity index 91% rename from modules/home-manager/zion.nix rename to hosts/zion/home.nix index 5abbf13..4a1be8f 100644 --- a/modules/home-manager/zion.nix +++ b/hosts/zion/home.nix @@ -4,10 +4,7 @@ ... }: { imports = [ - ./common - - ./cli - ./desktop + ../../modules/home-manager ]; roles = { diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..3c00461 --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./common + + ./cli + ./desktop + ]; +} From aea21f8ed8c94ceeedaacce23d7d9b6dc2a614dc Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 20:36:08 +0100 Subject: [PATCH 04/81] Update nixos hosts / config --- README.md | 4 ++++ flake.nix | 29 ++++++++++++++--------------- hosts/kubex/default.nix | 5 ++++- hosts/nixberry/default.nix | 5 +++++ hosts/vinox/default.nix | 5 ++++- hosts/zion/default.nix | 3 ++- modules/nixos/system/boot.nix | 3 ++- 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 2e3c507..d572965 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ nh os build --hostname kubex . nix build .#nixosConfigurations.vinox.config.system.build.isoImage # NixOS remote switch +nh os switch --hostname kubex . -d always --target-host kubex +nh os switch --hostname nixberry . -d always --target-host + +# Or nixos-rebuild switch --flake .#kubex --target-host 192.168.55.10 --sudo # HomeManager rebuilds (hostname & username autodetection) diff --git a/flake.nix b/flake.nix index 3078131..442d351 100644 --- a/flake.nix +++ b/flake.nix @@ -96,21 +96,20 @@ specialArgs = { inherit inputs mylib; }; }; }; - - homeConfigurations = { - # Main workstation - "rap@zion" = homeManagerConfiguration { - modules = [ ./modules/home-manager/zion.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; - }; - - # Firefly workmachine - "rapsn@firefly" = homeManagerConfiguration { - modules = [ ./modules/home-manager/firefly.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; - }; + # K3S home-lab + kubex = lib.nixosSystem { + modules = [./hosts/kubex]; + specialArgs = {inherit inputs outputs;}; + }; + # Raspberry-pi 3 + nixberry = lib.nixosSystem { + modules = [./hosts/nixberry]; + specialArgs = {inherit inputs outputs;}; + }; + # ISO multi-tool + vinox = lib.nixosSystem { + modules = [./hosts/vinox]; + specialArgs = {inherit inputs outputs;}; }; }; diff --git a/hosts/kubex/default.nix b/hosts/kubex/default.nix index f575d4c..74fc196 100644 --- a/hosts/kubex/default.nix +++ b/hosts/kubex/default.nix @@ -13,7 +13,10 @@ # Host specific configuration hostConfiguration = { - boot.supportedFilesystems = ["zfs"]; + boot = { + enable = true; + supportedFilesystems = ["zfs"]; + }; user = { name = "kubex"; diff --git a/hosts/nixberry/default.nix b/hosts/nixberry/default.nix index 64a585b..e991b69 100644 --- a/hosts/nixberry/default.nix +++ b/hosts/nixberry/default.nix @@ -1,6 +1,7 @@ { pkgs, inputs, + lib, ... }: { imports = [ @@ -19,6 +20,8 @@ extraGroups = []; }; + boot.enable = false; + services = { tailscale = true; }; @@ -46,4 +49,6 @@ environment.systemPackages = with pkgs; [neovim]; nix.settings.trusted-users = ["@wheel"]; # need for remote build + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hosts/vinox/default.nix b/hosts/vinox/default.nix index 4864a26..c9f8326 100644 --- a/hosts/vinox/default.nix +++ b/hosts/vinox/default.nix @@ -14,7 +14,10 @@ # Host specific configuration hostConfiguration = { - boot.supportedFilesystems = ["ntfs"]; + boot = { + enable = true; + supportedFilesystems = ["ntfs"]; + }; user = { name = "root"; diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index 38e3470..f20b543 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -7,7 +7,8 @@ # Host specific configuration hostConfiguration = { boot = { - armSupport = false; + enable = true; + armSupport = true; supportedFilesystems = ["ntfs"]; }; diff --git a/modules/nixos/system/boot.nix b/modules/nixos/system/boot.nix index 8e38a0b..e859466 100644 --- a/modules/nixos/system/boot.nix +++ b/modules/nixos/system/boot.nix @@ -7,6 +7,7 @@ with lib; let cfg = config.hostConfiguration.boot; in { options.hostConfiguration.boot = { + enable = mkEnableOption "Enable install / config of bootloader"; armSupport = mkEnableOption "Enable arm cross-compiler support"; supportedFilesystems = mkOption { type = with types; listOf str; @@ -14,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { boot = { inherit (cfg) supportedFilesystems; binfmt.emulatedSystems = mkIf cfg.armSupport ["aarch64-linux"]; From 10e55e716a23888fe458a34449c5e0fb581ca130 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 22:22:49 +0100 Subject: [PATCH 05/81] Include mypkgs in pkgs --- overlays/default.nix | 17 +++++++++++------ packages/default.nix | 4 ++-- .../{gardenctl.nix => gardenctl/default.nix} | 0 .../default.nix} | 0 4 files changed, 13 insertions(+), 8 deletions(-) rename packages/{gardenctl.nix => gardenctl/default.nix} (100%) rename packages/{gardenlogin.nix => gardenlogin/default.nix} (100%) diff --git a/overlays/default.nix b/overlays/default.nix index 63bba95..aceabe6 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,7 +1,12 @@ -_: prev: { - python313Packages = prev.python313Packages.overrideScope (_: super: { - i3ipc = super.i3ipc.overridePythonAttrs (_: { - doCheck = false; - }); - }); +final: _: { + # Example overlay + # python313Packages = prev.python313Packages.overrideScope (_: super: { + # i3ipc = super.i3ipc.overridePythonAttrs (_: { + # doCheck = false; + # }); + # }); + + # Add my own packages also to pkgs + # Use final here, to provide the "final" dependencies to build my packages. + mypkgs = import ../packages {pkgs = final;}; } diff --git a/packages/default.nix b/packages/default.nix index 63b339f..f0a3d6d 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,4 +1,4 @@ {pkgs}: { - gardenctl = pkgs.callPackage ./gardenctl.nix {}; - gardenlogin = pkgs.callPackage ./gardenlogin.nix {}; + gardenctl = pkgs.callPackage ./gardenctl {}; + gardenlogin = pkgs.callPackage ./gardenlogin {}; } diff --git a/packages/gardenctl.nix b/packages/gardenctl/default.nix similarity index 100% rename from packages/gardenctl.nix rename to packages/gardenctl/default.nix diff --git a/packages/gardenlogin.nix b/packages/gardenlogin/default.nix similarity index 100% rename from packages/gardenlogin.nix rename to packages/gardenlogin/default.nix From ba511cf4be677ecf2a2ed2aaf4c1e8aab76ec4de Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 22:48:25 +0100 Subject: [PATCH 06/81] WIP: restructure - Need to import everything again - Look how to use vars --- hosts/firefly/home.nix | 9 ++ modules/home-manager/cli/default.nix | 10 +- .../programs/containers/k9s-workplugins.nix | 93 ------------- .../cli/programs/containers/k9s.nix | 30 ----- modules/home-manager/cli/programs/default.nix | 37 ------ modules/home-manager/cli/programs/nvim.nix | 3 - .../cli/{ => shells}/zsh/default.nix | 18 +-- .../cli/terminals/addons/default.nix | 10 -- .../home-manager/cli/terminals/addons/eza.nix | 3 - .../cli/terminals/addons/zoxide.nix | 3 - .../{alacritty.nix => alacritty/default.nix} | 0 .../cli/{terminals/addons => tools}/atuin.nix | 0 .../home-manager/cli/tools/core/default.nix | 52 ++++++++ .../home-manager/cli/tools/core/programs.nix | 18 +++ .../home-manager/cli/tools/custom/default.nix | 0 .../cli/tools/custom/shell-scripts.nix | 27 ++++ .../{zsh => tools/custom}/shellScripts.nix | 4 +- .../{terminals/addons => tools}/direnv.nix | 0 .../cli/{programs => tools}/git.nix | 0 .../containers => tools/k8s}/default.nix | 0 .../cli/tools/k8s/k9s-workplugins.nix | 0 modules/home-manager/cli/tools/k8s/k9s.nix | 123 ++++++++++++++++++ .../containers => tools/k8s}/krewfile.nix | 0 .../containers => tools/k8s}/kubecolor.nix | 0 .../cli/{programs/langs => tools/lang}/go.nix | 0 .../{programs/langs => tools/lang}/rust.nix | 0 .../cli/{programs => tools}/lazygit.nix | 0 .../cli/{terminals/addons => tools}/pet.nix | 0 .../cli/{zsh => tools}/starship.nix | 0 modules/home-manager/common/default.nix | 15 +-- .../{cli/terminals/addons => common}/font.nix | 0 .../common/{modules.nix => options.nix} | 0 modules/home-manager/default.nix | 13 +- .../{cli/programs => roles}/keyring.nix | 0 .../programs/containers => roles}/podman.nix | 0 .../{cli/programs => roles}/sops.nix | 0 modules/home-manager/roles/ssh.nix | 3 + 37 files changed, 255 insertions(+), 216 deletions(-) delete mode 100644 modules/home-manager/cli/programs/containers/k9s-workplugins.nix delete mode 100644 modules/home-manager/cli/programs/containers/k9s.nix delete mode 100644 modules/home-manager/cli/programs/default.nix delete mode 100644 modules/home-manager/cli/programs/nvim.nix rename modules/home-manager/cli/{ => shells}/zsh/default.nix (85%) delete mode 100644 modules/home-manager/cli/terminals/addons/default.nix delete mode 100644 modules/home-manager/cli/terminals/addons/eza.nix delete mode 100644 modules/home-manager/cli/terminals/addons/zoxide.nix rename modules/home-manager/cli/terminals/{alacritty.nix => alacritty/default.nix} (100%) rename modules/home-manager/cli/{terminals/addons => tools}/atuin.nix (100%) create mode 100644 modules/home-manager/cli/tools/core/default.nix create mode 100644 modules/home-manager/cli/tools/core/programs.nix create mode 100644 modules/home-manager/cli/tools/custom/default.nix create mode 100644 modules/home-manager/cli/tools/custom/shell-scripts.nix rename modules/home-manager/cli/{zsh => tools/custom}/shellScripts.nix (89%) rename modules/home-manager/cli/{terminals/addons => tools}/direnv.nix (100%) rename modules/home-manager/cli/{programs => tools}/git.nix (100%) rename modules/home-manager/cli/{programs/containers => tools/k8s}/default.nix (100%) create mode 100644 modules/home-manager/cli/tools/k8s/k9s-workplugins.nix create mode 100644 modules/home-manager/cli/tools/k8s/k9s.nix rename modules/home-manager/cli/{programs/containers => tools/k8s}/krewfile.nix (100%) rename modules/home-manager/cli/{programs/containers => tools/k8s}/kubecolor.nix (100%) rename modules/home-manager/cli/{programs/langs => tools/lang}/go.nix (100%) rename modules/home-manager/cli/{programs/langs => tools/lang}/rust.nix (100%) rename modules/home-manager/cli/{programs => tools}/lazygit.nix (100%) rename modules/home-manager/cli/{terminals/addons => tools}/pet.nix (100%) rename modules/home-manager/cli/{zsh => tools}/starship.nix (100%) rename modules/home-manager/{cli/terminals/addons => common}/font.nix (100%) rename modules/home-manager/common/{modules.nix => options.nix} (100%) rename modules/home-manager/{cli/programs => roles}/keyring.nix (100%) rename modules/home-manager/{cli/programs/containers => roles}/podman.nix (100%) rename modules/home-manager/{cli/programs => roles}/sops.nix (100%) create mode 100644 modules/home-manager/roles/ssh.nix diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 402b432..1afbcf1 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -1,6 +1,7 @@ { lib, config, + pkgs, ... }: { imports = [ @@ -22,6 +23,14 @@ }; }; + home.packages = with pkgs; let + in [ + mypkgs.gardenctl + mypkgs.gardenlogin + + brightnessctl + ]; + targets.genericLinux = { enable = true; gpu.enable = true; diff --git a/modules/home-manager/cli/default.nix b/modules/home-manager/cli/default.nix index 5be499f..0bae54d 100644 --- a/modules/home-manager/cli/default.nix +++ b/modules/home-manager/cli/default.nix @@ -1,11 +1,7 @@ { imports = [ - ./zsh - ./programs - ./packages - - # Terminals - ./terminals/alacritty.nix - ./terminals/addons + ./shells/zsh + ./terminals/alacritty + ./tools ]; } diff --git a/modules/home-manager/cli/programs/containers/k9s-workplugins.nix b/modules/home-manager/cli/programs/containers/k9s-workplugins.nix deleted file mode 100644 index c1e4930..0000000 --- a/modules/home-manager/cli/programs/containers/k9s-workplugins.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - reconcile = { - description = "Reconcile resource"; - shortCut = "r"; - scopes = [ - "shoots" - # all resources in extensions.gardener.cloud/v1alpha1 - "backupbuckets" - "backupentries" - "bastions" - "clusters" - "containerruntimes" - "controlplanes" - "dnsrecords" - "extensions" - "infrastructures" - "networks" - "operatingsystemconfigs" - "workers" - ]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=reconcile" - ]; - }; - - reconcile-seed = { - description = "Reconcile seed"; - shortCut = "r"; - scopes = ["managedseeds"]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=reconcile" - ]; - }; - - retry-shoot = { - description = "Retry shoot operation"; - shortCut = "t"; - scopes = ["shoots"]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=retry" - ]; - }; - - confirm-deletion = { - description = "Confirm deletion"; - shortCut = "o"; - scopes = [ - "projects" - "extensions" - "shoots" - "backupentries" - "etcds" - "infrastructure" - "controlplanes" - "machinedeployments" - "machinesets" - "machineclasses" - "namespaces" - "worker" - "dnsrecords" - "operatingsystemconfig" - ]; - command = "kubectl"; - background = false; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "confirmation.gardener.cloud/deletion=true" - ]; - }; -} diff --git a/modules/home-manager/cli/programs/containers/k9s.nix b/modules/home-manager/cli/programs/containers/k9s.nix deleted file mode 100644 index e6503c3..0000000 --- a/modules/home-manager/cli/programs/containers/k9s.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - lib, - config, - ... -}: let - defaultPlugins = { - edit-secret = { - description = "Edit Decoded Secret"; - shortCut = "Ctrl-X"; - scopes = ["secrets"]; - command = "kubectl"; - background = false; - args = [ - "modify-secret" - "-n" - "$NAMESPACE" - "$NAME" - ]; - }; - }; - workPlugins = import ./k9s-workplugins.nix; -in { - catppuccin.k9s.enable = true; - programs.k9s = { - enable = true; - plugins = - defaultPlugins - // lib.optionalAttrs config.roles.workdevice workPlugins; - }; -} diff --git a/modules/home-manager/cli/programs/default.nix b/modules/home-manager/cli/programs/default.nix deleted file mode 100644 index 6eb7aad..0000000 --- a/modules/home-manager/cli/programs/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -let - withTheme = { - bat.enable = true; - fzf.enable = true; - btop.enable = true; - yazi.enable = true; - }; -in { - imports = [ - # Langs - ./langs/go.nix - ./langs/rust.nix - - # Git tools - ./git.nix - ./lazygit.nix - - # Editor - ./nvim.nix - - # Security - ./sops.nix - ./keyring.nix - - # Container tools - ./containers - ]; - - catppuccin = withTheme; - programs = - { - eza.enable = true; - } - // withTheme; - - services.ssh-agent.enable = true; -} diff --git a/modules/home-manager/cli/programs/nvim.nix b/modules/home-manager/cli/programs/nvim.nix deleted file mode 100644 index 4b42fbf..0000000 --- a/modules/home-manager/cli/programs/nvim.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.neonix.enable = true; -} diff --git a/modules/home-manager/cli/zsh/default.nix b/modules/home-manager/cli/shells/zsh/default.nix similarity index 85% rename from modules/home-manager/cli/zsh/default.nix rename to modules/home-manager/cli/shells/zsh/default.nix index 3fb6043..94f94a8 100644 --- a/modules/home-manager/cli/zsh/default.nix +++ b/modules/home-manager/cli/shells/zsh/default.nix @@ -5,11 +5,6 @@ ... }: with lib; { - imports = [ - ./shellScripts.nix - ./starship.nix - ]; - home.packages = [pkgs.zsh-completions]; catppuccin.zsh-syntax-highlighting.enable = true; @@ -41,20 +36,15 @@ with lib; { share = true; }; - # TODO: readd this - # # Gardenctl - # [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) - # source <(gardenctl completion zsh) - # eval $(gardenctl kubectl-env zsh) initContent = mkMerge [ - (mkOrder 500 - '''') + (mkOrder 500 '''') (mkOrder 1000 '' [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) + source <(gardenctl completion zsh) + eval $(gardenctl kubectl-env zsh) '') - (mkOrder 1500 - '''') + (mkOrder 1500 '''') ]; shellAliases = { diff --git a/modules/home-manager/cli/terminals/addons/default.nix b/modules/home-manager/cli/terminals/addons/default.nix deleted file mode 100644 index f3979e0..0000000 --- a/modules/home-manager/cli/terminals/addons/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./eza.nix - ./pet.nix - ./atuin.nix - ./direnv.nix - ./zoxide.nix - ./font.nix - ]; -} diff --git a/modules/home-manager/cli/terminals/addons/eza.nix b/modules/home-manager/cli/terminals/addons/eza.nix deleted file mode 100644 index 69a4b68..0000000 --- a/modules/home-manager/cli/terminals/addons/eza.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.eza.enable = true; -} diff --git a/modules/home-manager/cli/terminals/addons/zoxide.nix b/modules/home-manager/cli/terminals/addons/zoxide.nix deleted file mode 100644 index c4b4530..0000000 --- a/modules/home-manager/cli/terminals/addons/zoxide.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.zoxide.enable = true; -} diff --git a/modules/home-manager/cli/terminals/alacritty.nix b/modules/home-manager/cli/terminals/alacritty/default.nix similarity index 100% rename from modules/home-manager/cli/terminals/alacritty.nix rename to modules/home-manager/cli/terminals/alacritty/default.nix diff --git a/modules/home-manager/cli/terminals/addons/atuin.nix b/modules/home-manager/cli/tools/atuin.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/atuin.nix rename to modules/home-manager/cli/tools/atuin.nix diff --git a/modules/home-manager/cli/tools/core/default.nix b/modules/home-manager/cli/tools/core/default.nix new file mode 100644 index 0000000..744a80a --- /dev/null +++ b/modules/home-manager/cli/tools/core/default.nix @@ -0,0 +1,52 @@ +{pkgs, ...}: let +in { + home.packages = with pkgs; [ + # Core utility + coreutils # cp, mv, etc. + dnsutils # dig, nslookup, etc. + gnumake + gnutar + gzip + unzip + gnused + gnugrep + killall + pciutils + parallel + + # Inspection + htop + + # Network tools + inetutils + curl + wget + + # Network inspection + termshark + nmap + netcat + tcpdump + + # Text processing + jq + yq-go + gawk + + # Find utils + fd + ripgrep + + # Copy tools + rclone + + # SSH / Security + openssh + libfido2 + keepassxc + sops + + # Clipboard + wl-clipboard + ]; +} diff --git a/modules/home-manager/cli/tools/core/programs.nix b/modules/home-manager/cli/tools/core/programs.nix new file mode 100644 index 0000000..96eae45 --- /dev/null +++ b/modules/home-manager/cli/tools/core/programs.nix @@ -0,0 +1,18 @@ +{ + catppuccin = { + bat.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + }; + programs = { + bat.enable = true; + fzf.enable = true; + btop.enable = true; + yazi.enable = true; + + zoxide.enable = true; + neonix.enable = true; + eza.enable = true; + }; +} diff --git a/modules/home-manager/cli/tools/custom/default.nix b/modules/home-manager/cli/tools/custom/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/home-manager/cli/tools/custom/shell-scripts.nix b/modules/home-manager/cli/tools/custom/shell-scripts.nix new file mode 100644 index 0000000..f4dd4bb --- /dev/null +++ b/modules/home-manager/cli/tools/custom/shell-scripts.nix @@ -0,0 +1,27 @@ +{pkgs, ...}: let + # nix helpers + nix-run = pkgs.writeShellScriptBin "nr" '' + #!/usr/bin/env bash + nix run $(printf 'nixpkgs#%s ' "$@") + ''; + + nix-shell = pkgs.writeShellScriptBin "ns" '' + #!/usr/bin/env bash + nix shell $(printf 'nixpkgs#%s ' "$@") + ''; + + # kubeconfig selector + selc = pkgs.writeShellScriptBin "selc" '' + #!/usr/bin/env bash + BASE_PATH=$HOME/.config/kubeconfig + YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') + KUBECONFIG=$(fzf <<<"$YAMLS") + export KUBECONFIG=$BASE_PATH/$KUBECONFIG + ''; +in { + home.packages = [ + nix-run + nix-shell + selc + ]; +} diff --git a/modules/home-manager/cli/zsh/shellScripts.nix b/modules/home-manager/cli/tools/custom/shellScripts.nix similarity index 89% rename from modules/home-manager/cli/zsh/shellScripts.nix rename to modules/home-manager/cli/tools/custom/shellScripts.nix index 8519bae..f4dd4bb 100644 --- a/modules/home-manager/cli/zsh/shellScripts.nix +++ b/modules/home-manager/cli/tools/custom/shellScripts.nix @@ -11,7 +11,7 @@ ''; # kubeconfig selector - select-kc = pkgs.writeShellScriptBin "select_kc" '' + selc = pkgs.writeShellScriptBin "selc" '' #!/usr/bin/env bash BASE_PATH=$HOME/.config/kubeconfig YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') @@ -22,6 +22,6 @@ in { home.packages = [ nix-run nix-shell - select-kc + selc ]; } diff --git a/modules/home-manager/cli/terminals/addons/direnv.nix b/modules/home-manager/cli/tools/direnv.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/direnv.nix rename to modules/home-manager/cli/tools/direnv.nix diff --git a/modules/home-manager/cli/programs/git.nix b/modules/home-manager/cli/tools/git.nix similarity index 100% rename from modules/home-manager/cli/programs/git.nix rename to modules/home-manager/cli/tools/git.nix diff --git a/modules/home-manager/cli/programs/containers/default.nix b/modules/home-manager/cli/tools/k8s/default.nix similarity index 100% rename from modules/home-manager/cli/programs/containers/default.nix rename to modules/home-manager/cli/tools/k8s/default.nix diff --git a/modules/home-manager/cli/tools/k8s/k9s-workplugins.nix b/modules/home-manager/cli/tools/k8s/k9s-workplugins.nix new file mode 100644 index 0000000..e69de29 diff --git a/modules/home-manager/cli/tools/k8s/k9s.nix b/modules/home-manager/cli/tools/k8s/k9s.nix new file mode 100644 index 0000000..bc39590 --- /dev/null +++ b/modules/home-manager/cli/tools/k8s/k9s.nix @@ -0,0 +1,123 @@ +{ + lib, + config, + ... +}: let + defaultPlugins = { + edit-secret = { + description = "Edit Decoded Secret"; + shortCut = "Ctrl-X"; + scopes = ["secrets"]; + command = "kubectl"; + background = false; + args = [ + "modify-secret" + "-n" + "$NAMESPACE" + "$NAME" + ]; + }; + }; + workPlugins = { + reconcile = { + description = "Reconcile resource"; + shortCut = "r"; + scopes = [ + "shoots" + # all resources in extensions.gardener.cloud/v1alpha1 + "backupbuckets" + "backupentries" + "bastions" + "clusters" + "containerruntimes" + "controlplanes" + "dnsrecords" + "extensions" + "infrastructures" + "networks" + "operatingsystemconfigs" + "workers" + ]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=reconcile" + ]; + }; + + reconcile-seed = { + description = "Reconcile seed"; + shortCut = "r"; + scopes = ["managedseeds"]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=reconcile" + ]; + }; + + retry-shoot = { + description = "Retry shoot operation"; + shortCut = "t"; + scopes = ["shoots"]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=retry" + ]; + }; + + confirm-deletion = { + description = "Confirm deletion"; + shortCut = "o"; + scopes = [ + "projects" + "extensions" + "shoots" + "backupentries" + "etcds" + "infrastructure" + "controlplanes" + "machinedeployments" + "machinesets" + "machineclasses" + "namespaces" + "worker" + "dnsrecords" + "operatingsystemconfig" + ]; + command = "kubectl"; + background = false; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "confirmation.gardener.cloud/deletion=true" + ]; + }; + }; +in { + catppuccin.k9s.enable = true; + + programs.k9s = { + enable = true; + plugins = + defaultPlugins + // lib.optionalAttrs config.roles.workdevice workPlugins; + }; +} diff --git a/modules/home-manager/cli/programs/containers/krewfile.nix b/modules/home-manager/cli/tools/k8s/krewfile.nix similarity index 100% rename from modules/home-manager/cli/programs/containers/krewfile.nix rename to modules/home-manager/cli/tools/k8s/krewfile.nix diff --git a/modules/home-manager/cli/programs/containers/kubecolor.nix b/modules/home-manager/cli/tools/k8s/kubecolor.nix similarity index 100% rename from modules/home-manager/cli/programs/containers/kubecolor.nix rename to modules/home-manager/cli/tools/k8s/kubecolor.nix diff --git a/modules/home-manager/cli/programs/langs/go.nix b/modules/home-manager/cli/tools/lang/go.nix similarity index 100% rename from modules/home-manager/cli/programs/langs/go.nix rename to modules/home-manager/cli/tools/lang/go.nix diff --git a/modules/home-manager/cli/programs/langs/rust.nix b/modules/home-manager/cli/tools/lang/rust.nix similarity index 100% rename from modules/home-manager/cli/programs/langs/rust.nix rename to modules/home-manager/cli/tools/lang/rust.nix diff --git a/modules/home-manager/cli/programs/lazygit.nix b/modules/home-manager/cli/tools/lazygit.nix similarity index 100% rename from modules/home-manager/cli/programs/lazygit.nix rename to modules/home-manager/cli/tools/lazygit.nix diff --git a/modules/home-manager/cli/terminals/addons/pet.nix b/modules/home-manager/cli/tools/pet.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/pet.nix rename to modules/home-manager/cli/tools/pet.nix diff --git a/modules/home-manager/cli/zsh/starship.nix b/modules/home-manager/cli/tools/starship.nix similarity index 100% rename from modules/home-manager/cli/zsh/starship.nix rename to modules/home-manager/cli/tools/starship.nix diff --git a/modules/home-manager/common/default.nix b/modules/home-manager/common/default.nix index 6bc02d1..db843be 100644 --- a/modules/home-manager/common/default.nix +++ b/modules/home-manager/common/default.nix @@ -1,30 +1,21 @@ { - inputs, lib, config, ... }: { imports = [ - # module inputs - inputs.catppuccin.homeModules.catppuccin - inputs.neonix.homeManagerModules.neonix - inputs.krewfile.homeManagerModules.krewfile - inputs.sops-nix.homeManagerModules.sops - - # custom module config definition - ./modules.nix - # global nix & nixpkgs settings - ../../nix.nix + ./options.nix ]; + programs.home-manager.enable = true; + sops.secrets.ssh_config = { sopsFile = ./secrets.yaml; path = "${config.home.homeDirectory}/.ssh/config"; mode = "600"; }; - programs.home-manager.enable = true; xdg.enable = true; news = { diff --git a/modules/home-manager/cli/terminals/addons/font.nix b/modules/home-manager/common/font.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/font.nix rename to modules/home-manager/common/font.nix diff --git a/modules/home-manager/common/modules.nix b/modules/home-manager/common/options.nix similarity index 100% rename from modules/home-manager/common/modules.nix rename to modules/home-manager/common/options.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 3c00461..38b94fd 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,8 +1,17 @@ -{ +{inputs, ...}: { imports = [ - ./common + # external modules + inputs.catppuccin.homeModules.catppuccin + inputs.neonix.homeManagerModules.neonix + inputs.krewfile.homeManagerModules.krewfile + inputs.sops-nix.homeManagerModules.sops + # internal modules + ./common ./cli ./desktop + + # nix settings + ../nix.nix ]; } diff --git a/modules/home-manager/cli/programs/keyring.nix b/modules/home-manager/roles/keyring.nix similarity index 100% rename from modules/home-manager/cli/programs/keyring.nix rename to modules/home-manager/roles/keyring.nix diff --git a/modules/home-manager/cli/programs/containers/podman.nix b/modules/home-manager/roles/podman.nix similarity index 100% rename from modules/home-manager/cli/programs/containers/podman.nix rename to modules/home-manager/roles/podman.nix diff --git a/modules/home-manager/cli/programs/sops.nix b/modules/home-manager/roles/sops.nix similarity index 100% rename from modules/home-manager/cli/programs/sops.nix rename to modules/home-manager/roles/sops.nix diff --git a/modules/home-manager/roles/ssh.nix b/modules/home-manager/roles/ssh.nix new file mode 100644 index 0000000..2d8cb2b --- /dev/null +++ b/modules/home-manager/roles/ssh.nix @@ -0,0 +1,3 @@ +{ + services.ssh-agent.enable = true; +} From 5f4d899fd78d0405d25906d80381a0117dbe26f8 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 14 Dec 2025 22:52:42 +0100 Subject: [PATCH 07/81] WIP: more removals --- .../cli/terminals/alacritty/default.nix | 7 +++++++ .../cli/terminals/alacritty/font.nix | 2 ++ modules/home-manager/common/default.nix | 16 ---------------- modules/home-manager/common/font.nix | 7 ------- modules/home-manager/common/options.nix | 7 ------- modules/home-manager/roles/common/default.nix | 10 ++++++++++ .../home-manager/roles/{ => common}/keyring.nix | 0 modules/home-manager/roles/{ => common}/sops.nix | 0 modules/home-manager/roles/ssh.nix | 8 +++++++- modules/home-manager/{common => }/secrets.yaml | 0 10 files changed, 26 insertions(+), 31 deletions(-) create mode 100644 modules/home-manager/cli/terminals/alacritty/font.nix delete mode 100644 modules/home-manager/common/font.nix delete mode 100644 modules/home-manager/common/options.nix create mode 100644 modules/home-manager/roles/common/default.nix rename modules/home-manager/roles/{ => common}/keyring.nix (100%) rename modules/home-manager/roles/{ => common}/sops.nix (100%) rename modules/home-manager/{common => }/secrets.yaml (100%) diff --git a/modules/home-manager/cli/terminals/alacritty/default.nix b/modules/home-manager/cli/terminals/alacritty/default.nix index 6b26b20..fbf6fb0 100644 --- a/modules/home-manager/cli/terminals/alacritty/default.nix +++ b/modules/home-manager/cli/terminals/alacritty/default.nix @@ -1,5 +1,12 @@ {pkgs, ...}: { catppuccin.alacritty.enable = true; + + home.packages = with pkgs; [ + nerd-fonts.caskaydia-cove + ]; + + fonts.fontconfig.enable = true; + programs.alacritty = { enable = true; package = pkgs.alacritty; diff --git a/modules/home-manager/cli/terminals/alacritty/font.nix b/modules/home-manager/cli/terminals/alacritty/font.nix new file mode 100644 index 0000000..da0be91 --- /dev/null +++ b/modules/home-manager/cli/terminals/alacritty/font.nix @@ -0,0 +1,2 @@ +{pkgs, ...}: { +} diff --git a/modules/home-manager/common/default.nix b/modules/home-manager/common/default.nix index db843be..bbf7e66 100644 --- a/modules/home-manager/common/default.nix +++ b/modules/home-manager/common/default.nix @@ -7,20 +7,4 @@ # global nix & nixpkgs settings ./options.nix ]; - - programs.home-manager.enable = true; - - sops.secrets.ssh_config = { - sopsFile = ./secrets.yaml; - path = "${config.home.homeDirectory}/.ssh/config"; - mode = "600"; - }; - - xdg.enable = true; - - news = { - display = "silent"; - json = lib.mkForce {}; - entries = lib.mkForce []; - }; } diff --git a/modules/home-manager/common/font.nix b/modules/home-manager/common/font.nix deleted file mode 100644 index 9fcafc8..0000000 --- a/modules/home-manager/common/font.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - nerd-fonts.caskaydia-cove - ]; - - fonts.fontconfig.enable = true; -} diff --git a/modules/home-manager/common/options.nix b/modules/home-manager/common/options.nix deleted file mode 100644 index f325b11..0000000 --- a/modules/home-manager/common/options.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, ...}: -with lib; { - options.roles = { - workdevice = mkEnableOption "Set device as workdevice, to enable special config."; - autostart = with types; mkOption {type = listOf str;}; - }; -} diff --git a/modules/home-manager/roles/common/default.nix b/modules/home-manager/roles/common/default.nix new file mode 100644 index 0000000..bb93451 --- /dev/null +++ b/modules/home-manager/roles/common/default.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + programs.home-manager.enable = true; + xdg.enable = true; + + news = { + display = "silent"; + json = lib.mkForce {}; + entries = lib.mkForce []; + }; +} diff --git a/modules/home-manager/roles/keyring.nix b/modules/home-manager/roles/common/keyring.nix similarity index 100% rename from modules/home-manager/roles/keyring.nix rename to modules/home-manager/roles/common/keyring.nix diff --git a/modules/home-manager/roles/sops.nix b/modules/home-manager/roles/common/sops.nix similarity index 100% rename from modules/home-manager/roles/sops.nix rename to modules/home-manager/roles/common/sops.nix diff --git a/modules/home-manager/roles/ssh.nix b/modules/home-manager/roles/ssh.nix index 2d8cb2b..13822ed 100644 --- a/modules/home-manager/roles/ssh.nix +++ b/modules/home-manager/roles/ssh.nix @@ -1,3 +1,9 @@ -{ +{config, ...}: { services.ssh-agent.enable = true; + + sops.secrets.ssh_config = { + sopsFile = ../secrets.yaml; + path = "${config.home.homeDirectory}/.ssh/config"; + mode = "600"; + }; } diff --git a/modules/home-manager/common/secrets.yaml b/modules/home-manager/secrets.yaml similarity index 100% rename from modules/home-manager/common/secrets.yaml rename to modules/home-manager/secrets.yaml From 54c5926e8f4d272fb542190f40166e9e62d1b6ee Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 15 Dec 2025 20:02:08 +0100 Subject: [PATCH 08/81] WIP: WIP --- flake.lock | 16 ++++++ flake.nix | 1 + hosts/firefly/home.nix | 5 ++ .../chromium/default.nix} | 0 .../firefox/default.nix} | 0 modules/home-manager/cli/default.nix | 7 --- .../tools/{atuin.nix => atuin/default.nix} | 0 .../home-manager/cli/tools/core/default.nix | 54 ++---------------- .../home-manager/cli/tools/core/packages.nix | 52 +++++++++++++++++ .../cli/tools/custom/shellScripts.nix | 27 --------- .../tools/{direnv.nix => direnv/default.nix} | 0 .../cli/tools/{git.nix => git/default.nix} | 0 .../cli/tools/k8s/k9s-workplugins.nix | 0 .../home-manager/cli/tools/langs/default.nix | 6 ++ .../cli/tools/{lang => langs}/go.nix | 0 .../cli/tools/{lang => langs}/rust.nix | 0 .../{lazygit.nix => lazygit/default.nix} | 0 .../cli/tools/{pet.nix => pet/default.nix} | 0 .../{starship.nix => starship/default.nix} | 0 modules/home-manager/default.nix | 1 + modules/home-manager/desktop/default.nix | 7 --- .../home-manager/desktop/programs/audio.nix | 6 -- .../home-manager/desktop/programs/default.nix | 38 ------------ .../desktop/programs/nextcloud.nix | 6 -- .../home-manager/desktop/programs/spotify.nix | 5 -- .../{desktop => desktops}/addons/default.nix | 0 .../{desktop => desktops}/addons/fuzzel.nix | 0 .../{desktop => desktops}/addons/gtk.nix | 0 .../{desktop => desktops}/addons/qt.nix | 0 .../addons/swaync/default.nix | 0 .../addons/swaync/swaync.css | 0 .../addons/swaync/swaync.json | 0 .../addons/waybar/default.nix | 0 .../addons/waybar/waybar.css | 0 .../addons/waybar/waybar.json | 0 .../addons/wlogout/default.nix | 0 .../addons/wlogout/icons/hibernate.png | Bin .../addons/wlogout/icons/lock.png | Bin .../addons/wlogout/icons/logout.png | Bin .../addons/wlogout/icons/reboot.png | Bin .../addons/wlogout/icons/shutdown.png | Bin .../addons/wlogout/icons/suspend.png | Bin .../addons/wlogout/style.css | 0 .../hyprland/addons/hypridle.nix | 0 .../hyprland/addons/hyprlock.nix | 0 .../hyprland/addons/hyprpaper.nix | 0 .../hyprland/default.nix | 0 .../hyprland/options.nix | 0 .../hyprland/settings/autostart.nix | 0 .../hyprland/settings/binds.nix | 0 .../hyprland/settings/global.nix | 0 .../hyprland/settings/monitor.nix | 0 .../hyprland/settings/windows.nix | 0 .../hyprland/settings/workspaces.nix | 0 modules/home-manager/programs/default.nix | 5 ++ .../home-manager/programs/guis/default.nix | 21 +++++++ .../home-manager/{roles => services}/ssh.nix | 0 .../{desktop/programs => services}/tray.nix | 0 58 files changed, 111 insertions(+), 146 deletions(-) rename modules/home-manager/{desktop/programs/chromium.nix => browsers/chromium/default.nix} (100%) rename modules/home-manager/{desktop/programs/firefox.nix => browsers/firefox/default.nix} (100%) delete mode 100644 modules/home-manager/cli/default.nix rename modules/home-manager/cli/tools/{atuin.nix => atuin/default.nix} (100%) create mode 100644 modules/home-manager/cli/tools/core/packages.nix delete mode 100644 modules/home-manager/cli/tools/custom/shellScripts.nix rename modules/home-manager/cli/tools/{direnv.nix => direnv/default.nix} (100%) rename modules/home-manager/cli/tools/{git.nix => git/default.nix} (100%) delete mode 100644 modules/home-manager/cli/tools/k8s/k9s-workplugins.nix create mode 100644 modules/home-manager/cli/tools/langs/default.nix rename modules/home-manager/cli/tools/{lang => langs}/go.nix (100%) rename modules/home-manager/cli/tools/{lang => langs}/rust.nix (100%) rename modules/home-manager/cli/tools/{lazygit.nix => lazygit/default.nix} (100%) rename modules/home-manager/cli/tools/{pet.nix => pet/default.nix} (100%) rename modules/home-manager/cli/tools/{starship.nix => starship/default.nix} (100%) delete mode 100644 modules/home-manager/desktop/default.nix delete mode 100644 modules/home-manager/desktop/programs/audio.nix delete mode 100644 modules/home-manager/desktop/programs/default.nix delete mode 100644 modules/home-manager/desktop/programs/nextcloud.nix delete mode 100644 modules/home-manager/desktop/programs/spotify.nix rename modules/home-manager/{desktop => desktops}/addons/default.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/fuzzel.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/gtk.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/qt.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/swaync/default.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/swaync/swaync.css (100%) rename modules/home-manager/{desktop => desktops}/addons/swaync/swaync.json (100%) rename modules/home-manager/{desktop => desktops}/addons/waybar/default.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/waybar/waybar.css (100%) rename modules/home-manager/{desktop => desktops}/addons/waybar/waybar.json (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/default.nix (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/hibernate.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/lock.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/logout.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/reboot.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/shutdown.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/icons/suspend.png (100%) rename modules/home-manager/{desktop => desktops}/addons/wlogout/style.css (100%) rename modules/home-manager/{desktop => desktops}/hyprland/addons/hypridle.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/addons/hyprlock.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/addons/hyprpaper.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/default.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/options.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/autostart.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/binds.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/global.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/monitor.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/windows.nix (100%) rename modules/home-manager/{desktop => desktops}/hyprland/settings/workspaces.nix (100%) create mode 100644 modules/home-manager/programs/default.nix create mode 100644 modules/home-manager/programs/guis/default.nix rename modules/home-manager/{roles => services}/ssh.nix (100%) rename modules/home-manager/{desktop/programs => services}/tray.nix (100%) diff --git a/flake.lock b/flake.lock index 8455fc2..6d5168f 100644 --- a/flake.lock +++ b/flake.lock @@ -565,6 +565,21 @@ "type": "github" } }, + "import-tree": { + "locked": { + "lastModified": 1763762820, + "narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=", + "owner": "vic", + "repo": "import-tree", + "rev": "3c23749d8013ec6daa1d7255057590e9ca726646", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, "krewfile": { "inputs": { "flake-utils": "flake-utils", @@ -767,6 +782,7 @@ "disko": "disko", "home-manager": "home-manager", "hyprland-git": "hyprland-git", + "import-tree": "import-tree", "krewfile": "krewfile", "neonix": "neonix", "nixos-hardware": "nixos-hardware", diff --git a/flake.nix b/flake.nix index 442d351..b1d2686 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,7 @@ }; nixos-hardware.url = "github:nixos/nixos-hardware/master"; catppuccin.url = "github:catppuccin/nix"; + import-tree.url = "github:vic/import-tree"; }; outputs = diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 1afbcf1..c06d63a 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -25,9 +25,14 @@ home.packages = with pkgs; let in [ + # CLIs mypkgs.gardenctl mypkgs.gardenlogin + stackit-cli + openstackclient-full + vault-bin + # Tools brightnessctl ]; diff --git a/modules/home-manager/desktop/programs/chromium.nix b/modules/home-manager/browsers/chromium/default.nix similarity index 100% rename from modules/home-manager/desktop/programs/chromium.nix rename to modules/home-manager/browsers/chromium/default.nix diff --git a/modules/home-manager/desktop/programs/firefox.nix b/modules/home-manager/browsers/firefox/default.nix similarity index 100% rename from modules/home-manager/desktop/programs/firefox.nix rename to modules/home-manager/browsers/firefox/default.nix diff --git a/modules/home-manager/cli/default.nix b/modules/home-manager/cli/default.nix deleted file mode 100644 index 0bae54d..0000000 --- a/modules/home-manager/cli/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./shells/zsh - ./terminals/alacritty - ./tools - ]; -} diff --git a/modules/home-manager/cli/tools/atuin.nix b/modules/home-manager/cli/tools/atuin/default.nix similarity index 100% rename from modules/home-manager/cli/tools/atuin.nix rename to modules/home-manager/cli/tools/atuin/default.nix diff --git a/modules/home-manager/cli/tools/core/default.nix b/modules/home-manager/cli/tools/core/default.nix index 744a80a..ccf22c2 100644 --- a/modules/home-manager/cli/tools/core/default.nix +++ b/modules/home-manager/cli/tools/core/default.nix @@ -1,52 +1,6 @@ -{pkgs, ...}: let -in { - home.packages = with pkgs; [ - # Core utility - coreutils # cp, mv, etc. - dnsutils # dig, nslookup, etc. - gnumake - gnutar - gzip - unzip - gnused - gnugrep - killall - pciutils - parallel - - # Inspection - htop - - # Network tools - inetutils - curl - wget - - # Network inspection - termshark - nmap - netcat - tcpdump - - # Text processing - jq - yq-go - gawk - - # Find utils - fd - ripgrep - - # Copy tools - rclone - - # SSH / Security - openssh - libfido2 - keepassxc - sops - - # Clipboard - wl-clipboard +{ + imports = [ + ./packages.nix + ./programs.nix ]; } diff --git a/modules/home-manager/cli/tools/core/packages.nix b/modules/home-manager/cli/tools/core/packages.nix new file mode 100644 index 0000000..744a80a --- /dev/null +++ b/modules/home-manager/cli/tools/core/packages.nix @@ -0,0 +1,52 @@ +{pkgs, ...}: let +in { + home.packages = with pkgs; [ + # Core utility + coreutils # cp, mv, etc. + dnsutils # dig, nslookup, etc. + gnumake + gnutar + gzip + unzip + gnused + gnugrep + killall + pciutils + parallel + + # Inspection + htop + + # Network tools + inetutils + curl + wget + + # Network inspection + termshark + nmap + netcat + tcpdump + + # Text processing + jq + yq-go + gawk + + # Find utils + fd + ripgrep + + # Copy tools + rclone + + # SSH / Security + openssh + libfido2 + keepassxc + sops + + # Clipboard + wl-clipboard + ]; +} diff --git a/modules/home-manager/cli/tools/custom/shellScripts.nix b/modules/home-manager/cli/tools/custom/shellScripts.nix deleted file mode 100644 index f4dd4bb..0000000 --- a/modules/home-manager/cli/tools/custom/shellScripts.nix +++ /dev/null @@ -1,27 +0,0 @@ -{pkgs, ...}: let - # nix helpers - nix-run = pkgs.writeShellScriptBin "nr" '' - #!/usr/bin/env bash - nix run $(printf 'nixpkgs#%s ' "$@") - ''; - - nix-shell = pkgs.writeShellScriptBin "ns" '' - #!/usr/bin/env bash - nix shell $(printf 'nixpkgs#%s ' "$@") - ''; - - # kubeconfig selector - selc = pkgs.writeShellScriptBin "selc" '' - #!/usr/bin/env bash - BASE_PATH=$HOME/.config/kubeconfig - YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') - KUBECONFIG=$(fzf <<<"$YAMLS") - export KUBECONFIG=$BASE_PATH/$KUBECONFIG - ''; -in { - home.packages = [ - nix-run - nix-shell - selc - ]; -} diff --git a/modules/home-manager/cli/tools/direnv.nix b/modules/home-manager/cli/tools/direnv/default.nix similarity index 100% rename from modules/home-manager/cli/tools/direnv.nix rename to modules/home-manager/cli/tools/direnv/default.nix diff --git a/modules/home-manager/cli/tools/git.nix b/modules/home-manager/cli/tools/git/default.nix similarity index 100% rename from modules/home-manager/cli/tools/git.nix rename to modules/home-manager/cli/tools/git/default.nix diff --git a/modules/home-manager/cli/tools/k8s/k9s-workplugins.nix b/modules/home-manager/cli/tools/k8s/k9s-workplugins.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/home-manager/cli/tools/langs/default.nix b/modules/home-manager/cli/tools/langs/default.nix new file mode 100644 index 0000000..966a203 --- /dev/null +++ b/modules/home-manager/cli/tools/langs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./go.nix + ./rust.nix + ]; +} diff --git a/modules/home-manager/cli/tools/lang/go.nix b/modules/home-manager/cli/tools/langs/go.nix similarity index 100% rename from modules/home-manager/cli/tools/lang/go.nix rename to modules/home-manager/cli/tools/langs/go.nix diff --git a/modules/home-manager/cli/tools/lang/rust.nix b/modules/home-manager/cli/tools/langs/rust.nix similarity index 100% rename from modules/home-manager/cli/tools/lang/rust.nix rename to modules/home-manager/cli/tools/langs/rust.nix diff --git a/modules/home-manager/cli/tools/lazygit.nix b/modules/home-manager/cli/tools/lazygit/default.nix similarity index 100% rename from modules/home-manager/cli/tools/lazygit.nix rename to modules/home-manager/cli/tools/lazygit/default.nix diff --git a/modules/home-manager/cli/tools/pet.nix b/modules/home-manager/cli/tools/pet/default.nix similarity index 100% rename from modules/home-manager/cli/tools/pet.nix rename to modules/home-manager/cli/tools/pet/default.nix diff --git a/modules/home-manager/cli/tools/starship.nix b/modules/home-manager/cli/tools/starship/default.nix similarity index 100% rename from modules/home-manager/cli/tools/starship.nix rename to modules/home-manager/cli/tools/starship/default.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 38b94fd..12b7238 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -10,6 +10,7 @@ ./common ./cli ./desktop + ./roles # nix settings ../nix.nix diff --git a/modules/home-manager/desktop/default.nix b/modules/home-manager/desktop/default.nix deleted file mode 100644 index efeb753..0000000 --- a/modules/home-manager/desktop/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./hyprland - ./addons - ./programs - ]; -} diff --git a/modules/home-manager/desktop/programs/audio.nix b/modules/home-manager/desktop/programs/audio.nix deleted file mode 100644 index b8cbf77..0000000 --- a/modules/home-manager/desktop/programs/audio.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - pavucontrol - spek - ]; -} diff --git a/modules/home-manager/desktop/programs/default.nix b/modules/home-manager/desktop/programs/default.nix deleted file mode 100644 index 08f309f..0000000 --- a/modules/home-manager/desktop/programs/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - imports = [ - # Tools - ./audio.nix - ./tray.nix - - # Programs - ./spotify.nix - ./nextcloud.nix - - # Browsers - ./firefox.nix - ./chromium.nix - ]; - - # Default desktop programs - home.packages = with pkgs; - [ - xfce.thunar - vlc - grimblast - nwg-displays - nwg-look - gparted - gnome-disk-utility - wf-recorder - ] - ++ lib.optionals config.roles.workdevice [ - stackit-cli - openstackclient-full - vault-bin - ]; -} diff --git a/modules/home-manager/desktop/programs/nextcloud.nix b/modules/home-manager/desktop/programs/nextcloud.nix deleted file mode 100644 index 4822bc3..0000000 --- a/modules/home-manager/desktop/programs/nextcloud.nix +++ /dev/null @@ -1,6 +0,0 @@ -_: { - home.packages = [ - # TODO: reactivate if needed - # pkgs.nextcloud-client - ]; -} diff --git a/modules/home-manager/desktop/programs/spotify.nix b/modules/home-manager/desktop/programs/spotify.nix deleted file mode 100644 index 9d0a14f..0000000 --- a/modules/home-manager/desktop/programs/spotify.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs = { - spotify-player.enable = true; - }; -} diff --git a/modules/home-manager/desktop/addons/default.nix b/modules/home-manager/desktops/addons/default.nix similarity index 100% rename from modules/home-manager/desktop/addons/default.nix rename to modules/home-manager/desktops/addons/default.nix diff --git a/modules/home-manager/desktop/addons/fuzzel.nix b/modules/home-manager/desktops/addons/fuzzel.nix similarity index 100% rename from modules/home-manager/desktop/addons/fuzzel.nix rename to modules/home-manager/desktops/addons/fuzzel.nix diff --git a/modules/home-manager/desktop/addons/gtk.nix b/modules/home-manager/desktops/addons/gtk.nix similarity index 100% rename from modules/home-manager/desktop/addons/gtk.nix rename to modules/home-manager/desktops/addons/gtk.nix diff --git a/modules/home-manager/desktop/addons/qt.nix b/modules/home-manager/desktops/addons/qt.nix similarity index 100% rename from modules/home-manager/desktop/addons/qt.nix rename to modules/home-manager/desktops/addons/qt.nix diff --git a/modules/home-manager/desktop/addons/swaync/default.nix b/modules/home-manager/desktops/addons/swaync/default.nix similarity index 100% rename from modules/home-manager/desktop/addons/swaync/default.nix rename to modules/home-manager/desktops/addons/swaync/default.nix diff --git a/modules/home-manager/desktop/addons/swaync/swaync.css b/modules/home-manager/desktops/addons/swaync/swaync.css similarity index 100% rename from modules/home-manager/desktop/addons/swaync/swaync.css rename to modules/home-manager/desktops/addons/swaync/swaync.css diff --git a/modules/home-manager/desktop/addons/swaync/swaync.json b/modules/home-manager/desktops/addons/swaync/swaync.json similarity index 100% rename from modules/home-manager/desktop/addons/swaync/swaync.json rename to modules/home-manager/desktops/addons/swaync/swaync.json diff --git a/modules/home-manager/desktop/addons/waybar/default.nix b/modules/home-manager/desktops/addons/waybar/default.nix similarity index 100% rename from modules/home-manager/desktop/addons/waybar/default.nix rename to modules/home-manager/desktops/addons/waybar/default.nix diff --git a/modules/home-manager/desktop/addons/waybar/waybar.css b/modules/home-manager/desktops/addons/waybar/waybar.css similarity index 100% rename from modules/home-manager/desktop/addons/waybar/waybar.css rename to modules/home-manager/desktops/addons/waybar/waybar.css diff --git a/modules/home-manager/desktop/addons/waybar/waybar.json b/modules/home-manager/desktops/addons/waybar/waybar.json similarity index 100% rename from modules/home-manager/desktop/addons/waybar/waybar.json rename to modules/home-manager/desktops/addons/waybar/waybar.json diff --git a/modules/home-manager/desktop/addons/wlogout/default.nix b/modules/home-manager/desktops/addons/wlogout/default.nix similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/default.nix rename to modules/home-manager/desktops/addons/wlogout/default.nix diff --git a/modules/home-manager/desktop/addons/wlogout/icons/hibernate.png b/modules/home-manager/desktops/addons/wlogout/icons/hibernate.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/hibernate.png rename to modules/home-manager/desktops/addons/wlogout/icons/hibernate.png diff --git a/modules/home-manager/desktop/addons/wlogout/icons/lock.png b/modules/home-manager/desktops/addons/wlogout/icons/lock.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/lock.png rename to modules/home-manager/desktops/addons/wlogout/icons/lock.png diff --git a/modules/home-manager/desktop/addons/wlogout/icons/logout.png b/modules/home-manager/desktops/addons/wlogout/icons/logout.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/logout.png rename to modules/home-manager/desktops/addons/wlogout/icons/logout.png diff --git a/modules/home-manager/desktop/addons/wlogout/icons/reboot.png b/modules/home-manager/desktops/addons/wlogout/icons/reboot.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/reboot.png rename to modules/home-manager/desktops/addons/wlogout/icons/reboot.png diff --git a/modules/home-manager/desktop/addons/wlogout/icons/shutdown.png b/modules/home-manager/desktops/addons/wlogout/icons/shutdown.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/shutdown.png rename to modules/home-manager/desktops/addons/wlogout/icons/shutdown.png diff --git a/modules/home-manager/desktop/addons/wlogout/icons/suspend.png b/modules/home-manager/desktops/addons/wlogout/icons/suspend.png similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/icons/suspend.png rename to modules/home-manager/desktops/addons/wlogout/icons/suspend.png diff --git a/modules/home-manager/desktop/addons/wlogout/style.css b/modules/home-manager/desktops/addons/wlogout/style.css similarity index 100% rename from modules/home-manager/desktop/addons/wlogout/style.css rename to modules/home-manager/desktops/addons/wlogout/style.css diff --git a/modules/home-manager/desktop/hyprland/addons/hypridle.nix b/modules/home-manager/desktops/hyprland/addons/hypridle.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/addons/hypridle.nix rename to modules/home-manager/desktops/hyprland/addons/hypridle.nix diff --git a/modules/home-manager/desktop/hyprland/addons/hyprlock.nix b/modules/home-manager/desktops/hyprland/addons/hyprlock.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/addons/hyprlock.nix rename to modules/home-manager/desktops/hyprland/addons/hyprlock.nix diff --git a/modules/home-manager/desktop/hyprland/addons/hyprpaper.nix b/modules/home-manager/desktops/hyprland/addons/hyprpaper.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/addons/hyprpaper.nix rename to modules/home-manager/desktops/hyprland/addons/hyprpaper.nix diff --git a/modules/home-manager/desktop/hyprland/default.nix b/modules/home-manager/desktops/hyprland/default.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/default.nix rename to modules/home-manager/desktops/hyprland/default.nix diff --git a/modules/home-manager/desktop/hyprland/options.nix b/modules/home-manager/desktops/hyprland/options.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/options.nix rename to modules/home-manager/desktops/hyprland/options.nix diff --git a/modules/home-manager/desktop/hyprland/settings/autostart.nix b/modules/home-manager/desktops/hyprland/settings/autostart.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/autostart.nix rename to modules/home-manager/desktops/hyprland/settings/autostart.nix diff --git a/modules/home-manager/desktop/hyprland/settings/binds.nix b/modules/home-manager/desktops/hyprland/settings/binds.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/binds.nix rename to modules/home-manager/desktops/hyprland/settings/binds.nix diff --git a/modules/home-manager/desktop/hyprland/settings/global.nix b/modules/home-manager/desktops/hyprland/settings/global.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/global.nix rename to modules/home-manager/desktops/hyprland/settings/global.nix diff --git a/modules/home-manager/desktop/hyprland/settings/monitor.nix b/modules/home-manager/desktops/hyprland/settings/monitor.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/monitor.nix rename to modules/home-manager/desktops/hyprland/settings/monitor.nix diff --git a/modules/home-manager/desktop/hyprland/settings/windows.nix b/modules/home-manager/desktops/hyprland/settings/windows.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/windows.nix rename to modules/home-manager/desktops/hyprland/settings/windows.nix diff --git a/modules/home-manager/desktop/hyprland/settings/workspaces.nix b/modules/home-manager/desktops/hyprland/settings/workspaces.nix similarity index 100% rename from modules/home-manager/desktop/hyprland/settings/workspaces.nix rename to modules/home-manager/desktops/hyprland/settings/workspaces.nix diff --git a/modules/home-manager/programs/default.nix b/modules/home-manager/programs/default.nix new file mode 100644 index 0000000..1a9fd6e --- /dev/null +++ b/modules/home-manager/programs/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./guis + ]; +} diff --git a/modules/home-manager/programs/guis/default.nix b/modules/home-manager/programs/guis/default.nix new file mode 100644 index 0000000..4c797ce --- /dev/null +++ b/modules/home-manager/programs/guis/default.nix @@ -0,0 +1,21 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + # Audio + pavucontrol + spek + vlc + + # Screenshot / Recording + grimblast + wf-recorder + + # Tools + nwg-displays + nwg-look + gparted + gnome-disk-utility + + # Explorer + xfce.thunar + ]; +} diff --git a/modules/home-manager/roles/ssh.nix b/modules/home-manager/services/ssh.nix similarity index 100% rename from modules/home-manager/roles/ssh.nix rename to modules/home-manager/services/ssh.nix diff --git a/modules/home-manager/desktop/programs/tray.nix b/modules/home-manager/services/tray.nix similarity index 100% rename from modules/home-manager/desktop/programs/tray.nix rename to modules/home-manager/services/tray.nix From 8d2ed23167bbbb6d49addaf68f8ecf02bdbef4ee Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 16 Dec 2025 01:21:24 +0100 Subject: [PATCH 09/81] This shit works, at least for hm q --- flake.nix | 57 +++++++------- hosts/firefly/home.nix | 15 ++-- lib/default.nix | 1 + modules/home-manager/cli/packages/default.nix | 71 ------------------ .../cli/terminals/alacritty/font.nix | 2 - .../home-manager/cli/tools/custom/default.nix | 0 modules/home-manager/common/default.nix | 10 --- modules/home-manager/default.nix | 18 ----- modules/home-manager/desktops/addons/gtk.nix | 34 --------- modules/home-manager/roles/common/default.nix | 10 --- modules/home-manager/roles/podman.nix | 3 - .../browsers/chromium/default.nix | 3 +- .../browsers/firefox/default.nix | 18 +++-- .../cli/shells/zsh/default.nix | 18 ++--- .../cli/terminals/alacritty/default.nix | 37 ++++----- .../cli/tools/atuin/default.nix | 0 .../cli/tools/core/default.nix | 0 .../cli/tools/core/packages.nix | 4 +- .../cli/tools/core/programs.nix | 0 modules/home/cli/tools/custom/default.nix | 1 + .../cli/tools/custom/shell-scripts.nix | 10 ++- .../cli/tools/direnv/default.nix | 0 .../cli/tools/git/default.nix | 10 +-- .../cli/tools/k8s/default.nix | 4 +- .../cli/tools/k8s/k9s.nix | 16 ++-- .../cli/tools/k8s/krewfile.nix | 0 .../cli/tools/k8s/kubecolor.nix | 0 .../cli/tools/langs/default.nix | 0 .../cli/tools/langs/go.nix | 3 +- .../cli/tools/langs/rust.nix | 7 +- .../cli/tools/lazygit/default.nix | 3 +- .../cli/tools/pet/default.nix | 3 +- .../cli/tools/starship/default.nix | 17 ++++- modules/home/common/default.nix | 14 ++++ modules/home/common/roles.nix | 9 +++ .../desktops/addons/default.nix | 0 .../desktops/addons/fuzzel.nix | 2 +- modules/home/desktops/addons/gtk.nix | 37 +++++++++ .../desktops/addons/qt.nix | 7 +- .../desktops/addons/swaync/default.nix | 5 +- .../desktops/addons/swaync/swaync.css | 0 .../desktops/addons/swaync/swaync.json | 0 .../desktops/addons/waybar/default.nix | 0 .../desktops/addons/waybar/waybar.css | 0 .../desktops/addons/waybar/waybar.json | 0 .../desktops/addons/wlogout/default.nix | 3 +- .../addons/wlogout/icons/hibernate.png | Bin .../desktops/addons/wlogout/icons/lock.png | Bin .../desktops/addons/wlogout/icons/logout.png | Bin .../desktops/addons/wlogout/icons/reboot.png | Bin .../addons/wlogout/icons/shutdown.png | Bin .../desktops/addons/wlogout/icons/suspend.png | Bin .../desktops/addons/wlogout/style.css | 0 .../desktops/hyprland/addons/hypridle.nix | 6 +- .../desktops/hyprland/addons/hyprlock.nix | 6 +- .../desktops/hyprland/addons/hyprpaper.nix | 12 +-- .../desktops/hyprland/default.nix | 5 +- .../desktops/hyprland/options.nix | 5 +- .../desktops/hyprland/settings/autostart.nix | 6 +- .../desktops/hyprland/settings/binds.nix | 6 +- .../desktops/hyprland/settings/global.nix | 6 +- .../desktops/hyprland/settings/monitor.nix | 6 +- .../desktops/hyprland/settings/windows.nix | 6 +- .../desktops/hyprland/settings/workspaces.nix | 6 +- .../programs/default.nix | 0 .../programs/guis/default.nix | 3 +- modules/{home-manager => home}/secrets.yaml | 0 modules/home/services/default.nix | 8 ++ .../common => home/services}/keyring.nix | 8 +- .../roles/common => home/services}/sops.nix | 3 +- .../{home-manager => home}/services/ssh.nix | 3 +- .../{home-manager => home}/services/tray.nix | 0 72 files changed, 256 insertions(+), 291 deletions(-) delete mode 100644 modules/home-manager/cli/packages/default.nix delete mode 100644 modules/home-manager/cli/terminals/alacritty/font.nix delete mode 100644 modules/home-manager/cli/tools/custom/default.nix delete mode 100644 modules/home-manager/common/default.nix delete mode 100644 modules/home-manager/default.nix delete mode 100644 modules/home-manager/desktops/addons/gtk.nix delete mode 100644 modules/home-manager/roles/common/default.nix delete mode 100644 modules/home-manager/roles/podman.nix rename modules/{home-manager => home}/browsers/chromium/default.nix (95%) rename modules/{home-manager => home}/browsers/firefox/default.nix (95%) rename modules/{home-manager => home}/cli/shells/zsh/default.nix (85%) rename modules/{home-manager => home}/cli/terminals/alacritty/default.nix (58%) rename modules/{home-manager => home}/cli/tools/atuin/default.nix (100%) rename modules/{home-manager => home}/cli/tools/core/default.nix (100%) rename modules/{home-manager => home}/cli/tools/core/packages.nix (96%) rename modules/{home-manager => home}/cli/tools/core/programs.nix (100%) create mode 100644 modules/home/cli/tools/custom/default.nix rename modules/{home-manager => home}/cli/tools/custom/shell-scripts.nix (87%) rename modules/{home-manager => home}/cli/tools/direnv/default.nix (100%) rename modules/{home-manager => home}/cli/tools/git/default.nix (90%) rename modules/{home-manager => home}/cli/tools/k8s/default.nix (88%) rename modules/{home-manager => home}/cli/tools/k8s/k9s.nix (92%) rename modules/{home-manager => home}/cli/tools/k8s/krewfile.nix (100%) rename modules/{home-manager => home}/cli/tools/k8s/kubecolor.nix (100%) rename modules/{home-manager => home}/cli/tools/langs/default.nix (100%) rename modules/{home-manager => home}/cli/tools/langs/go.nix (98%) rename modules/{home-manager => home}/cli/tools/langs/rust.nix (51%) rename modules/{home-manager => home}/cli/tools/lazygit/default.nix (94%) rename modules/{home-manager => home}/cli/tools/pet/default.nix (98%) rename modules/{home-manager => home}/cli/tools/starship/default.nix (91%) create mode 100644 modules/home/common/default.nix create mode 100644 modules/home/common/roles.nix rename modules/{home-manager => home}/desktops/addons/default.nix (100%) rename modules/{home-manager => home}/desktops/addons/fuzzel.nix (100%) create mode 100644 modules/home/desktops/addons/gtk.nix rename modules/{home-manager => home}/desktops/addons/qt.nix (69%) rename modules/{home-manager => home}/desktops/addons/swaync/default.nix (68%) rename modules/{home-manager => home}/desktops/addons/swaync/swaync.css (100%) rename modules/{home-manager => home}/desktops/addons/swaync/swaync.json (100%) rename modules/{home-manager => home}/desktops/addons/waybar/default.nix (100%) rename modules/{home-manager => home}/desktops/addons/waybar/waybar.css (100%) rename modules/{home-manager => home}/desktops/addons/waybar/waybar.json (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/default.nix (98%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/hibernate.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/lock.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/logout.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/reboot.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/shutdown.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/icons/suspend.png (100%) rename modules/{home-manager => home}/desktops/addons/wlogout/style.css (100%) rename modules/{home-manager => home}/desktops/hyprland/addons/hypridle.nix (96%) rename modules/{home-manager => home}/desktops/hyprland/addons/hyprlock.nix (98%) rename modules/{home-manager => home}/desktops/hyprland/addons/hyprpaper.nix (87%) rename modules/{home-manager => home}/desktops/hyprland/default.nix (94%) rename modules/{home-manager => home}/desktops/hyprland/options.nix (86%) rename modules/{home-manager => home}/desktops/hyprland/settings/autostart.nix (97%) rename modules/{home-manager => home}/desktops/hyprland/settings/binds.nix (97%) rename modules/{home-manager => home}/desktops/hyprland/settings/global.nix (98%) rename modules/{home-manager => home}/desktops/hyprland/settings/monitor.nix (96%) rename modules/{home-manager => home}/desktops/hyprland/settings/windows.nix (99%) rename modules/{home-manager => home}/desktops/hyprland/settings/workspaces.nix (99%) rename modules/{home-manager => home}/programs/default.nix (100%) rename modules/{home-manager => home}/programs/guis/default.nix (93%) rename modules/{home-manager => home}/secrets.yaml (100%) create mode 100644 modules/home/services/default.nix rename modules/{home-manager/roles/common => home/services}/keyring.nix (60%) rename modules/{home-manager/roles/common => home/services}/sops.nix (86%) rename modules/{home-manager => home}/services/ssh.nix (90%) rename modules/{home-manager => home}/services/tray.nix (100%) diff --git a/flake.nix b/flake.nix index b1d2686..fd46d48 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,6 @@ }; neonix = { url = "github:rgroemmer/neonix"; - inputs.nixpkgs.follows = "nixpkgs"; }; krewfile = { url = "github:brumhard/krewfile"; @@ -33,6 +32,7 @@ }; nixos-hardware.url = "github:nixos/nixos-hardware/master"; catppuccin.url = "github:catppuccin/nix"; + import-tree.url = "github:vic/import-tree"; }; @@ -63,6 +63,18 @@ ); forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system}); + + # nixosModules = [ + # ]; + + homeModules = [ + inputs.catppuccin.homeModules.catppuccin + inputs.neonix.homeManagerModules.neonix + inputs.krewfile.homeManagerModules.krewfile + inputs.sops-nix.homeManagerModules.sops + (inputs.import-tree.match ".*/default\\.nix" ./modules/home) + ./modules/nix.nix + ]; in with lib; { @@ -97,36 +109,21 @@ specialArgs = { inherit inputs mylib; }; }; }; - # K3S home-lab - kubex = lib.nixosSystem { - modules = [./hosts/kubex]; - specialArgs = {inherit inputs outputs;}; - }; - # Raspberry-pi 3 - nixberry = lib.nixosSystem { - modules = [./hosts/nixberry]; - specialArgs = {inherit inputs outputs;}; - }; - # ISO multi-tool - vinox = lib.nixosSystem { - modules = [./hosts/vinox]; - specialArgs = {inherit inputs outputs;}; - }; - }; - homeConfigurations = { - # Main workstation - "rap@zion" = lib.homeManagerConfiguration { - modules = [./hosts/zion/home.nix]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = {inherit inputs outputs;}; - }; - # Firefly workmachine - "rapsn@firefly" = lib.homeManagerConfiguration { - modules = [./hosts/firefly/home.nix]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = {inherit self inputs outputs;}; + homeConfigurations = { + # Main workstation + "rap@zion" = homeManagerConfiguration { + modules = [ ./hosts/zion/home.nix ]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs mylib; }; + }; + + # Firefly workmachine + "rapsn@firefly" = homeManagerConfiguration { + modules = homeModules ++ [ ./hosts/firefly/home.nix ]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { inherit inputs outputs mylib; }; + }; }; }; - }; } diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index c06d63a..1148054 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -3,13 +3,11 @@ config, pkgs, ... -}: { - imports = [ - ../../modules/home-manager - ]; - +}: +{ roles = { - workdevice = true; + work = true; + email = "raphael.groemmer@stackit.cloud"; desktop.hyprland = { enable = true; @@ -23,8 +21,7 @@ }; }; - home.packages = with pkgs; let - in [ + home.packages = with pkgs; [ # CLIs mypkgs.gardenctl mypkgs.gardenlogin @@ -32,7 +29,7 @@ openstackclient-full vault-bin - # Tools + # Tools(inputs.import-tree.match ".*/default\\.nix" ./modules/home) brightnessctl ]; diff --git a/lib/default.nix b/lib/default.nix index be551f7..728ab97 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -6,4 +6,5 @@ with lib; mkOpt' = type: default: description: mkOption { inherit type default description; }; + } diff --git a/modules/home-manager/cli/packages/default.nix b/modules/home-manager/cli/packages/default.nix deleted file mode 100644 index 6735a53..0000000 --- a/modules/home-manager/cli/packages/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - pkgs, - config, - lib, - outputs, - ... -}: -let - workpkgs = outputs.packages.${pkgs.stdenv.hostPlatform.system}; -in -{ - home.packages = - with pkgs; - [ - # Core utility - coreutils # cp, mv, etc. - moreutils # parallel, pee, etc. - dnsutils # dig, nslookup, etc. - gnumake - gnutar - gzip - unzip - gnused - gnugrep - killall - - pciutils - - # Inspection - htop - - # Network tools - inetutils - curl - wget - - # Network inspetion - termshark - nmap - netcat - tcpdump - - # Text processing - jq - yq-go - gawk - - # Find utils - fd - ripgrep - - # Copy tools - rclone - - # SSH / Security - openssh - libfido2 - keepassxc - sops - - # Clipboard - wl-clipboard - - # Note taking - ] - ++ lib.optionals config.roles.workdevice [ - workpkgs.gardenctl - workpkgs.gardenlogin - brightnessctl - ]; -} diff --git a/modules/home-manager/cli/terminals/alacritty/font.nix b/modules/home-manager/cli/terminals/alacritty/font.nix deleted file mode 100644 index da0be91..0000000 --- a/modules/home-manager/cli/terminals/alacritty/font.nix +++ /dev/null @@ -1,2 +0,0 @@ -{pkgs, ...}: { -} diff --git a/modules/home-manager/cli/tools/custom/default.nix b/modules/home-manager/cli/tools/custom/default.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/home-manager/common/default.nix b/modules/home-manager/common/default.nix deleted file mode 100644 index bbf7e66..0000000 --- a/modules/home-manager/common/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - lib, - config, - ... -}: { - imports = [ - # global nix & nixpkgs settings - ./options.nix - ]; -} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix deleted file mode 100644 index 12b7238..0000000 --- a/modules/home-manager/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{inputs, ...}: { - imports = [ - # external modules - inputs.catppuccin.homeModules.catppuccin - inputs.neonix.homeManagerModules.neonix - inputs.krewfile.homeManagerModules.krewfile - inputs.sops-nix.homeManagerModules.sops - - # internal modules - ./common - ./cli - ./desktop - ./roles - - # nix settings - ../nix.nix - ]; -} diff --git a/modules/home-manager/desktops/addons/gtk.nix b/modules/home-manager/desktops/addons/gtk.nix deleted file mode 100644 index 607404d..0000000 --- a/modules/home-manager/desktops/addons/gtk.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - gtk = lib.mkForce { - enable = true; - - theme = { - name = "Catppuccin-GTK-Purple-Dark"; - package = pkgs.magnetic-catppuccin-gtk.override { - tweaks = ["black"]; - accent = ["purple"]; - }; - }; - - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.catppuccin-papirus-folders; - }; - }; - - home = let - name = "catppuccin-mocha-mauve-cursors"; - size = 35; - in { - pointerCursor = lib.mkForce { - enable = true; - inherit name size; - package = pkgs.catppuccin-cursors.mochaMauve; - gtk.enable = true; - }; - }; -} diff --git a/modules/home-manager/roles/common/default.nix b/modules/home-manager/roles/common/default.nix deleted file mode 100644 index bb93451..0000000 --- a/modules/home-manager/roles/common/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{lib, ...}: { - programs.home-manager.enable = true; - xdg.enable = true; - - news = { - display = "silent"; - json = lib.mkForce {}; - entries = lib.mkForce []; - }; -} diff --git a/modules/home-manager/roles/podman.nix b/modules/home-manager/roles/podman.nix deleted file mode 100644 index 04e2043..0000000 --- a/modules/home-manager/roles/podman.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.podman.enable = true; -} diff --git a/modules/home-manager/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix similarity index 95% rename from modules/home-manager/browsers/chromium/default.nix rename to modules/home/browsers/chromium/default.nix index e5ba9bb..66fe3f3 100644 --- a/modules/home-manager/browsers/chromium/default.nix +++ b/modules/home/browsers/chromium/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.chromium = { enable = true; package = pkgs.chromium; diff --git a/modules/home-manager/browsers/firefox/default.nix b/modules/home/browsers/firefox/default.nix similarity index 95% rename from modules/home-manager/browsers/firefox/default.nix rename to modules/home/browsers/firefox/default.nix index 14c7294..3512373 100644 --- a/modules/home-manager/browsers/firefox/default.nix +++ b/modules/home/browsers/firefox/default.nix @@ -1,11 +1,13 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let csshacks = pkgs.fetchFromGitHub { owner = "MrOtherGuy"; repo = "firefox-csshacks"; rev = "bedf5da5134360f5031dbd5ea78f0ccb2937c99b"; sha256 = "sha256-XmBzgKFCHz3uE45NhUpbAYi4OP939wE8biufgudDzrc="; }; -in { +in +{ programs.firefox = { enable = true; profiles.default = { @@ -76,7 +78,7 @@ in { "Nix Packages" = { icon = "https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg"; - definedAliases = ["@np"]; + definedAliases = [ "@np" ]; urls = [ { template = "https://search.nixos.org/packages"; @@ -101,7 +103,7 @@ in { "NixOS Options" = { icon = "https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg"; - definedAliases = ["@no"]; + definedAliases = [ "@no" ]; urls = [ { template = "https://search.nixos.org/options"; @@ -122,7 +124,7 @@ in { "SourceGraph" = { icon = "https://sourcegraph.com/.assets/img/sourcegraph-mark.svg"; - definedAliases = ["@sg"]; + definedAliases = [ "@sg" ]; urls = [ { @@ -140,7 +142,7 @@ in { "GitHub" = { icon = "https://github.com/favicon.ico"; - definedAliases = ["@gh"]; + definedAliases = [ "@gh" ]; urls = [ { @@ -158,7 +160,7 @@ in { "Home Manager" = { icon = "https://home-manager-options.extranix.com/images/home-manager-option-search2.png"; - definedAliases = ["@hm"]; + definedAliases = [ "@hm" ]; urls = [ { @@ -176,7 +178,7 @@ in { "HackerNews" = { icon = "https://news.ycombinator.com/favicon.ico"; - definedAliases = ["@hn"]; + definedAliases = [ "@hn" ]; urls = [ { diff --git a/modules/home-manager/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix similarity index 85% rename from modules/home-manager/cli/shells/zsh/default.nix rename to modules/home/cli/shells/zsh/default.nix index 94f94a8..873fd11 100644 --- a/modules/home-manager/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -4,8 +4,9 @@ config, ... }: -with lib; { - home.packages = [pkgs.zsh-completions]; +with lib; +{ + home.packages = [ pkgs.zsh-completions ]; catppuccin.zsh-syntax-highlighting.enable = true; @@ -38,12 +39,11 @@ with lib; { initContent = mkMerge [ (mkOrder 500 '''') - (mkOrder 1000 - '' - [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) - source <(gardenctl completion zsh) - eval $(gardenctl kubectl-env zsh) - '') + (mkOrder 1000 '' + [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) + source <(gardenctl completion zsh) + eval $(gardenctl kubectl-env zsh) + '') (mkOrder 1500 '''') ]; @@ -68,7 +68,7 @@ with lib; { k = "kubectl"; kk = "k9s"; kns = "kubectl ns"; - selc = "source select_kc"; + selc = "source selc'"; clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; }; diff --git a/modules/home-manager/cli/terminals/alacritty/default.nix b/modules/home/cli/terminals/alacritty/default.nix similarity index 58% rename from modules/home-manager/cli/terminals/alacritty/default.nix rename to modules/home/cli/terminals/alacritty/default.nix index fbf6fb0..9cf0df4 100644 --- a/modules/home-manager/cli/terminals/alacritty/default.nix +++ b/modules/home/cli/terminals/alacritty/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ catppuccin.alacritty.enable = true; home.packages = with pkgs; [ @@ -24,23 +25,25 @@ }; }; - font = let - fontname = "CaskaydiaCove Nerd Font"; - in { - normal = { - family = fontname; - style = "SemiBold"; - }; - bold = { - family = fontname; - style = "Bold"; - }; - italic = { - family = fontname; - style = "Italic"; + font = + let + fontname = "CaskaydiaCove Nerd Font"; + in + { + normal = { + family = fontname; + style = "SemiBold"; + }; + bold = { + family = fontname; + style = "Bold"; + }; + italic = { + family = fontname; + style = "Italic"; + }; + size = 13; }; - size = 13; - }; mouse.bindings = [ { diff --git a/modules/home-manager/cli/tools/atuin/default.nix b/modules/home/cli/tools/atuin/default.nix similarity index 100% rename from modules/home-manager/cli/tools/atuin/default.nix rename to modules/home/cli/tools/atuin/default.nix diff --git a/modules/home-manager/cli/tools/core/default.nix b/modules/home/cli/tools/core/default.nix similarity index 100% rename from modules/home-manager/cli/tools/core/default.nix rename to modules/home/cli/tools/core/default.nix diff --git a/modules/home-manager/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix similarity index 96% rename from modules/home-manager/cli/tools/core/packages.nix rename to modules/home/cli/tools/core/packages.nix index 744a80a..376627c 100644 --- a/modules/home-manager/cli/tools/core/packages.nix +++ b/modules/home/cli/tools/core/packages.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: let -in { +{ pkgs, ... }: +{ home.packages = with pkgs; [ # Core utility coreutils # cp, mv, etc. diff --git a/modules/home-manager/cli/tools/core/programs.nix b/modules/home/cli/tools/core/programs.nix similarity index 100% rename from modules/home-manager/cli/tools/core/programs.nix rename to modules/home/cli/tools/core/programs.nix diff --git a/modules/home/cli/tools/custom/default.nix b/modules/home/cli/tools/custom/default.nix new file mode 100644 index 0000000..58b56c4 --- /dev/null +++ b/modules/home/cli/tools/custom/default.nix @@ -0,0 +1 @@ +{ imports = [ ./shell-scripts.nix ]; } diff --git a/modules/home-manager/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix similarity index 87% rename from modules/home-manager/cli/tools/custom/shell-scripts.nix rename to modules/home/cli/tools/custom/shell-scripts.nix index f4dd4bb..9620370 100644 --- a/modules/home-manager/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let # nix helpers nix-run = pkgs.writeShellScriptBin "nr" '' #!/usr/bin/env bash @@ -11,17 +12,18 @@ ''; # kubeconfig selector - selc = pkgs.writeShellScriptBin "selc" '' + selc' = pkgs.writeShellScriptBin "selc'" '' #!/usr/bin/env bash BASE_PATH=$HOME/.config/kubeconfig YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') KUBECONFIG=$(fzf <<<"$YAMLS") export KUBECONFIG=$BASE_PATH/$KUBECONFIG ''; -in { +in +{ home.packages = [ nix-run nix-shell - selc + selc' ]; } diff --git a/modules/home-manager/cli/tools/direnv/default.nix b/modules/home/cli/tools/direnv/default.nix similarity index 100% rename from modules/home-manager/cli/tools/direnv/default.nix rename to modules/home/cli/tools/direnv/default.nix diff --git a/modules/home-manager/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix similarity index 90% rename from modules/home-manager/cli/tools/git/default.nix rename to modules/home/cli/tools/git/default.nix index 50ed62e..301a029 100644 --- a/modules/home-manager/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -2,12 +2,8 @@ pkgs, config, ... -}: let - email = - if config.roles.workdevice - then "raphael.groemmer@stackit.cloud" - else "github@rapsn.me"; -in { +}: +{ home.packages = with pkgs; [ gh ]; @@ -34,7 +30,7 @@ in { settings = { user = { name = "RAPSNX"; - inherit email; + inherit (config.roles) email; }; credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; diff --git a/modules/home-manager/cli/tools/k8s/default.nix b/modules/home/cli/tools/k8s/default.nix similarity index 88% rename from modules/home-manager/cli/tools/k8s/default.nix rename to modules/home/cli/tools/k8s/default.nix index 46e0541..0a15b7b 100644 --- a/modules/home-manager/cli/tools/k8s/default.nix +++ b/modules/home/cli/tools/k8s/default.nix @@ -1,8 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./k9s.nix ./krewfile.nix - ./podman.nix ./kubecolor.nix ]; diff --git a/modules/home-manager/cli/tools/k8s/k9s.nix b/modules/home/cli/tools/k8s/k9s.nix similarity index 92% rename from modules/home-manager/cli/tools/k8s/k9s.nix rename to modules/home/cli/tools/k8s/k9s.nix index bc39590..f513d38 100644 --- a/modules/home-manager/cli/tools/k8s/k9s.nix +++ b/modules/home/cli/tools/k8s/k9s.nix @@ -2,12 +2,13 @@ lib, config, ... -}: let +}: +let defaultPlugins = { edit-secret = { description = "Edit Decoded Secret"; shortCut = "Ctrl-X"; - scopes = ["secrets"]; + scopes = [ "secrets" ]; command = "kubectl"; background = false; args = [ @@ -53,7 +54,7 @@ reconcile-seed = { description = "Reconcile seed"; shortCut = "r"; - scopes = ["managedseeds"]; + scopes = [ "managedseeds" ]; command = "kubectl"; background = true; args = [ @@ -67,7 +68,7 @@ retry-shoot = { description = "Retry shoot operation"; shortCut = "t"; - scopes = ["shoots"]; + scopes = [ "shoots" ]; command = "kubectl"; background = true; args = [ @@ -111,13 +112,12 @@ ]; }; }; -in { +in +{ catppuccin.k9s.enable = true; programs.k9s = { enable = true; - plugins = - defaultPlugins - // lib.optionalAttrs config.roles.workdevice workPlugins; + plugins = defaultPlugins // lib.optionalAttrs config.roles.work workPlugins; }; } diff --git a/modules/home-manager/cli/tools/k8s/krewfile.nix b/modules/home/cli/tools/k8s/krewfile.nix similarity index 100% rename from modules/home-manager/cli/tools/k8s/krewfile.nix rename to modules/home/cli/tools/k8s/krewfile.nix diff --git a/modules/home-manager/cli/tools/k8s/kubecolor.nix b/modules/home/cli/tools/k8s/kubecolor.nix similarity index 100% rename from modules/home-manager/cli/tools/k8s/kubecolor.nix rename to modules/home/cli/tools/k8s/kubecolor.nix diff --git a/modules/home-manager/cli/tools/langs/default.nix b/modules/home/cli/tools/langs/default.nix similarity index 100% rename from modules/home-manager/cli/tools/langs/default.nix rename to modules/home/cli/tools/langs/default.nix diff --git a/modules/home-manager/cli/tools/langs/go.nix b/modules/home/cli/tools/langs/go.nix similarity index 98% rename from modules/home-manager/cli/tools/langs/go.nix rename to modules/home/cli/tools/langs/go.nix index 7af19dd..b2375cd 100644 --- a/modules/home-manager/cli/tools/langs/go.nix +++ b/modules/home/cli/tools/langs/go.nix @@ -2,7 +2,8 @@ pkgs, config, ... -}: { +}: +{ programs.go = { enable = true; package = pkgs.go; diff --git a/modules/home-manager/cli/tools/langs/rust.nix b/modules/home/cli/tools/langs/rust.nix similarity index 51% rename from modules/home-manager/cli/tools/langs/rust.nix rename to modules/home/cli/tools/langs/rust.nix index c8d4517..46983a2 100644 --- a/modules/home-manager/cli/tools/langs/rust.nix +++ b/modules/home/cli/tools/langs/rust.nix @@ -3,12 +3,13 @@ config, lib, ... -}: { - config = lib.mkIf (!config.roles.workdevice) { +}: +{ + config = lib.mkIf (!config.roles.work) { home.packages = with pkgs; [ rustup clang ]; - home.sessionPath = ["$HOME/.cargo/bin"]; + home.sessionPath = [ "$HOME/.cargo/bin" ]; }; } diff --git a/modules/home-manager/cli/tools/lazygit/default.nix b/modules/home/cli/tools/lazygit/default.nix similarity index 94% rename from modules/home-manager/cli/tools/lazygit/default.nix rename to modules/home/cli/tools/lazygit/default.nix index 1a4d65f..6f8cc54 100644 --- a/modules/home-manager/cli/tools/lazygit/default.nix +++ b/modules/home/cli/tools/lazygit/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ catppuccin.lazygit.enable = true; programs.lazygit = { enable = true; diff --git a/modules/home-manager/cli/tools/pet/default.nix b/modules/home/cli/tools/pet/default.nix similarity index 98% rename from modules/home-manager/cli/tools/pet/default.nix rename to modules/home/cli/tools/pet/default.nix index 9648f59..b809047 100644 --- a/modules/home-manager/cli/tools/pet/default.nix +++ b/modules/home/cli/tools/pet/default.nix @@ -2,7 +2,8 @@ lib, inputs, ... -}: { +}: +{ programs.pet = { enable = true; settings = { diff --git a/modules/home-manager/cli/tools/starship/default.nix b/modules/home/cli/tools/starship/default.nix similarity index 91% rename from modules/home-manager/cli/tools/starship/default.nix rename to modules/home/cli/tools/starship/default.nix index e441adf..0196959 100644 --- a/modules/home-manager/cli/tools/starship/default.nix +++ b/modules/home/cli/tools/starship/default.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ catppuccin.starship.enable = true; programs.starship = { @@ -65,7 +66,7 @@ kubernetes = { disabled = false; - detect_env_vars = ["KUBECONFIG"]; + detect_env_vars = [ "KUBECONFIG" ]; format = "[$symbol$context( \\($namespace\\))]($style) "; }; @@ -123,7 +124,11 @@ description = "The currently used proxy"; when = ''test -n "$http_proxy"''; command = ''echo "$http_proxy"''; - shell = ["${lib.getExe pkgs.bash}" "--noprofile" "--norc"]; + shell = [ + "${lib.getExe pkgs.bash}" + "--noprofile" + "--norc" + ]; symbol = "๐Ÿ”€ "; style = "bright-yellow"; format = "[$symbol$output]($style) "; @@ -132,7 +137,11 @@ description = "The currently targeted openstack tenant"; when = ''test -n "$OS_TENANT_NAME"''; command = ''echo "$OS_TENANT_NAME"''; - shell = ["${lib.getExe pkgs.bash}" "--noprofile" "--norc"]; + shell = [ + "${lib.getExe pkgs.bash}" + "--noprofile" + "--norc" + ]; symbol = "โ˜๏ธ "; style = "bright-red"; format = "[$symbol$output]($style) "; diff --git a/modules/home/common/default.nix b/modules/home/common/default.nix new file mode 100644 index 0000000..2a92cbe --- /dev/null +++ b/modules/home/common/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +{ + imports = [ ./roles.nix ]; + + programs.home-manager.enable = true; + xdg.enable = true; + + news = { + display = "silent"; + json = lib.mkForce { }; + entries = lib.mkForce [ ]; + }; + +} diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix new file mode 100644 index 0000000..906aa8f --- /dev/null +++ b/modules/home/common/roles.nix @@ -0,0 +1,9 @@ +{ lib, mylib, ... }: +with lib; +with mylib; +{ + options.roles = with types; { + work = mkEnableOption "Device is used for work."; + email = mkOpt str "Email address of the user."; + }; +} diff --git a/modules/home-manager/desktops/addons/default.nix b/modules/home/desktops/addons/default.nix similarity index 100% rename from modules/home-manager/desktops/addons/default.nix rename to modules/home/desktops/addons/default.nix diff --git a/modules/home-manager/desktops/addons/fuzzel.nix b/modules/home/desktops/addons/fuzzel.nix similarity index 100% rename from modules/home-manager/desktops/addons/fuzzel.nix rename to modules/home/desktops/addons/fuzzel.nix index e05712b..52653e8 100644 --- a/modules/home-manager/desktops/addons/fuzzel.nix +++ b/modules/home/desktops/addons/fuzzel.nix @@ -1,4 +1,4 @@ { - programs.fuzzel.enable = true; catppuccin.fuzzel.enable = true; + programs.fuzzel.enable = true; } diff --git a/modules/home/desktops/addons/gtk.nix b/modules/home/desktops/addons/gtk.nix new file mode 100644 index 0000000..ed57002 --- /dev/null +++ b/modules/home/desktops/addons/gtk.nix @@ -0,0 +1,37 @@ +{ + pkgs, + lib, + ... +}: +{ + gtk = lib.mkForce { + enable = true; + + theme = { + name = "Catppuccin-GTK-Purple-Dark"; + package = pkgs.magnetic-catppuccin-gtk.override { + tweaks = [ "black" ]; + accent = [ "purple" ]; + }; + }; + + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders; + }; + }; + + home = + let + name = "catppuccin-mocha-mauve-cursors"; + size = 35; + in + { + pointerCursor = lib.mkForce { + enable = true; + inherit name size; + package = pkgs.catppuccin-cursors.mochaMauve; + gtk.enable = true; + }; + }; +} diff --git a/modules/home-manager/desktops/addons/qt.nix b/modules/home/desktops/addons/qt.nix similarity index 69% rename from modules/home-manager/desktops/addons/qt.nix rename to modules/home/desktops/addons/qt.nix index 5b78007..1fa4667 100644 --- a/modules/home-manager/desktops/addons/qt.nix +++ b/modules/home/desktops/addons/qt.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ libsForQt5.qtstyleplugin-kvantum (catppuccin-kvantum.override { @@ -11,6 +12,6 @@ }; xdg.configFile."Kvantum/kvantum.kvconfig".source = - (pkgs.formats.ini {}).generate "kvantum.kvconfig" - {General.theme = "Catppuccin-Mocha-Mauve";}; + (pkgs.formats.ini { }).generate "kvantum.kvconfig" + { General.theme = "Catppuccin-Mocha-Mauve"; }; } diff --git a/modules/home-manager/desktops/addons/swaync/default.nix b/modules/home/desktops/addons/swaync/default.nix similarity index 68% rename from modules/home-manager/desktops/addons/swaync/default.nix rename to modules/home/desktops/addons/swaync/default.nix index c5e1ecd..b32dd4f 100644 --- a/modules/home-manager/desktops/addons/swaync/default.nix +++ b/modules/home/desktops/addons/swaync/default.nix @@ -1,6 +1,7 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ # swaynotificationcenter like "dunst" - home.packages = with pkgs; [swaynotificationcenter]; + home.packages = with pkgs; [ swaynotificationcenter ]; xdg.configFile."swaync/style.css".source = ./swaync.css; xdg.configFile."swaync/config.json".source = ./swaync.json; diff --git a/modules/home-manager/desktops/addons/swaync/swaync.css b/modules/home/desktops/addons/swaync/swaync.css similarity index 100% rename from modules/home-manager/desktops/addons/swaync/swaync.css rename to modules/home/desktops/addons/swaync/swaync.css diff --git a/modules/home-manager/desktops/addons/swaync/swaync.json b/modules/home/desktops/addons/swaync/swaync.json similarity index 100% rename from modules/home-manager/desktops/addons/swaync/swaync.json rename to modules/home/desktops/addons/swaync/swaync.json diff --git a/modules/home-manager/desktops/addons/waybar/default.nix b/modules/home/desktops/addons/waybar/default.nix similarity index 100% rename from modules/home-manager/desktops/addons/waybar/default.nix rename to modules/home/desktops/addons/waybar/default.nix diff --git a/modules/home-manager/desktops/addons/waybar/waybar.css b/modules/home/desktops/addons/waybar/waybar.css similarity index 100% rename from modules/home-manager/desktops/addons/waybar/waybar.css rename to modules/home/desktops/addons/waybar/waybar.css diff --git a/modules/home-manager/desktops/addons/waybar/waybar.json b/modules/home/desktops/addons/waybar/waybar.json similarity index 100% rename from modules/home-manager/desktops/addons/waybar/waybar.json rename to modules/home/desktops/addons/waybar/waybar.json diff --git a/modules/home-manager/desktops/addons/wlogout/default.nix b/modules/home/desktops/addons/wlogout/default.nix similarity index 98% rename from modules/home-manager/desktops/addons/wlogout/default.nix rename to modules/home/desktops/addons/wlogout/default.nix index 670b7f7..f5c354c 100644 --- a/modules/home-manager/desktops/addons/wlogout/default.nix +++ b/modules/home/desktops/addons/wlogout/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.wlogout = { enable = true; layout = [ diff --git a/modules/home-manager/desktops/addons/wlogout/icons/hibernate.png b/modules/home/desktops/addons/wlogout/icons/hibernate.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/hibernate.png rename to modules/home/desktops/addons/wlogout/icons/hibernate.png diff --git a/modules/home-manager/desktops/addons/wlogout/icons/lock.png b/modules/home/desktops/addons/wlogout/icons/lock.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/lock.png rename to modules/home/desktops/addons/wlogout/icons/lock.png diff --git a/modules/home-manager/desktops/addons/wlogout/icons/logout.png b/modules/home/desktops/addons/wlogout/icons/logout.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/logout.png rename to modules/home/desktops/addons/wlogout/icons/logout.png diff --git a/modules/home-manager/desktops/addons/wlogout/icons/reboot.png b/modules/home/desktops/addons/wlogout/icons/reboot.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/reboot.png rename to modules/home/desktops/addons/wlogout/icons/reboot.png diff --git a/modules/home-manager/desktops/addons/wlogout/icons/shutdown.png b/modules/home/desktops/addons/wlogout/icons/shutdown.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/shutdown.png rename to modules/home/desktops/addons/wlogout/icons/shutdown.png diff --git a/modules/home-manager/desktops/addons/wlogout/icons/suspend.png b/modules/home/desktops/addons/wlogout/icons/suspend.png similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/icons/suspend.png rename to modules/home/desktops/addons/wlogout/icons/suspend.png diff --git a/modules/home-manager/desktops/addons/wlogout/style.css b/modules/home/desktops/addons/wlogout/style.css similarity index 100% rename from modules/home-manager/desktops/addons/wlogout/style.css rename to modules/home/desktops/addons/wlogout/style.css diff --git a/modules/home-manager/desktops/hyprland/addons/hypridle.nix b/modules/home/desktops/hyprland/addons/hypridle.nix similarity index 96% rename from modules/home-manager/desktops/hyprland/addons/hypridle.nix rename to modules/home/desktops/hyprland/addons/hypridle.nix index 621ff3e..bfc9e24 100644 --- a/modules/home-manager/desktops/hyprland/addons/hypridle.nix +++ b/modules/home/desktops/hyprland/addons/hypridle.nix @@ -3,9 +3,11 @@ config, ... }: -with lib; let +with lib; +let cfg = config.roles.desktop.hyprland.hypridle; -in { +in +{ config = mkIf cfg.enable { services.hypridle = { enable = true; diff --git a/modules/home-manager/desktops/hyprland/addons/hyprlock.nix b/modules/home/desktops/hyprland/addons/hyprlock.nix similarity index 98% rename from modules/home-manager/desktops/hyprland/addons/hyprlock.nix rename to modules/home/desktops/hyprland/addons/hyprlock.nix index aa2cc23..7936eff 100644 --- a/modules/home-manager/desktops/hyprland/addons/hyprlock.nix +++ b/modules/home/desktops/hyprland/addons/hyprlock.nix @@ -4,9 +4,11 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.roles.desktop.hyprland.hyprlock; -in { +in +{ config = mkIf cfg.enable { programs.hyprlock = { enable = true; diff --git a/modules/home-manager/desktops/hyprland/addons/hyprpaper.nix b/modules/home/desktops/hyprland/addons/hyprpaper.nix similarity index 87% rename from modules/home-manager/desktops/hyprland/addons/hyprpaper.nix rename to modules/home/desktops/hyprland/addons/hyprpaper.nix index cadd26b..3604150 100644 --- a/modules/home-manager/desktops/hyprland/addons/hyprpaper.nix +++ b/modules/home/desktops/hyprland/addons/hyprpaper.nix @@ -2,7 +2,8 @@ pkgs, inputs, ... -}: let +}: +let path = "${inputs.self.outPath}/extra/wallpapers"; shuffle-wallpaper = pkgs.writeShellScriptBin "shuffle-wallpaper" '' #!/usr/bin/env bash @@ -21,8 +22,9 @@ hyprctl hyprpaper unload unused done ''; -in { - home.packages = [shuffle-wallpaper]; +in +{ + home.packages = [ shuffle-wallpaper ]; services.hyprpaper = { enable = true; @@ -34,7 +36,7 @@ in { systemd.user.services.set-wallpaper = { Unit = { Description = "set-wallpaper"; - After = ["graphical-session.target"]; + After = [ "graphical-session.target" ]; }; Service = { Type = "oneshot"; @@ -42,7 +44,7 @@ in { Restart = "on-failure"; }; Install = { - WantedBy = ["graphical-session.target"]; + WantedBy = [ "graphical-session.target" ]; }; }; } diff --git a/modules/home-manager/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix similarity index 94% rename from modules/home-manager/desktops/hyprland/default.nix rename to modules/home/desktops/hyprland/default.nix index f44b33b..4e0c5d6 100644 --- a/modules/home-manager/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -48,7 +48,10 @@ in enable = true; config = { common = { - default = ["hyprland" "gtk"]; + default = [ + "hyprland" + "gtk" + ]; }; }; extraPortals = with pkgs; [ diff --git a/modules/home-manager/desktops/hyprland/options.nix b/modules/home/desktops/hyprland/options.nix similarity index 86% rename from modules/home-manager/desktops/hyprland/options.nix rename to modules/home/desktops/hyprland/options.nix index d2dedb6..ca52d3c 100644 --- a/modules/home-manager/desktops/hyprland/options.nix +++ b/modules/home/desktops/hyprland/options.nix @@ -3,7 +3,8 @@ lib, ... }: -with lib; { +with lib; +{ options.roles.desktop.hyprland = { enable = mkEnableOption "Enable hyprland"; @@ -17,7 +18,7 @@ with lib; { hypridle = { enable = mkEnableOption "Enable hypridle"; - cmd = mkOption {type = types.str;}; + cmd = mkOption { type = types.str; }; }; }; } diff --git a/modules/home-manager/desktops/hyprland/settings/autostart.nix b/modules/home/desktops/hyprland/settings/autostart.nix similarity index 97% rename from modules/home-manager/desktops/hyprland/settings/autostart.nix rename to modules/home/desktops/hyprland/settings/autostart.nix index 334d610..2130d40 100644 --- a/modules/home-manager/desktops/hyprland/settings/autostart.nix +++ b/modules/home/desktops/hyprland/settings/autostart.nix @@ -3,9 +3,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { exec-once = [ "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" diff --git a/modules/home-manager/desktops/hyprland/settings/binds.nix b/modules/home/desktops/hyprland/settings/binds.nix similarity index 97% rename from modules/home-manager/desktops/hyprland/settings/binds.nix rename to modules/home/desktops/hyprland/settings/binds.nix index a6a2428..9c6370d 100644 --- a/modules/home-manager/desktops/hyprland/settings/binds.nix +++ b/modules/home/desktops/hyprland/settings/binds.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { bind = [ "SUPER,RETURN, exec, uwsm app -- alacritty" diff --git a/modules/home-manager/desktops/hyprland/settings/global.nix b/modules/home/desktops/hyprland/settings/global.nix similarity index 98% rename from modules/home-manager/desktops/hyprland/settings/global.nix rename to modules/home/desktops/hyprland/settings/global.nix index 4bdad1d..0a10180 100644 --- a/modules/home-manager/desktops/hyprland/settings/global.nix +++ b/modules/home/desktops/hyprland/settings/global.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { general = { gaps_in = 8; diff --git a/modules/home-manager/desktops/hyprland/settings/monitor.nix b/modules/home/desktops/hyprland/settings/monitor.nix similarity index 96% rename from modules/home-manager/desktops/hyprland/settings/monitor.nix rename to modules/home/desktops/hyprland/settings/monitor.nix index 44aade5..4b8731d 100644 --- a/modules/home-manager/desktops/hyprland/settings/monitor.nix +++ b/modules/home/desktops/hyprland/settings/monitor.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { wayland.windowManager.hyprland.settings = { monitor = [ diff --git a/modules/home-manager/desktops/hyprland/settings/windows.nix b/modules/home/desktops/hyprland/settings/windows.nix similarity index 99% rename from modules/home-manager/desktops/hyprland/settings/windows.nix rename to modules/home/desktops/hyprland/settings/windows.nix index de5192d..c148791 100644 --- a/modules/home-manager/desktops/hyprland/settings/windows.nix +++ b/modules/home/desktops/hyprland/settings/windows.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { windowrule = [ # Force floating diff --git a/modules/home-manager/desktops/hyprland/settings/workspaces.nix b/modules/home/desktops/hyprland/settings/workspaces.nix similarity index 99% rename from modules/home-manager/desktops/hyprland/settings/workspaces.nix rename to modules/home/desktops/hyprland/settings/workspaces.nix index 4cde305..69e3f4c 100644 --- a/modules/home-manager/desktops/hyprland/settings/workspaces.nix +++ b/modules/home/desktops/hyprland/settings/workspaces.nix @@ -2,9 +2,11 @@ lib, config, ... -}: let +}: +let cfg = config.roles.desktop.hyprland; -in { +in +{ wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { workspace = [ # Special diff --git a/modules/home-manager/programs/default.nix b/modules/home/programs/default.nix similarity index 100% rename from modules/home-manager/programs/default.nix rename to modules/home/programs/default.nix diff --git a/modules/home-manager/programs/guis/default.nix b/modules/home/programs/guis/default.nix similarity index 93% rename from modules/home-manager/programs/guis/default.nix rename to modules/home/programs/guis/default.nix index 4c797ce..70b6a32 100644 --- a/modules/home-manager/programs/guis/default.nix +++ b/modules/home/programs/guis/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ # Audio pavucontrol diff --git a/modules/home-manager/secrets.yaml b/modules/home/secrets.yaml similarity index 100% rename from modules/home-manager/secrets.yaml rename to modules/home/secrets.yaml diff --git a/modules/home/services/default.nix b/modules/home/services/default.nix new file mode 100644 index 0000000..88b5b36 --- /dev/null +++ b/modules/home/services/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./ssh.nix + ./sops.nix + ./tray.nix + ./keyring.nix + ]; +} diff --git a/modules/home-manager/roles/common/keyring.nix b/modules/home/services/keyring.nix similarity index 60% rename from modules/home-manager/roles/common/keyring.nix rename to modules/home/services/keyring.nix index fecaa2d..e5dc5bd 100644 --- a/modules/home-manager/roles/common/keyring.nix +++ b/modules/home/services/keyring.nix @@ -1,7 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.gnome-keyring = { enable = true; - components = ["pkcs11" "secrets"]; + components = [ + "pkcs11" + "secrets" + ]; }; home.packages = with pkgs; [ gcr diff --git a/modules/home-manager/roles/common/sops.nix b/modules/home/services/sops.nix similarity index 86% rename from modules/home-manager/roles/common/sops.nix rename to modules/home/services/sops.nix index 85a64c1..bab81c7 100644 --- a/modules/home-manager/roles/common/sops.nix +++ b/modules/home/services/sops.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ sops.age = { generateKey = true; keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; diff --git a/modules/home-manager/services/ssh.nix b/modules/home/services/ssh.nix similarity index 90% rename from modules/home-manager/services/ssh.nix rename to modules/home/services/ssh.nix index 13822ed..e2893ba 100644 --- a/modules/home-manager/services/ssh.nix +++ b/modules/home/services/ssh.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ services.ssh-agent.enable = true; sops.secrets.ssh_config = { diff --git a/modules/home-manager/services/tray.nix b/modules/home/services/tray.nix similarity index 100% rename from modules/home-manager/services/tray.nix rename to modules/home/services/tray.nix From e0b6fa2ba7bfc2aca2c48641b1ec34994beb6227 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 16 Dec 2025 11:40:31 +0100 Subject: [PATCH 10/81] Fix issues --- modules/home/desktops/addons/default.nix | 10 --- .../addons/{fuzzel.nix => fuzzel/default.nix} | 0 .../addons/{gtk.nix => gtk/default.nix} | 0 .../addons/{qt.nix => qt/default.nix} | 0 modules/home/desktops/hyprland/default.nix | 66 +----------------- modules/home/desktops/hyprland/hyprland.nix | 68 +++++++++++++++++++ modules/home/desktops/hyprland/options.nix | 24 ------- .../desktops/hyprland/settings/autostart.nix | 1 + 8 files changed, 70 insertions(+), 99 deletions(-) delete mode 100644 modules/home/desktops/addons/default.nix rename modules/home/desktops/addons/{fuzzel.nix => fuzzel/default.nix} (100%) rename modules/home/desktops/addons/{gtk.nix => gtk/default.nix} (100%) rename modules/home/desktops/addons/{qt.nix => qt/default.nix} (100%) create mode 100644 modules/home/desktops/hyprland/hyprland.nix delete mode 100644 modules/home/desktops/hyprland/options.nix diff --git a/modules/home/desktops/addons/default.nix b/modules/home/desktops/addons/default.nix deleted file mode 100644 index 09db5d2..0000000 --- a/modules/home/desktops/addons/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./swaync - ./waybar - ./wlogout - ./qt.nix - ./gtk.nix - ./fuzzel.nix - ]; -} diff --git a/modules/home/desktops/addons/fuzzel.nix b/modules/home/desktops/addons/fuzzel/default.nix similarity index 100% rename from modules/home/desktops/addons/fuzzel.nix rename to modules/home/desktops/addons/fuzzel/default.nix diff --git a/modules/home/desktops/addons/gtk.nix b/modules/home/desktops/addons/gtk/default.nix similarity index 100% rename from modules/home/desktops/addons/gtk.nix rename to modules/home/desktops/addons/gtk/default.nix diff --git a/modules/home/desktops/addons/qt.nix b/modules/home/desktops/addons/qt/default.nix similarity index 100% rename from modules/home/desktops/addons/qt.nix rename to modules/home/desktops/addons/qt/default.nix diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 4e0c5d6..96e5300 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -1,69 +1,5 @@ -{ - pkgs, - lib, - mylib, - config, - ... -}: -with lib; -with mylib; -let - cfg = config.roles.desktop.hyprland; -in { imports = [ - # Addons - ./addons/hyprpaper.nix - ./addons/hyprlock.nix - ./addons/hypridle.nix - - # Settings - ./settings/autostart.nix - ./settings/binds.nix - ./settings/global.nix - ./settings/monitor.nix - ./settings/windows.nix - ./settings/workspaces.nix - - # Module options - ./options.nix + ./hyprland.nix ]; - - config = lib.mkIf cfg.enable { - catppuccin.hyprland.enable = true; - - wayland.windowManager.hyprland = { - enable = true; - inherit (cfg) package; - - systemd.enable = false; # Disable for uswm - }; - - home.packages = with pkgs; [ - hyprland-qtutils - slurp - ]; - - xdg.portal = { - enable = true; - config = { - common = { - default = [ - "hyprland" - "gtk" - ]; - }; - }; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-hyprland - ]; - }; - - # environment.d defines environment variables for the user session, beyond shell level. - # It is processed by `systemd --user`, basically after login. - xdg.configFile."environment.d/envvars.conf".text = '' - PATH="$HOME/.nix-profile/bin:$PATH" - ''; - }; } diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix new file mode 100644 index 0000000..8b38f05 --- /dev/null +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -0,0 +1,68 @@ +{ + pkgs, + lib, + mylib, + config, + ... +}: +with lib; +with mylib; +let + cfg = config.roles.desktop.hyprland; +in +{ + options.roles.desktop.hyprland = { + enable = mkEnableOption "Enable hyprland"; + + package = mkPackageOption pkgs "hyprland" { + nullable = true; + }; + + hyprlock = { + enable = mkEnableOption "Enable hyprlock"; + }; + + hypridle = { + enable = mkEnableOption "Enable hypridle"; + cmd = mkOption { type = types.str; }; + }; + }; + + config = lib.mkIf cfg.enable { + catppuccin.hyprland.enable = true; + + wayland.windowManager.hyprland = { + enable = true; + inherit (cfg) package; + + systemd.enable = false; # Disable for uswm + }; + + home.packages = with pkgs; [ + hyprland-qtutils + slurp + ]; + + xdg.portal = { + enable = true; + config = { + common = { + default = [ + "hyprland" + "gtk" + ]; + }; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-hyprland + ]; + }; + + # environment.d defines environment variables for the user session, beyond shell level. + # It is processed by `systemd --user`, basically after login. + xdg.configFile."environment.d/envvars.conf".text = '' + PATH="$HOME/.nix-profile/bin:$PATH" + ''; + }; +} diff --git a/modules/home/desktops/hyprland/options.nix b/modules/home/desktops/hyprland/options.nix deleted file mode 100644 index ca52d3c..0000000 --- a/modules/home/desktops/hyprland/options.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - pkgs, - lib, - ... -}: -with lib; -{ - options.roles.desktop.hyprland = { - enable = mkEnableOption "Enable hyprland"; - - package = mkPackageOption pkgs "hyprland" { - nullable = true; - }; - - hyprlock = { - enable = mkEnableOption "Enable hyprlock"; - }; - - hypridle = { - enable = mkEnableOption "Enable hypridle"; - cmd = mkOption { type = types.str; }; - }; - }; -} diff --git a/modules/home/desktops/hyprland/settings/autostart.nix b/modules/home/desktops/hyprland/settings/autostart.nix index 2130d40..8bc7a4e 100644 --- a/modules/home/desktops/hyprland/settings/autostart.nix +++ b/modules/home/desktops/hyprland/settings/autostart.nix @@ -10,6 +10,7 @@ in { wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { exec-once = [ + # TODO: Move to own option, build function for uwsm "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "[ workspace special:scratchy silent ] alacritty -t scratchy" "sleep 5 && hyprctl dispatch closewindow class:ZSTray" From c6b4df9273d3fed2f2268f9d789dc1cc7758d4be Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 16 Dec 2025 11:43:21 +0100 Subject: [PATCH 11/81] Config --- flake.nix | 17 ++++---- hosts/firefly/home.nix | 13 ++++++ .../home/desktops/hyprland/settings/extra.nix | 42 +++++++++++++++++++ .../desktops/hyprland/settings/monitor.nix | 15 ++++--- .../desktops/hyprland/settings/windows.nix | 22 ---------- modules/nixos/default.nix | 3 +- 6 files changed, 73 insertions(+), 39 deletions(-) create mode 100644 modules/home/desktops/hyprland/settings/extra.nix diff --git a/flake.nix b/flake.nix index fd46d48..ec62759 100644 --- a/flake.nix +++ b/flake.nix @@ -64,8 +64,11 @@ forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system}); - # nixosModules = [ - # ]; + nixosModules = [ + inputs.catppuccin.nixosModules.catppuccin + (inputs.import-tree.match ".*/default\\.nix" ./modules/nixos) + ./modules/nix.nix + ]; homeModules = [ inputs.catppuccin.homeModules.catppuccin @@ -87,25 +90,25 @@ nixosConfigurations = { # Main workstation zion = nixosSystem { - modules = [ ./hosts/zion ]; + modules = nixosModules ++ [ ./hosts/zion ]; specialArgs = { inherit inputs mylib; }; }; # K3S home-lab kubex = nixosSystem { - modules = [ ./hosts/kubex ]; + modules = nixosModules ++ [ ./hosts/kubex ]; specialArgs = { inherit inputs mylib; }; }; # Raspberry-pi 3 nixberry = nixosSystem { - modules = [ ./hosts/nixberry ]; + modules = nixosModules ++ [ ./hosts/nixberry ]; specialArgs = { inherit inputs mylib; }; }; # ISO multi-tool vinox = nixosSystem { - modules = [ ./hosts/vinox ]; + modules = nixosModules ++ [ ./hosts/vinox ]; specialArgs = { inherit inputs mylib; }; }; }; @@ -113,7 +116,7 @@ homeConfigurations = { # Main workstation "rap@zion" = homeManagerConfiguration { - modules = [ ./hosts/zion/home.nix ]; + modules = homeModules ++ [ ./hosts/zion/home.nix ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs outputs mylib; }; }; diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 1148054..2a63a5c 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -13,6 +13,19 @@ enable = true; package = null; + monitor = [ + "DP-8,highres,auto,auto" + "DP-9,highres,auto,auto" + + "HDMI-A-1,highres,0x0,auto" + "DP-2,highres,auto,auto" + ]; + + extraConfig = '' + bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 1920x1080@60, 0x0, 1" + bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" + ''; + hyprlock.enable = false; hypridle = { enable = true; diff --git a/modules/home/desktops/hyprland/settings/extra.nix b/modules/home/desktops/hyprland/settings/extra.nix new file mode 100644 index 0000000..3958142 --- /dev/null +++ b/modules/home/desktops/hyprland/settings/extra.nix @@ -0,0 +1,42 @@ +{ + config, + lib, + mylib, + ... +}: +with lib; +with mylib; +let + cfg = config.roles.desktop.hyprland; +in +{ + options.roles.desktop.hyprland.extraConfig = with types; mkOpt str "Any hyprland extraConfig."; + + config = { + wayland.windowManager.hyprland = lib.mkIf cfg.enable { + extraConfig = '' + # Resize mouse + bindm = SUPER, mouse:272, movewindow + bindm = SUPER, mouse:273, resizewindow + + # Resize mode + bind = SUPER, R, submap, resize + submap = resize + bind = , H, resizeactive, -60 0 + bind = , J, resizeactive, 0 60 + bind = , K, resizeactive, 0 -60 + bind = , L, resizeactive, 60 0 + + bind = SHIFT, H, resizeactive, -20 0 + bind = SHIFT, J, resizeactive, 0 20 + bind = SHIFT, K, resizeactive, 0 -20 + bind = SHIFT, L, resizeactive, 20 0 + + bind = , return, submap, reset + bind = , escape, submap, reset + submap = reset + '' + + cfg.extraConfig; + }; + }; +} diff --git a/modules/home/desktops/hyprland/settings/monitor.nix b/modules/home/desktops/hyprland/settings/monitor.nix index 4b8731d..8eae350 100644 --- a/modules/home/desktops/hyprland/settings/monitor.nix +++ b/modules/home/desktops/hyprland/settings/monitor.nix @@ -1,21 +1,20 @@ { lib, + mylib, config, ... }: +with lib; +with mylib; let cfg = config.roles.desktop.hyprland; in { - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - wayland.windowManager.hyprland.settings = { - monitor = [ - "DP-8,highres,auto,auto" - "DP-9,highres,auto,auto" + options.roles.desktop.hyprland.monitor = with types; mkOpt (listOf str) "Monitor config as list."; - "DP-2,highres,0x0,auto" - "DP-1,highres,auto,auto" - ]; + config = { + wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { + inherit (cfg) monitor; }; }; } diff --git a/modules/home/desktops/hyprland/settings/windows.nix b/modules/home/desktops/hyprland/settings/windows.nix index c148791..317c9d0 100644 --- a/modules/home/desktops/hyprland/settings/windows.nix +++ b/modules/home/desktops/hyprland/settings/windows.nix @@ -50,27 +50,5 @@ in "SUPER,U, togglefloating," ]; - extraConfig = '' - # Resize mouse - bindm = SUPER, mouse:272, movewindow - bindm = SUPER, mouse:273, resizewindow - - # Resize mode - bind = SUPER, R, submap, resize - submap = resize - bind = , H, resizeactive, -60 0 - bind = , J, resizeactive, 0 60 - bind = , K, resizeactive, 0 -60 - bind = , L, resizeactive, 60 0 - - bind = SHIFT, H, resizeactive, -20 0 - bind = SHIFT, J, resizeactive, 0 20 - bind = SHIFT, K, resizeactive, 0 -20 - bind = SHIFT, L, resizeactive, 20 0 - - bind = , return, submap, reset - bind = , escape, submap, reset - submap = reset - ''; }; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 8c2d291..0b88290 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,7 +1,6 @@ -{inputs, ...}: { +{ imports = [ # modules - inputs.catppuccin.nixosModules.catppuccin # system ./system/boot.nix From 457b7db69e3005edef3384af8537585bd59567c9 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 16 Dec 2025 11:53:01 +0100 Subject: [PATCH 12/81] minor fixes --- modules/home/cli/shells/zsh/default.nix | 2 +- modules/home/cli/tools/custom/shell-scripts.nix | 4 ++-- modules/home/desktops/hyprland/addons/default.nix | 7 +++++++ modules/home/desktops/hyprland/settings/default.nix | 11 +++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 modules/home/desktops/hyprland/addons/default.nix create mode 100644 modules/home/desktops/hyprland/settings/default.nix diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix index 873fd11..15bae9f 100644 --- a/modules/home/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -68,7 +68,7 @@ with lib; k = "kubectl"; kk = "k9s"; kns = "kubectl ns"; - selc = "source selc'"; + selc = "source selc_"; clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; }; diff --git a/modules/home/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix index 9620370..0b39c5e 100644 --- a/modules/home/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -12,7 +12,7 @@ let ''; # kubeconfig selector - selc' = pkgs.writeShellScriptBin "selc'" '' + selc_ = pkgs.writeShellScriptBin "selc_'" '' #!/usr/bin/env bash BASE_PATH=$HOME/.config/kubeconfig YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') @@ -24,6 +24,6 @@ in home.packages = [ nix-run nix-shell - selc' + selc_ ]; } diff --git a/modules/home/desktops/hyprland/addons/default.nix b/modules/home/desktops/hyprland/addons/default.nix new file mode 100644 index 0000000..1fc8eac --- /dev/null +++ b/modules/home/desktops/hyprland/addons/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./hypridle.nix + ./hyprlock.nix + ./hyprpaper.nix + ]; +} diff --git a/modules/home/desktops/hyprland/settings/default.nix b/modules/home/desktops/hyprland/settings/default.nix new file mode 100644 index 0000000..750e364 --- /dev/null +++ b/modules/home/desktops/hyprland/settings/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./binds.nix + ./extra.nix + ./global.nix + ./monitor.nix + ./windows.nix + ./autostart.nix + ./workspaces.nix + ]; +} From 802d84c49ec6a4bb752c28b91e11aa5c3af0c9dc Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 16 Dec 2025 13:17:16 +0100 Subject: [PATCH 13/81] Add home config --- hosts/firefly/home.nix | 16 +++- .../desktops/hyprland/settings/workspaces.nix | 78 +++++++++---------- 2 files changed, 52 insertions(+), 42 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 2a63a5c..8dec87d 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -14,13 +14,23 @@ package = null; monitor = [ - "DP-8,highres,auto,auto" - "DP-9,highres,auto,auto" + "eDP-1,highres,0x0,auto" - "HDMI-A-1,highres,0x0,auto" + # Home monitors + "HDMI-A-1,highres,auto,auto" "DP-2,highres,auto,auto" ]; + workspaces = [ + "1,monitor:DP-2,default:true" + "2,monitor:DP-2" + "3,monitor:DP-2" + "4,monitor:HDMI-A-1,default:true" + "5,monitor:HDMI-A-1" + "6,monitor:HDMI-A-1" + "7,monitor:eDP-1" + ]; + extraConfig = '' bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 1920x1080@60, 0x0, 1" bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" diff --git a/modules/home/desktops/hyprland/settings/workspaces.nix b/modules/home/desktops/hyprland/settings/workspaces.nix index 69e3f4c..72fe05f 100644 --- a/modules/home/desktops/hyprland/settings/workspaces.nix +++ b/modules/home/desktops/hyprland/settings/workspaces.nix @@ -1,54 +1,54 @@ { lib, + mylib, config, ... }: +with lib; +with mylib; let cfg = config.roles.desktop.hyprland; in { - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - workspace = [ - # Special - "special:scratchy" - "special:aux" + options.roles.desktop.hyprland.workspaces = + with types; + mkOpt (listOf str) "Workspace config as list."; - # Assignment work (upper usb-c slot) - "1,monitor:DP-8,default:true" - "2,monitor:DP-8" - "3,monitor:DP-8" - "4,monitor:DP-9,default:true" - "5,monitor:DP-9" - "6,monitor:DP-9" + config = { + wayland.windowManager.hyprland.settings = mkIf cfg.enable { + workspace = [ + # Special + "special:scratchy" + "special:aux" + ] + ++ cfg.workspaces; - "1,monitor:DP-1" - ]; + bind = [ + # Workspace selection + "SUPER,1, workspace, 1" + "SUPER,2, workspace, 2" + "SUPER,3, workspace, 3" + "SUPER,4, workspace, 4" + "SUPER,5, workspace, 5" + "SUPER,6, workspace, 6" + "SUPER,7, workspace, 7" + "SUPER,8, workspace, 8" + "SUPER,9, workspace, 9" - bind = [ - # Workspace selection - "SUPER,1, workspace, 1" - "SUPER,2, workspace, 2" - "SUPER,3, workspace, 3" - "SUPER,4, workspace, 4" - "SUPER,5, workspace, 5" - "SUPER,6, workspace, 6" - "SUPER,7, workspace, 7" - "SUPER,8, workspace, 8" - "SUPER,9, workspace, 9" + # Workspace window movement + "ALT,1, movetoworkspace, 1" + "ALT,2, movetoworkspace, 2" + "ALT,3, movetoworkspace, 3" + "ALT,4, movetoworkspace, 4" + "ALT,5, movetoworkspace, 5" + "ALT,6, movetoworkspace, 6" - # Workspace window movement - "ALT,1, movetoworkspace, 1" - "ALT,2, movetoworkspace, 2" - "ALT,3, movetoworkspace, 3" - "ALT,4, movetoworkspace, 4" - "ALT,5, movetoworkspace, 5" - "ALT,6, movetoworkspace, 6" - - # Special workpace handling - "SUPER,O, togglespecialworkspace, scratchy" - "SUPER,M, togglespecialworkspace, aux" - "SUPER SHIFT,O, movetoworkspace, special:scratchy" - "SUPER SHIFT,M, movetoworkspace, special:aux" - ]; + # Special workpace handling + "SUPER,O, togglespecialworkspace, scratchy" + "SUPER,M, togglespecialworkspace, aux" + "SUPER SHIFT,O, movetoworkspace, special:scratchy" + "SUPER SHIFT,M, movetoworkspace, special:aux" + ]; + }; }; } From 618a207e7d5631c0d60f2aa072e512d07886034a Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 17 Dec 2025 08:53:21 +0100 Subject: [PATCH 14/81] lel --- .../home/desktops/hyprland/addons/default.nix | 7 ----- .../desktops/hyprland/addons/hypridle.nix | 2 +- modules/home/desktops/hyprland/default.nix | 12 ++++++++ .../desktops/hyprland/settings/default.nix | 11 -------- .../desktops/hyprland/settings/monitor.nix | 28 +++++++++++++++++-- .../desktops/hyprland/settings/workspaces.nix | 8 ++---- 6 files changed, 40 insertions(+), 28 deletions(-) delete mode 100644 modules/home/desktops/hyprland/addons/default.nix delete mode 100644 modules/home/desktops/hyprland/settings/default.nix diff --git a/modules/home/desktops/hyprland/addons/default.nix b/modules/home/desktops/hyprland/addons/default.nix deleted file mode 100644 index 1fc8eac..0000000 --- a/modules/home/desktops/hyprland/addons/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./hypridle.nix - ./hyprlock.nix - ./hyprpaper.nix - ]; -} diff --git a/modules/home/desktops/hyprland/addons/hypridle.nix b/modules/home/desktops/hyprland/addons/hypridle.nix index bfc9e24..b0b68fa 100644 --- a/modules/home/desktops/hyprland/addons/hypridle.nix +++ b/modules/home/desktops/hyprland/addons/hypridle.nix @@ -23,7 +23,7 @@ in } # display off { - timeout = 130; + timeout = 3600; on-timeout = "hyprctl dispatch dpms off"; on-resume = "hyprctl dispatch dpms on"; } diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 96e5300..3da6e45 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -1,5 +1,17 @@ { imports = [ ./hyprland.nix + + ./addons/hypridle.nix + ./addons/hyprlock.nix + ./addons/hyprpaper.nix + + ./settings/global.nix + ./settings/binds.nix + ./settings/extra.nix + ./settings/windows.nix + ./settings/autostart.nix + ./settings/workspaces.nix + ./settings/monitor.nix ]; } diff --git a/modules/home/desktops/hyprland/settings/default.nix b/modules/home/desktops/hyprland/settings/default.nix deleted file mode 100644 index 750e364..0000000 --- a/modules/home/desktops/hyprland/settings/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ - ./binds.nix - ./extra.nix - ./global.nix - ./monitor.nix - ./windows.nix - ./autostart.nix - ./workspaces.nix - ]; -} diff --git a/modules/home/desktops/hyprland/settings/monitor.nix b/modules/home/desktops/hyprland/settings/monitor.nix index 8eae350..14b1689 100644 --- a/modules/home/desktops/hyprland/settings/monitor.nix +++ b/modules/home/desktops/hyprland/settings/monitor.nix @@ -6,15 +6,37 @@ }: with lib; with mylib; +with types; let cfg = config.roles.desktop.hyprland; in { - options.roles.desktop.hyprland.monitor = with types; mkOpt (listOf str) "Monitor config as list."; + options.roles.desktop.hyprland.monitors = mkOpt (listOf (submodule { + options = { + name = mkOpt str "Monitor identifier"; + width = mkOpt int "Width in pixel"; + hight = mkOpt int "Hight in pixel"; + hz = mkOpt str "Refresh rate"; + scale = mkOpt float "Scaling factor"; + }; + })) "List of Monitors that are configured in order starting from left to right"; config = { - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - inherit (cfg) monitor; + wayland.windowManager.hyprland.settings = mkIf cfg.enable { + monitor = + (foldl' + (acc: mon: { + pos = builtins.floor (acc.pos + (mon.width / mon.scale)); + result = acc.result ++ [ + "desc:${mon.name},${toString mon.width}x${toString mon.hight},${toString acc.pos}x0,${toString mon.scale}" + ]; + }) + { + pos = 0; + result = [ ]; + } + cfg.monitors + ).result; }; }; } diff --git a/modules/home/desktops/hyprland/settings/workspaces.nix b/modules/home/desktops/hyprland/settings/workspaces.nix index 72fe05f..4d2f4d9 100644 --- a/modules/home/desktops/hyprland/settings/workspaces.nix +++ b/modules/home/desktops/hyprland/settings/workspaces.nix @@ -10,18 +10,13 @@ let cfg = config.roles.desktop.hyprland; in { - options.roles.desktop.hyprland.workspaces = - with types; - mkOpt (listOf str) "Workspace config as list."; - config = { wayland.windowManager.hyprland.settings = mkIf cfg.enable { workspace = [ # Special "special:scratchy" "special:aux" - ] - ++ cfg.workspaces; + ]; bind = [ # Workspace selection @@ -42,6 +37,7 @@ in "ALT,4, movetoworkspace, 4" "ALT,5, movetoworkspace, 5" "ALT,6, movetoworkspace, 6" + "ALT,7, movetoworkspace, 7" # Special workpace handling "SUPER,O, togglespecialworkspace, scratchy" From 801a029a671f3e7e4cdeacb023c53638f650696a Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 18 Dec 2025 10:09:55 +0100 Subject: [PATCH 15/81] update --- hosts/firefly/home.nix | 25 +++++++++++++------ .../desktops/hyprland/settings/monitor.nix | 2 +- .../desktops/hyprland/settings/workspaces.nix | 8 +++++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 8dec87d..7f196d9 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -13,12 +13,22 @@ enable = true; package = null; - monitor = [ - "eDP-1,highres,0x0,auto" - - # Home monitors - "HDMI-A-1,highres,auto,auto" - "DP-2,highres,auto,auto" + monitors = [ + # Monitor are automatically from left to right + { + name = "Samsung Electric Company LC27G7xT H4ZNC00167"; + width = 2560; + hight = 1440; + hz = "144.0"; + scale = 1.0; + } + { + name = "Dell Inc. AW2725Q G2QC174"; + width = 3840; + hight = 2160; + hz = "143.99"; + scale = 1.5; + } ]; workspaces = [ @@ -32,7 +42,8 @@ ]; extraConfig = '' - bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 1920x1080@60, 0x0, 1" + monitor=eDP-1,prefer,auto,1 + bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefer,auto, 1" bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" ''; diff --git a/modules/home/desktops/hyprland/settings/monitor.nix b/modules/home/desktops/hyprland/settings/monitor.nix index 14b1689..41d0c77 100644 --- a/modules/home/desktops/hyprland/settings/monitor.nix +++ b/modules/home/desktops/hyprland/settings/monitor.nix @@ -28,7 +28,7 @@ in (acc: mon: { pos = builtins.floor (acc.pos + (mon.width / mon.scale)); result = acc.result ++ [ - "desc:${mon.name},${toString mon.width}x${toString mon.hight},${toString acc.pos}x0,${toString mon.scale}" + "desc:${mon.name},${toString mon.width}x${toString mon.hight}@${toString mon.hz},${toString acc.pos}x0,${toString mon.scale}" ]; }) { diff --git a/modules/home/desktops/hyprland/settings/workspaces.nix b/modules/home/desktops/hyprland/settings/workspaces.nix index 4d2f4d9..a1df66d 100644 --- a/modules/home/desktops/hyprland/settings/workspaces.nix +++ b/modules/home/desktops/hyprland/settings/workspaces.nix @@ -10,13 +10,18 @@ let cfg = config.roles.desktop.hyprland; in { + options.roles.desktop.hyprland.workspaces = + with types; + mkOpt (listOf str) "Workspace config as list."; + config = { wayland.windowManager.hyprland.settings = mkIf cfg.enable { workspace = [ # Special "special:scratchy" "special:aux" - ]; + ] + ++ cfg.workspaces; bind = [ # Workspace selection @@ -38,6 +43,7 @@ in "ALT,5, movetoworkspace, 5" "ALT,6, movetoworkspace, 6" "ALT,7, movetoworkspace, 7" + "ALT,8, movetoworkspace, 8" # Special workpace handling "SUPER,O, togglespecialworkspace, scratchy" From f002b041c869f35d7118d8af5ab441b28a7e76dc Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 20 Dec 2025 23:01:22 +0100 Subject: [PATCH 16/81] setup nixos and improve hyprpaper --- flake.nix | 6 +- hosts/firefly/home.nix | 4 ++ hosts/zion/default.nix | 10 ++-- hosts/zion/home.nix | 44 ++++++++++++--- modules/home/cli/shells/zsh/default.nix | 2 +- .../desktops/hyprland/addons/hyprpaper.nix | 56 +++++-------------- .../desktops/hyprland/settings/autostart.nix | 2 - modules/nixos/default.nix | 31 ---------- modules/nixos/services/default.nix | 11 ++++ modules/nixos/system/default.nix | 8 +++ modules/nixos/system/user.nix | 2 + 11 files changed, 84 insertions(+), 92 deletions(-) delete mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/services/default.nix create mode 100644 modules/nixos/system/default.nix diff --git a/flake.nix b/flake.nix index ec62759..b805657 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,6 @@ ... }: let - inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; mylib = import ./lib { inherit lib; }; @@ -84,6 +83,7 @@ inherit lib; formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); + devShells = forAllSystems (pkgs: import ./dev-shells.nix { inherit pkgs pre-commit-hooks; }); packages = forAllSystems (pkgs: import ./packages { inherit pkgs; }); @@ -118,14 +118,14 @@ "rap@zion" = homeManagerConfiguration { modules = homeModules ++ [ ./hosts/zion/home.nix ]; pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; + extraSpecialArgs = { inherit inputs self mylib; }; }; # Firefly workmachine "rapsn@firefly" = homeManagerConfiguration { modules = homeModules ++ [ ./hosts/firefly/home.nix ]; pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; + extraSpecialArgs = { inherit inputs self mylib; }; }; }; }; diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 7f196d9..5876b73 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -43,8 +43,12 @@ extraConfig = '' monitor=eDP-1,prefer,auto,1 + bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefer,auto, 1" bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" + + exec-once = sleep 5 && uwsm app -- mumble --tray + exec-once = sleep 5 && hyprctl dispatch closewindow class:ZSTray ''; hyprlock.enable = false; diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index f20b543..f736d02 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -1,7 +1,7 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./hardware-configuration.nix - ../../modules/nixos ]; # Host specific configuration @@ -9,7 +9,7 @@ boot = { enable = true; armSupport = true; - supportedFilesystems = ["ntfs"]; + supportedFilesystems = [ "ntfs" ]; }; user = { @@ -21,7 +21,7 @@ extraOptions = { initialHashedPassword = "$y$j9T$DZQaaK3xGqarN8KE8qnw..$dvgiS7dso5LboGRRf0dcyct/LQUFp4J0LUo2ZRRdTr8"; }; - keys = []; + keys = [ ]; }; services = { @@ -53,7 +53,7 @@ }; environment = { - systemPackages = with pkgs; [qt6.qtwayland]; + systemPackages = with pkgs; [ qt6.qtwayland ]; sessionVariables = { WLR_NO_HARDWARE_CURSORS = "1"; diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index 4a1be8f..a60c5da 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -2,22 +2,50 @@ lib, pkgs, ... -}: { - imports = [ - ../../modules/home-manager - ]; - +}: +{ roles = { - workdevice = false; + work = false; + email = "mail@rapsn.me"; desktop.hyprland = { enable = true; package = pkgs.hyprland; - hyprlock.enable = true; + monitors = [ + # Monitor are automatically from left to right + { + name = "Samsung Electric Company LC27G7xT H4ZNC00167"; + width = 2560; + hight = 1440; + hz = "144.0"; + scale = 1.0; + } + { + name = "Dell Inc. AW2725Q G2QC174"; + width = 3840; + hight = 2160; + hz = "143.99"; + scale = 1.5; + } + ]; + + workspaces = [ + "1,monitor:DP-1,default:true" + "2,monitor:DP-1" + "3,monitor:DP-1" + "4,monitor:DP-2,default:true" + "5,monitor:DP-2" + "6,monitor:DP-2" + "7,monitor:eDP-1" + ]; + + extraConfig = ''''; + + hyprlock.enable = false; hypridle = { enable = true; - cmd = "hyprlock"; + cmd = "${pkgs.hyprlock}/bin/hyprlock"; }; }; }; diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix index 15bae9f..6b02d5d 100644 --- a/modules/home/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -66,7 +66,7 @@ with lib; o = "openstack"; k = "kubectl"; - kk = "k9s"; + kk = "k9s -c pods"; kns = "kubectl ns"; selc = "source selc_"; diff --git a/modules/home/desktops/hyprland/addons/hyprpaper.nix b/modules/home/desktops/hyprland/addons/hyprpaper.nix index 3604150..5583727 100644 --- a/modules/home/desktops/hyprland/addons/hyprpaper.nix +++ b/modules/home/desktops/hyprland/addons/hyprpaper.nix @@ -1,50 +1,22 @@ { - pkgs, - inputs, + self, ... }: -let - path = "${inputs.self.outPath}/extra/wallpapers"; - shuffle-wallpaper = pkgs.writeShellScriptBin "shuffle-wallpaper" '' - #!/usr/bin/env bash - - WALLPAPER_PATH="${path}" - readarray -t MONITORS < <(hyprctl monitors -j | jq -r '.[].name') - COUNT=''${#MONITORS[@]} - - readarray -t PAPERS < <(find "$WALLPAPER_PATH" -type f | shuf -n "$COUNT") - - for ((i = 0; i < COUNT; i++)); do - MON="''${MONITORS[i]}" - PAPER="''${PAPERS[i]}" - hyprctl hyprpaper preload "$PAPER" - hyprctl hyprpaper wallpaper "$MON,$PAPER" - hyprctl hyprpaper unload unused - done - ''; -in { - home.packages = [ shuffle-wallpaper ]; + services.hyprpaper = + let + papersDir = "${self.outPath}/extra/wallpapers"; + papers = builtins.attrNames (builtins.readDir papersDir); + paperPaths = map (paper: "${papersDir}/${paper}") papers; + in + { + enable = true; + settings = { + splash = false; - services.hyprpaper = { - enable = true; - settings = { - splash = false; - }; - }; + preload = paperPaths; - systemd.user.services.set-wallpaper = { - Unit = { - Description = "set-wallpaper"; - After = [ "graphical-session.target" ]; - }; - Service = { - Type = "oneshot"; - ExecStart = "${shuffle-wallpaper}/bin/shuffle-wallpaper"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "graphical-session.target" ]; + wallpaper = map (p: ",${p}") paperPaths; + }; }; - }; } diff --git a/modules/home/desktops/hyprland/settings/autostart.nix b/modules/home/desktops/hyprland/settings/autostart.nix index 8bc7a4e..0f54578 100644 --- a/modules/home/desktops/hyprland/settings/autostart.nix +++ b/modules/home/desktops/hyprland/settings/autostart.nix @@ -13,8 +13,6 @@ in # TODO: Move to own option, build function for uwsm "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "[ workspace special:scratchy silent ] alacritty -t scratchy" - "sleep 5 && hyprctl dispatch closewindow class:ZSTray" - "sleep 5 && uwsm app -- mumble --tray" ]; }; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix deleted file mode 100644 index 0b88290..0000000 --- a/modules/nixos/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - imports = [ - # modules - - # system - ./system/boot.nix - ./system/env.nix - ./system/user.nix - ./system/locale.nix - - # services - ./services/sound.nix - ./services/bluetooth.nix - ./services/printer.nix - ./services/opengl.nix - ./services/nh.nix - ./services/podman.nix - ./services/tailscale.nix - - # roles - ./roles/k3s - ./roles/desktop - ./roles/gaming - - # global nix config - ../nix.nix - ]; - - nix.optimise.automatic = true; - system.stateVersion = "24.11"; -} diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix new file mode 100644 index 0000000..3f00e11 --- /dev/null +++ b/modules/nixos/services/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./nh.nix + ./sound.nix + ./opengl.nix + ./podman.nix + ./tailscale.nix + ./printer.nix + ./bluetooth.nix + ]; +} diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix new file mode 100644 index 0000000..692b8b6 --- /dev/null +++ b/modules/nixos/system/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./env.nix + ./boot.nix + ./user.nix + ./locale.nix + ]; +} diff --git a/modules/nixos/system/user.nix b/modules/nixos/system/user.nix index d754374..10c1fc1 100644 --- a/modules/nixos/system/user.nix +++ b/modules/nixos/system/user.nix @@ -45,5 +45,7 @@ in "/share/xdg-desktop-portal" ]; services.openssh.enable = true; + nix.optimise.automatic = true; + system.stateVersion = "24.11"; }; } From 667b28fe7ac61d7e51c6ba1abb96ad47af511067 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 20 Dec 2025 23:08:12 +0100 Subject: [PATCH 17/81] add zshrc role --- hosts/firefly/home.nix | 7 + modules/home/cli/shells/zsh/default.nix | 167 ++++++++++++------------ 2 files changed, 93 insertions(+), 81 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 5876b73..a839399 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -57,6 +57,13 @@ cmd = "${config.home.homeDirectory}/Projects/swaywm/swaylock/build/swaylock"; }; }; + cli = { + zsh.zshrc = '' + [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) + source <(gardenctl completion zsh) + eval $(gardenctl kubectl-env zsh) + ''; + }; }; home.packages = with pkgs; [ diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix index 6b02d5d..c9b1088 100644 --- a/modules/home/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -1,102 +1,107 @@ { pkgs, lib, + mylib, config, ... }: with lib; +with mylib; +with types; { - home.packages = [ pkgs.zsh-completions ]; + options.roles.cli.zsh.zshrc = mkOpt' str "" "Extra content for zshrc"; - catppuccin.zsh-syntax-highlighting.enable = true; + config = { + home.packages = [ pkgs.zsh-completions ]; - programs.zsh = { - enable = true; + catppuccin.zsh-syntax-highlighting.enable = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - autocd = true; - dotDir = "${config.home.homeDirectory}/.config/zsh"; + programs.zsh = { + enable = true; - enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + autocd = true; + dotDir = "${config.home.homeDirectory}/.config/zsh"; - sessionVariables = { - EDITOR = "vim"; - VISUAL = "vim"; + enableCompletion = true; - # disable highlight of history-substring-search - HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND = ""; - }; + sessionVariables = { + EDITOR = "vim"; + VISUAL = "vim"; - history = { - expireDuplicatesFirst = true; - ignoreDups = true; - ignoreSpace = true; - save = 1000000000; - size = 1000000000; - share = true; - }; + # disable highlight of history-substring-search + HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND = ""; + }; - initContent = mkMerge [ - (mkOrder 500 '''') - (mkOrder 1000 '' - [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) - source <(gardenctl completion zsh) - eval $(gardenctl kubectl-env zsh) - '') - (mkOrder 1500 '''') - ]; - - shellAliases = { - # Overwrites - cat = "bat"; - ls = "exa --icons"; - ll = "exa --icons -la"; - cd = "z"; - j = "z"; - n = "nix-shell -p"; - - # Shortcuts - clr = "clear"; - tf = "terraform"; - - g = "gardenctl"; - gtcp = "gardenctl target control-plane"; - gos = "eval $(gardenctl provider-env zsh)"; - o = "openstack"; - - k = "kubectl"; - kk = "k9s -c pods"; - kns = "kubectl ns"; - selc = "source selc_"; - - clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; - }; + history = { + expireDuplicatesFirst = true; + ignoreDups = true; + ignoreSpace = true; + save = 1000000000; + size = 1000000000; + share = true; + }; - oh-my-zsh = { - enable = true; - plugins = [ - "git" - "kubectl" + initContent = mkMerge [ + (mkOrder 500 '''') + (mkOrder 1000 '' + ${config.roles.cli.zsh.zshrc} + '') + (mkOrder 1500 '''') ]; - }; - plugins = with pkgs; [ - { - name = "zsh-autopair"; - src = fetchFromGitHub { - owner = "hlissner"; - repo = "zsh-autopair"; - rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; - sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"; - }; - file = "autopair.zsh"; - } - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = "${zsh-nix-shell}/share/zsh-nix-shell"; - } - ]; + shellAliases = { + # Overwrites + cat = "bat"; + ls = "exa --icons"; + ll = "exa --icons -la"; + cd = "z"; + j = "z"; + n = "nix-shell -p"; + + # Shortcuts + clr = "clear"; + tf = "terraform"; + + g = "gardenctl"; + gtcp = "gardenctl target control-plane"; + gos = "eval $(gardenctl provider-env zsh)"; + o = "openstack"; + + k = "kubectl"; + kk = "k9s -c pods"; + kns = "kubectl ns"; + selc = "source selc_"; + + clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; + }; + + oh-my-zsh = { + enable = true; + plugins = [ + "git" + "kubectl" + ]; + }; + + plugins = with pkgs; [ + { + name = "zsh-autopair"; + src = fetchFromGitHub { + owner = "hlissner"; + repo = "zsh-autopair"; + rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; + sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"; + }; + file = "autopair.zsh"; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = "${zsh-nix-shell}/share/zsh-nix-shell"; + } + ]; + }; }; } From 79cfc1a33b22b3d6c21b58010a81e343a635e185 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 19 Dec 2025 11:13:30 +0100 Subject: [PATCH 18/81] lel --- modules/home/cli/tools/custom/shell-scripts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix index 0b39c5e..354a847 100644 --- a/modules/home/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -12,7 +12,7 @@ let ''; # kubeconfig selector - selc_ = pkgs.writeShellScriptBin "selc_'" '' + selc_ = pkgs.writeShellScriptBin "selc_" '' #!/usr/bin/env bash BASE_PATH=$HOME/.config/kubeconfig YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') From 65fed944f0c94713c03cae6564cc36f7809d65fe Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 29 Dec 2025 13:13:02 +0100 Subject: [PATCH 19/81] git config --- modules/home/cli/tools/git/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/home/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix index 301a029..20a7f98 100644 --- a/modules/home/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -63,6 +63,12 @@ user.email = "github@rapsn.me"; }; } + { + condition = "gitdir:~/Projects/schwarzit/**"; + contents = { + user.name = "Raphael Groemmer"; + }; + } ]; }; delta = { From e3d87040d3d54fd8f7fc5a5c283dd559fea6c919 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 30 Dec 2025 12:34:37 +0100 Subject: [PATCH 20/81] use two layouts --- modules/home/desktops/hyprland/settings/global.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/desktops/hyprland/settings/global.nix b/modules/home/desktops/hyprland/settings/global.nix index 0a10180..a49bd20 100644 --- a/modules/home/desktops/hyprland/settings/global.nix +++ b/modules/home/desktops/hyprland/settings/global.nix @@ -21,7 +21,8 @@ in }; input = { - kb_layout = "eu"; + kb_layout = "eu,de"; + kb_variant = ",neo_qwertz"; repeat_rate = 45; repeat_delay = 150; accel_profile = "flat"; From 22fcfcdb18baedb334164af1d9ea72a94938375c Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 30 Dec 2025 13:04:50 +0100 Subject: [PATCH 21/81] Update docs --- .sops.yaml | 2 +- docs/structure.md | 28 ++++++++++++++++++++++++++++ docs/style.md | 43 ------------------------------------------- 3 files changed, 29 insertions(+), 44 deletions(-) create mode 100644 docs/structure.md delete mode 100644 docs/style.md diff --git a/.sops.yaml b/.sops.yaml index 41b45eb..201a93c 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -4,7 +4,7 @@ keys: - &kubex age1qmfyk82lve992tvzw82d4dgr3ek77xx9m7uez3uq55mgqu6r5eys40evkr - &firefly age13ps3kkzfn3eyaqc50reudytr5ws80ssamzh09kj6878a6lgxususuu58wp creation_rules: - - path_regex: modules/home-manager/common/secrets.yaml$ + - path_regex: modules/home/secrets.yaml$ key_groups: - age: - *rap_zion diff --git a/docs/structure.md b/docs/structure.md new file mode 100644 index 0000000..7176788 --- /dev/null +++ b/docs/structure.md @@ -0,0 +1,28 @@ +## ๐Ÿ›๏ธ Structure + +### `flake.nix` +- `NixOS` and `HomeManager` configurations. + +### `devshells.nix` +- `devShells` to provide `git-commit-hooks` for: + - Leverage git-commit-hooks with enforce of lint, fmt & code checking. + - Shell environment with all tools needed to switch, build & run the `flake`. + +### `hosts/*` +- All devices using nix, with the host specific module configuration: + - `default.nix` entrypoint and config for all `NixOS` modules, usually imports the `hardware-configuration.nix`. + - `home.nix`entrypoint and config for all `home-manager` modules. + +### `modules` +- All modules for `home-manager` and `NixOS` + +**Module structure** + +- It defines a `option` and `config` for it. +- Every module has a `default.nix` which imports all module related files. + + +### `extra/` + +Configuration or backup files mostly not directly related to `nix`. + diff --git a/docs/style.md b/docs/style.md deleted file mode 100644 index 52f1cc1..0000000 --- a/docs/style.md +++ /dev/null @@ -1,43 +0,0 @@ -## ๐Ÿ›๏ธ Structure - -# TODO: Update this completly - -- **`flake.nix`** Entrypoint to all: - - `NixOS` configurations. - - `HomeManager` configurations. - - `devShells` to provide `nix develop` environment. (see `shell.nix`) - - `formatter`. -- **`shell.nix`** Shell config for `nix develop` environment. - - Leverage git-commit-hooks with enforce of lint, fmt & code checking. - - Shell environment with all tools needed to switch, build & run the `flake`. -- **`hosts/`** All physical machines managed by `NixOS`. -- **`nixos`** Modules for `NixOS` separated into: - - `common/` **default** configurations for all `hosts`. - - `*` optional to import. -- **`home-manager`** Entrypoint for all `home-configurations` per `host`. - - `common/` contains configuration defaults valid for all `home-configurations`. - - `*/` contains `NixOS` modules, optional to import. -- `isos/` Configuration for all `NixOS` configurations which build images. -- `extra/` Configuration or backup files mostly not directly related to `nix`. -- `nix.nix` Nix & nixpkgs configuration for `NixOS` & `HomeManager`. - -## ๐Ÿ“œ Rules - -- **`Host`** - - โš–๏ธ Every `hosts` entrypoint is a `default.nix`. - - โš–๏ธ It imports all `NixOS` modules as `path`. - - โš–๏ธ Define *host specific configuration* - - โš–๏ธ Imports `hardware-configuration.nix` - - May has a `disko.nix` configuration to configure `filsystems`. -- **`Home-manager`** - - โš–๏ธ Every `host` has its own entrypoint at toplevel. - - โš–๏ธ Every `host` entrypoint is a file with the host name which: - - Imports all `Home` configuration for this `host`. - - Defines **host specific configuration** - - -// TODO: Define structure -- `Module` design - - `option.nix` - - `default.nix` - - `imports = []` From ce216db61d11766c2149af190c85486397d426ea Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 10 Jan 2026 17:14:31 +0100 Subject: [PATCH 22/81] gardenctl and apparmor stuff --- flake.lock | 128 +++++++++--------- hosts/firefly/home.nix | 5 + hosts/vinox/installer.nix | 8 +- modules/home/browsers/chromium/default.nix | 6 +- .../home/cli/tools/custom/shell-scripts.nix | 3 - modules/home/common/roles.nix | 38 +++++- modules/home/programs/guis/default.nix | 5 +- modules/nixos/roles/k3s/default.nix | 10 +- packages/gardenctl/default.nix | 16 +-- packages/gardenlogin/default.nix | 9 +- 10 files changed, 134 insertions(+), 94 deletions(-) diff --git a/flake.lock b/flake.lock index 6d5168f..abddc86 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1764714051, - "narHash": "sha256-AjcMlM3UoavFoLzr0YrcvsIxALShjyvwe+o7ikibpCM=", + "lastModified": 1767024902, + "narHash": "sha256-sMdk6QkMDhIOnvULXKUM8WW8iyi551SWw2i6KQHbrrU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a43bedcceced5c21ad36578ed823e6099af78214", + "rev": "b8a0c5ba5a9fbd2c660be7dd98bdde0ff3798556", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1765485905, - "narHash": "sha256-fk6zFzzcwz6su99K7UTxS2497+z/Cdk3FzNsacsmZKA=", + "lastModified": 1767750947, + "narHash": "sha256-zqe9esphlAFu19TGL/nAyOHyOiR+Vu8M2IWWLg9cm4U=", "owner": "catppuccin", "repo": "nix", - "rev": "b49c675acd80931fc8b54290920a90189b461dcf", + "rev": "e7135074fe2a3d17bee3c229b5a7d3da26f76ce8", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1765794845, - "narHash": "sha256-YD5QWlGnusNbZCqR3pxG8tRxx9yUXayLZfAJRWspq2s=", + "lastModified": 1766150702, + "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", "owner": "nix-community", "repo": "disko", - "rev": "7194cfe5b7a3660726b0fe7296070eaef601cae9", + "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", "type": "github" }, "original": { @@ -74,15 +74,15 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -106,15 +106,15 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1765823531, - "narHash": "sha256-tyNJjd48hfgsyEfsq1Ueufg4oJv6b8xBA6NYRJrLPyg=", + "lastModified": 1767738364, + "narHash": "sha256-rmAerMcKMYusVs5B88RAKAYUiENrO+d4bjvpQkkaaks=", "owner": "nix-community", "repo": "home-manager", - "rev": "8315c1544f383b791a3115c9959d1f27920e8320", + "rev": "4e8b7bef66c60735982369f3151b93e62fe37da7", "type": "github" }, "original": { @@ -289,11 +289,11 @@ ] }, "locked": { - "lastModified": 1763733840, - "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", + "lastModified": 1766946335, + "narHash": "sha256-MRD+Jr2bY11MzNDfenENhiK6pvN+nHygxdHoHbZ1HtE=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", + "rev": "4af02a3925b454deb1c36603843da528b67ded6c", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1765837153, - "narHash": "sha256-FLJNXQLl/qL2LSCwW493eOSja4IxfR0wAF/0KnwXZS4=", + "lastModified": 1767706705, + "narHash": "sha256-dhZmvfNxhLUg/6wFXhc5hXvbemoI0E5S0Gnbu6vc4yY=", "owner": "hyprwm", "repo": "hyprland", - "rev": "6e09eb2e6cc1744687f158f2a576de844be59f4e", + "rev": "f1652b295130fd241bd3a6505908d6db562fdcf1", "type": "github" }, "original": { @@ -367,11 +367,11 @@ ] }, "locked": { - "lastModified": 1764812575, - "narHash": "sha256-1bK1yGgaR82vajUrt6z+BSljQvFn91D74WJ/vJsydtE=", + "lastModified": 1767023960, + "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "fd321368a40c782cfa299991e5584ca338e36ebe", + "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", "type": "github" }, "original": { @@ -392,11 +392,11 @@ ] }, "locked": { - "lastModified": 1759610243, - "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "lastModified": 1765214753, + "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", "type": "github" }, "original": { @@ -498,11 +498,11 @@ ] }, "locked": { - "lastModified": 1764962281, - "narHash": "sha256-rGbEMhTTyTzw4iyz45lch5kXseqnqcEpmrHdy+zHsfo=", + "lastModified": 1766253372, + "narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "fe686486ac867a1a24f99c753bb40ffed338e4b0", + "rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9", "type": "github" }, "original": { @@ -552,11 +552,11 @@ ] }, "locked": { - "lastModified": 1764872015, - "narHash": "sha256-INI9AVrQG5nJZFvGPSiUZ9FEUZJLfGdsqjF1QSak7Gc=", + "lastModified": 1767473322, + "narHash": "sha256-RGOeG+wQHeJ6BKcsSB8r0ZU77g9mDvoQzoTKj2dFHwA=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "7997451dcaab7b9d9d442f18985d514ec5891608", + "rev": "d5e7d6b49fe780353c1cf9a1cf39fa8970bd9d11", "type": "github" }, "original": { @@ -588,11 +588,11 @@ ] }, "locked": { - "lastModified": 1739869900, - "narHash": "sha256-UPvzdmbQloXkQprO5EsWhsV7vg6+PyC60NNctduLznA=", + "lastModified": 1767002854, + "narHash": "sha256-4PE60B0aZQyT1MCf6fCLwI6uAk3vYpjuR6I/3XZsy6o=", "owner": "brumhard", "repo": "krewfile", - "rev": "ba420832d80b673aff278972065b4fdb7d64a106", + "rev": "dc1e6ebe5c5d4b81cfd6239f8451d5e8090bc6f9", "type": "github" }, "original": { @@ -608,11 +608,11 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1765833763, - "narHash": "sha256-MjVgnWPOXK8HR1LATNi0QTDkYg76zU+g6NQPddq1LRY=", + "lastModified": 1767094456, + "narHash": "sha256-bqiU/tWAVfzFFuugfKaIVa9ChY7lJFcI2UhYXcj54Q4=", "owner": "rgroemmer", "repo": "neonix", - "rev": "b8e535115138d533cebd0b7ef79c5ff53ee60829", + "rev": "f2123f4531210e4fd29ae586598736edaa19e8e9", "type": "github" }, "original": { @@ -623,11 +623,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1764440730, - "narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=", + "lastModified": 1767185284, + "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3", + "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "type": "github" }, "original": { @@ -639,11 +639,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763966396, - "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", + "lastModified": 1767116409, + "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "rev": "cad22e7d996aea55ecab064e84834289143e44a0", "type": "github" }, "original": { @@ -671,11 +671,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1767640445, + "narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", + "rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5", "type": "github" }, "original": { @@ -718,11 +718,11 @@ ] }, "locked": { - "lastModified": 1765016596, - "narHash": "sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ=", + "lastModified": 1767281941, + "narHash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", + "rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa", "type": "github" }, "original": { @@ -763,11 +763,11 @@ ] }, "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", + "lastModified": 1767281941, + "narHash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", + "rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa", "type": "github" }, "original": { @@ -798,11 +798,11 @@ ] }, "locked": { - "lastModified": 1765836173, - "narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=", + "lastModified": 1767499857, + "narHash": "sha256-0zUU/PW09d6oBaR8x8vMHcAhg1MOvo3CwoXgHijzzNE=", "owner": "mic92", "repo": "sops-nix", - "rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63", + "rev": "ecc41505948ec2ab0325f14c9862a4329c2b4190", "type": "github" }, "original": { diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index a839399..caf6f26 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -9,6 +9,11 @@ work = true; email = "raphael.groemmer@stackit.cloud"; + apparmor-gen = with pkgs; [ + config.programs.chromium.finalPackage + obsidian + ]; + desktop.hyprland = { enable = true; package = null; diff --git a/hosts/vinox/installer.nix b/hosts/vinox/installer.nix index 601f0c1..1a25a0c 100644 --- a/hosts/vinox/installer.nix +++ b/hosts/vinox/installer.nix @@ -1,7 +1,6 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let dot = pkgs.writeShellScriptBin "dot" '' - #!/usr/bin/env bash - # Cleanup rm -rf dotfiles set -euo pipefail @@ -37,7 +36,8 @@ gum style --foreground 124 --bold --align left 'Knock, knock, Neo.' && sleep 1 reboot ''; -in { +in +{ environment.systemPackages = with pkgs; [ dot # My interactive installer gum diff --git a/modules/home/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix index 66fe3f3..25e3a51 100644 --- a/modules/home/browsers/chromium/default.nix +++ b/modules/home/browsers/chromium/default.nix @@ -1,4 +1,7 @@ -{ pkgs, ... }: +{ + pkgs, + ... +}: { programs.chromium = { enable = true; @@ -11,4 +14,5 @@ "--disable-features=WaylandWpColorManagerV1" ]; }; + } diff --git a/modules/home/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix index 354a847..008e84f 100644 --- a/modules/home/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -2,18 +2,15 @@ let # nix helpers nix-run = pkgs.writeShellScriptBin "nr" '' - #!/usr/bin/env bash nix run $(printf 'nixpkgs#%s ' "$@") ''; nix-shell = pkgs.writeShellScriptBin "ns" '' - #!/usr/bin/env bash nix shell $(printf 'nixpkgs#%s ' "$@") ''; # kubeconfig selector selc_ = pkgs.writeShellScriptBin "selc_" '' - #!/usr/bin/env bash BASE_PATH=$HOME/.config/kubeconfig YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') KUBECONFIG=$(fzf <<<"$YAMLS") diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix index 906aa8f..839b587 100644 --- a/modules/home/common/roles.nix +++ b/modules/home/common/roles.nix @@ -1,9 +1,43 @@ -{ lib, mylib, ... }: +{ + lib, + mylib, + pkgs, + config, + ... +}: with lib; with mylib; +with types; { - options.roles = with types; { + options.roles = { work = mkEnableOption "Device is used for work."; email = mkOpt str "Email address of the user."; + + apparmor-gen = mkOpt' (listOf package) [ ] "List of packages to create apparmor rule for userns."; }; + + config = + let + apparmorRuleGen = app: path: '' + cat </etc/apparmor.d/${app}-nix + # Warning this is auto-generated apparmor profile via nix. + abi , + include + + profile ${app}-nix ${path} flags=(unconfined) { + userns, + } + EOF + ''; + + apparmorProfilesGen = strings.concatStrings ( + (map (pkg: apparmorRuleGen pkg.pname (lib.getExe pkg)) config.roles.apparmor-gen) + ++ [ "sudo systemctl reload apparmor" ] + ); + in + mkIf (config.roles.apparmor-gen != [ ]) { + home.activation.apparmor-gen = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run warnEcho "sudo ${pkgs.writeShellScript "apparmor-gen" apparmorProfilesGen}" + ''; + }; } diff --git a/modules/home/programs/guis/default.nix b/modules/home/programs/guis/default.nix index 70b6a32..e4a4ff9 100644 --- a/modules/home/programs/guis/default.nix +++ b/modules/home/programs/guis/default.nix @@ -17,6 +17,9 @@ gnome-disk-utility # Explorer - xfce.thunar + thunar + + # Note taking + obsidian ]; } diff --git a/modules/nixos/roles/k3s/default.nix b/modules/nixos/roles/k3s/default.nix index bf73c75..d8257a3 100644 --- a/modules/nixos/roles/k3s/default.nix +++ b/modules/nixos/roles/k3s/default.nix @@ -4,16 +4,16 @@ config, ... }: -with lib; let +with lib; +let cfg = config.hostConfiguration.roles.k3s; getConfig = pkgs.writeShellScriptBin "getConfig" '' - #!/usr/bin/env bash - mkdir -p ~/.kube/ sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config sudo chown k3s:users ~/.kube/config ''; -in { +in +{ imports = [ ./service.nix ./network.nix @@ -36,7 +36,7 @@ in { }; # Link zfs to be in PATH for openebs-provisioner - system.activationScripts.link-zsh = lib.stringAfter ["var"] '' + system.activationScripts.link-zsh = lib.stringAfter [ "var" ] '' ln -sf /run/current-system/sw/bin/zfs /usr/bin/zfs ''; diff --git a/packages/gardenctl/default.nix b/packages/gardenctl/default.nix index e414f62..44282f9 100644 --- a/packages/gardenctl/default.nix +++ b/packages/gardenctl/default.nix @@ -5,20 +5,18 @@ }: buildGoModule rec { pname = "gardenctl"; - version = "2.12.0-dev"; + version = "2.13.0"; src = fetchFromGitHub { - # owner = "gardener"; - owner = "dergeberl"; + owner = "gardener"; repo = "gardenctl-v2"; - # rev = "v${version}"; - rev = "adoptStackitProvider"; - hash = "sha256-7sZwtAtn0Tw18k7CdGEpvIWSZtM3fD9aMRzkOQ/3h6M="; + rev = "v${version}"; + hash = "sha256-hdXOgzRO3Nq81n8YH/RFWHTTR7TNXAw2RnDWOxNHySU="; }; - vendorHash = "sha256-uPWU5Wp1hoTZpDvZ3BuzhNtR4V2XAfKj+6ftZa5OO70="; + vendorHash = "sha256-xscuOXZcOPOeWROFnSCYUO8AZ6GfQAwjzRVAtbSrsR4="; - subPackages = ["/"]; + subPackages = [ "/" ]; env.CGO_ENABLED = 0; @@ -30,7 +28,7 @@ buildGoModule rec { "-X k8s.io/component-base/version.gitVersion=v${version}" ]; - nativeBuildInputs = [installShellFiles]; + nativeBuildInputs = [ installShellFiles ]; postInstall = '' mv $out/bin/{gardenctl-v2,${pname}} diff --git a/packages/gardenlogin/default.nix b/packages/gardenlogin/default.nix index 832bb9c..a4f23f4 100644 --- a/packages/gardenlogin/default.nix +++ b/packages/gardenlogin/default.nix @@ -5,16 +5,15 @@ }: buildGoModule rec { pname = "gardenlogin"; - version = "0.6.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = "gardener"; repo = "gardenlogin"; rev = "v${version}"; - hash = "sha256-qvRJeOoi4/tN0Mty3xqDyTnRfkkscwenM2IRZCNB+Us="; + hash = "sha256-Qb++u6Mug1NPGxp2iAtAy34m7eukE0vVPRc6h7OXeQ0="; }; - - vendorHash = "sha256-hQKLbO6+4yDnAof81+5YWm3mIfIGWmK01rFA1+oOC4I="; + vendorHash = "sha256-/0oZkLhKyHmHf+nfIU6fp0Cf24vxLYXmeWc+q8rz3s0="; env.CGO_ENABLED = 0; @@ -26,7 +25,7 @@ buildGoModule rec { "-X k8s.io/component-base/version.gitVersion=v${version}" ]; - nativeBuildInputs = [installShellFiles]; + nativeBuildInputs = [ installShellFiles ]; postInstall = '' ln -s $out/bin/${pname} $out/bin/kubectl-${pname} From c180eb4da5dc14d28f97f5ed60b6446c7e470603 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 10 Jan 2026 17:14:55 +0100 Subject: [PATCH 23/81] fix vinox --- hosts/vinox/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hosts/vinox/default.nix b/hosts/vinox/default.nix index c9f8326..f3739f5 100644 --- a/hosts/vinox/default.nix +++ b/hosts/vinox/default.nix @@ -2,29 +2,29 @@ lib, inputs, ... -}: { +}: +{ imports = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" ./installer.nix ./diagnostics.nix - ../../modules/nixos ]; # Host specific configuration hostConfiguration = { boot = { enable = true; - supportedFilesystems = ["ntfs"]; + supportedFilesystems = [ "ntfs" ]; }; user = { name = "root"; initialHashedPassword = ""; - extraOptions = {}; - extraGroups = []; - keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v"]; + extraOptions = { }; + extraGroups = [ ]; + keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v" ]; }; }; From c08bc6d93c458da2a2c1a6e8c5d5a7b653a8b4a0 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 10 Jan 2026 19:41:09 +0100 Subject: [PATCH 24/81] fix thunar, update flake --- flake.lock | 30 ++++++++++++------------ modules/nixos/roles/desktop/explorer.nix | 13 +++++++--- modules/nixos/system/locale.nix | 4 ++-- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index abddc86..6d88618 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1767750947, - "narHash": "sha256-zqe9esphlAFu19TGL/nAyOHyOiR+Vu8M2IWWLg9cm4U=", + "lastModified": 1767967164, + "narHash": "sha256-Cx4VETh9dGoQYDtWhre7g66d7SAr+h1h6f+SSHxVrck=", "owner": "catppuccin", "repo": "nix", - "rev": "e7135074fe2a3d17bee3c229b5a7d3da26f76ce8", + "rev": "e973584280e3b0e1d5b5a1a5e9948dc222c54af7", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1767738364, - "narHash": "sha256-rmAerMcKMYusVs5B88RAKAYUiENrO+d4bjvpQkkaaks=", + "lastModified": 1768018810, + "narHash": "sha256-WREj1ZQ2wSGtyPAhQJ3SX/7PJ29PNKv04h/7NgqUS+M=", "owner": "nix-community", "repo": "home-manager", - "rev": "4e8b7bef66c60735982369f3151b93e62fe37da7", + "rev": "7c5d9345ad7cc38832cd4007f5cd03daad64d75b", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1767706705, - "narHash": "sha256-dhZmvfNxhLUg/6wFXhc5hXvbemoI0E5S0Gnbu6vc4yY=", + "lastModified": 1768000181, + "narHash": "sha256-/E66+tcVBnvJcOFL/CjnjBfKew6A2e+28EZrcRHioBw=", "owner": "hyprwm", "repo": "hyprland", - "rev": "f1652b295130fd241bd3a6505908d6db562fdcf1", + "rev": "81e7498ec27156ee97aabba6fe4993412d98d1ab", "type": "github" }, "original": { @@ -671,11 +671,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1767640445, - "narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=", + "lastModified": 1767892417, + "narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", "type": "github" }, "original": { @@ -798,11 +798,11 @@ ] }, "locked": { - "lastModified": 1767499857, - "narHash": "sha256-0zUU/PW09d6oBaR8x8vMHcAhg1MOvo3CwoXgHijzzNE=", + "lastModified": 1768032389, + "narHash": "sha256-BVpTd93G0XmAK1iXiBdhUA5Uvt+WmM1YL0mA4REcT68=", "owner": "mic92", "repo": "sops-nix", - "rev": "ecc41505948ec2ab0325f14c9862a4329c2b4190", + "rev": "a8cfe238b93166f9f96c0df67a94e572554ee624", "type": "github" }, "original": { diff --git a/modules/nixos/roles/desktop/explorer.nix b/modules/nixos/roles/desktop/explorer.nix index 8e87e76..497390f 100644 --- a/modules/nixos/roles/desktop/explorer.nix +++ b/modules/nixos/roles/desktop/explorer.nix @@ -4,22 +4,29 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.hostConfiguration.roles.desktop; -in { +in +{ options.hostConfiguration.roles.desktop = mkEnableOption "Enable hyprland and desktop features."; config = mkIf cfg { programs = { thunar = { enable = true; - plugins = with pkgs.xfce; [ + plugins = with pkgs; [ thunar-archive-plugin thunar-volman ]; }; + xfconf.enable = true; }; + environment.systemPackages = [ + pkgs.file-roller + ]; + services = { gvfs.enable = true; # virtual filesystems udisks2.enable = true; # automounts diff --git a/modules/nixos/system/locale.nix b/modules/nixos/system/locale.nix index 0577629..da681b6 100644 --- a/modules/nixos/system/locale.nix +++ b/modules/nixos/system/locale.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ i18n = { defaultLocale = lib.mkDefault "en_US.UTF-8"; extraLocaleSettings = { @@ -17,7 +18,6 @@ time.hardwareClockInLocalTime = true; console = { - font = "ter-v32b"; keyMap = "us"; }; } From 140ee4ef56c7a8ce36dd405bec06f66619c98b78 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 16 Jan 2026 23:56:20 +0100 Subject: [PATCH 25/81] remove windowrule v1 --- .../home/desktops/hyprland/settings/windows.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/home/desktops/hyprland/settings/windows.nix b/modules/home/desktops/hyprland/settings/windows.nix index 317c9d0..53bbc5a 100644 --- a/modules/home/desktops/hyprland/settings/windows.nix +++ b/modules/home/desktops/hyprland/settings/windows.nix @@ -8,7 +8,13 @@ let in { wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - windowrule = [ + windowrulev2 = [ + "workspace 4, class:^(firefox_firefox)$" + "workspace 5, class:^(chromium-browser)$" + + "workspace special:aux silent, class:^(.*mumble.*)$" + "workspace special:aux silent, class:^(.*keepassxc.*)$" + # Force floating "float, class:steam" "float, class:com.nextcloud.desktopclient.nextcloud" @@ -20,14 +26,6 @@ in "move 40% 40%, title:^(.*Mumble Server Connect.*)$" ]; - windowrulev2 = [ - "workspace 4, class:^(firefox_firefox)$" - "workspace 5, class:^(chromium-browser)$" - - "workspace special:aux silent, class:^(.*mumble.*)$" - "workspace special:aux silent, class:^(.*keepassxc.*)$" - ]; - bind = [ # Window actions "SUPER,F, fullscreen, 1" From 88abb43210e00b2f08bf7f0b46cafc6b1113d758 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 21 Jan 2026 16:53:34 +0100 Subject: [PATCH 26/81] fix browser and starship --- flake.lock | 111 ++++++++----------- flake.nix | 3 +- modules/home/browsers/firefox/default.nix | 4 +- modules/home/cli/tools/starship/default.nix | 4 +- modules/home/desktops/addons/gtk/default.nix | 2 +- 5 files changed, 56 insertions(+), 68 deletions(-) diff --git a/flake.lock b/flake.lock index 6d88618..77751e1 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1767967164, - "narHash": "sha256-Cx4VETh9dGoQYDtWhre7g66d7SAr+h1h6f+SSHxVrck=", + "lastModified": 1768575137, + "narHash": "sha256-e0SsKnkSnq+UwZNS9ZyPJjTjabzq9TRc1hqeDnvOF1Q=", "owner": "catppuccin", "repo": "nix", - "rev": "e973584280e3b0e1d5b5a1a5e9948dc222c54af7", + "rev": "48e67b4ad22072f1ae30b0ed8e1cb020cf06c611", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1766150702, - "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", + "lastModified": 1768923567, + "narHash": "sha256-GVJ0jKsyXLuBzRMXCDY6D5J8wVdwP1DuQmmvYL/Vw/Q=", "owner": "nix-community", "repo": "disko", - "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", + "rev": "00395d188e3594a1507f214a2f15d4ce5c07cb28", "type": "github" }, "original": { @@ -90,15 +90,15 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -128,11 +128,11 @@ ] }, "locked": { - "lastModified": 1765495779, - "narHash": "sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM=", + "lastModified": 1765835352, + "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "5635c32d666a59ec9a55cab87e898889869f7b71", + "rev": "a34fae9c08a15ad73f295041fec82323541400a9", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1768018810, - "narHash": "sha256-WREj1ZQ2wSGtyPAhQJ3SX/7PJ29PNKv04h/7NgqUS+M=", + "lastModified": 1768997641, + "narHash": "sha256-7vT8oS6ra/dJaZ6ShvZiPtlZ40XI7CTSb2PmuNPMiXE=", "owner": "nix-community", "repo": "home-manager", - "rev": "7c5d9345ad7cc38832cd4007f5cd03daad64d75b", + "rev": "27b60942b7285824937f8c2c05021370f6fc5904", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1768000181, - "narHash": "sha256-/E66+tcVBnvJcOFL/CjnjBfKew6A2e+28EZrcRHioBw=", + "lastModified": 1769004217, + "narHash": "sha256-GWFc82LW9NfVTuAJXXfFLHuY1VU73JNUfT6uOsft6fM=", "owner": "hyprwm", "repo": "hyprland", - "rev": "81e7498ec27156ee97aabba6fe4993412d98d1ab", + "rev": "55f40ecc9572b55319f5af3ad947476b4fe9ce2f", "type": "github" }, "original": { @@ -603,31 +603,34 @@ }, "neonix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs" + ], "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1767094456, - "narHash": "sha256-bqiU/tWAVfzFFuugfKaIVa9ChY7lJFcI2UhYXcj54Q4=", + "lastModified": 1769009683, + "narHash": "sha256-IgDm2HIUBZANHWZ4zrjtYQHGtRKs+5NDyds3hO/xpmE=", "owner": "rgroemmer", "repo": "neonix", - "rev": "f2123f4531210e4fd29ae586598736edaa19e8e9", + "rev": "9d41f1567a2cbe16481bccae26a500e4f111b869", "type": "github" }, "original": { "owner": "rgroemmer", + "ref": "plugin-enhancement", "repo": "neonix", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1767185284, - "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", + "lastModified": 1768736227, + "narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", + "rev": "d447553bcbc6a178618d37e61648b19e744370df", "type": "github" }, "original": { @@ -639,11 +642,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1767116409, - "narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=", + "lastModified": 1768305791, + "narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cad22e7d996aea55ecab064e84834289143e44a0", + "rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e", "type": "github" }, "original": { @@ -655,27 +658,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1768886240, + "narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1767892417, - "narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", "type": "github" }, "original": { @@ -695,11 +682,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1765796308, - "narHash": "sha256-szKgoF0JbDUvWkqjB2AyyFagmsF5ZFEjajZRUiUV9mU=", + "lastModified": 1768910181, + "narHash": "sha256-YRU0IHMzXluZxr0JDfq9jtblb4DV7MIB5wj2jYMFKQc=", "owner": "nix-community", "repo": "nixvim", - "rev": "12a76dd12beccd8d18249b05d10d6acda4e722e0", + "rev": "5b138edcb2f1c3ed4b29eca3658f04f0639b98b3", "type": "github" }, "original": { @@ -741,11 +728,11 @@ ] }, "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", + "lastModified": 1768935149, + "narHash": "sha256-S5/BZo4X1D9+U/yJ6xCJyUkXZ8y261q2gPP5Xsq8RPU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", + "rev": "18cbede9ff6da05b911c5c4802a397c2686ac8fa", "type": "github" }, "original": { @@ -763,11 +750,11 @@ ] }, "locked": { - "lastModified": 1767281941, - "narHash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE=", + "lastModified": 1768935149, + "narHash": "sha256-S5/BZo4X1D9+U/yJ6xCJyUkXZ8y261q2gPP5Xsq8RPU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa", + "rev": "18cbede9ff6da05b911c5c4802a397c2686ac8fa", "type": "github" }, "original": { @@ -786,7 +773,7 @@ "krewfile": "krewfile", "neonix": "neonix", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks_3", "sops-nix": "sops-nix" } @@ -798,11 +785,11 @@ ] }, "locked": { - "lastModified": 1768032389, - "narHash": "sha256-BVpTd93G0XmAK1iXiBdhUA5Uvt+WmM1YL0mA4REcT68=", + "lastModified": 1768863606, + "narHash": "sha256-1IHAeS8WtBiEo5XiyJBHOXMzECD6aaIOJmpQKzRRl64=", "owner": "mic92", "repo": "sops-nix", - "rev": "a8cfe238b93166f9f96c0df67a94e572554ee624", + "rev": "c7067be8db2c09ab1884de67ef6c4f693973f4a2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b805657..b233ffd 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; neonix = { - url = "github:rgroemmer/neonix"; + url = "github:rgroemmer/neonix/plugin-enhancement"; + inputs.nixpkgs.follows = "nixpkgs"; }; krewfile = { url = "github:brumhard/krewfile"; diff --git a/modules/home/browsers/firefox/default.nix b/modules/home/browsers/firefox/default.nix index 3512373..30e5c72 100644 --- a/modules/home/browsers/firefox/default.nix +++ b/modules/home/browsers/firefox/default.nix @@ -52,9 +52,9 @@ in search = { force = true; - default = "Kagi"; + default = "ddg"; order = [ - "Kagi" + "ddg" "NixOS Options" "Nix Packages" "GitHub" diff --git a/modules/home/cli/tools/starship/default.nix b/modules/home/cli/tools/starship/default.nix index 0196959..5da04f9 100644 --- a/modules/home/cli/tools/starship/default.nix +++ b/modules/home/cli/tools/starship/default.nix @@ -81,13 +81,13 @@ staged = "+$count"; renamed = "ยป$count"; deleted = "โœ˜$count"; - format = "[ $all_status ]($style)"; + format = "([$all_status$ahead_behind ]($style))"; style = "fg:base bg:yellow"; }; git_metrics = { disabled = false; - format = "([ +$added ]($added_style))([-$deleted ]($deleted_style) )"; + format = "([ +$added ]($added_style))([-$deleted ]($deleted_style))"; added_style = "fg:green bg:base"; deleted_style = "fg:red bg:base"; }; diff --git a/modules/home/desktops/addons/gtk/default.nix b/modules/home/desktops/addons/gtk/default.nix index ed57002..f0ceabb 100644 --- a/modules/home/desktops/addons/gtk/default.nix +++ b/modules/home/desktops/addons/gtk/default.nix @@ -11,7 +11,7 @@ name = "Catppuccin-GTK-Purple-Dark"; package = pkgs.magnetic-catppuccin-gtk.override { tweaks = [ "black" ]; - accent = [ "purple" ]; + accent = [ "mauve" ]; }; }; From 25cf6652bfa27d830a281b43b092ab06cb3e1100 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 21 Jan 2026 16:58:42 +0100 Subject: [PATCH 27/81] update doc --- docs/misc.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/misc.md b/docs/misc.md index fe275e8..1110365 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -43,3 +43,19 @@ Keep the slice as clean as possible: โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€77102 /run/current-system/sw/bin/Hyprland โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€77200 Xwayland :0 -rootless -core -listenfd 54 -listenfd 55 -displayfd 107 -wm 104 ``` + +## Nix follows + +``` + neonix = { + url = "github:rgroemmer/neonix/plugin-enhancement"; + inputs.nixpkgs.follows = "nixpkgs"; + }; +``` + +This will follow the actual flakes `nixpkgs`, neonix by itself uses `nixvim` from its own inputs, which is not part +of `nixpkgs`. +If the flakes `nixpkgs` is to new, plugins and packages from it will be "to new" for the rather outdated `nixvim` from neonix repo. +This can lead to problems starting nvim, this can be fixed by update the `neonix` flake accordingly. + +> There is also a nix (lix?) bug, which does not update the `flake.lock` when a follows is removed. From 284f97845791ff628c51aa461af2a2aab5e19a4d Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 26 Jan 2026 14:33:13 +0100 Subject: [PATCH 28/81] WIP: test hyprspace --- flake.lock | 48 ++++++++++----------- hosts/firefly/home.nix | 2 +- modules/home/desktops/hyprland/hyprland.nix | 4 ++ 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index 77751e1..d2aabda 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1768575137, - "narHash": "sha256-e0SsKnkSnq+UwZNS9ZyPJjTjabzq9TRc1hqeDnvOF1Q=", + "lastModified": 1769164550, + "narHash": "sha256-AxLb3L4j148v4Cj6ju5E9wsVdcHULuoI8il7+H5t6cs=", "owner": "catppuccin", "repo": "nix", - "rev": "48e67b4ad22072f1ae30b0ed8e1cb020cf06c611", + "rev": "deb2a5a54cf9e05ddf60aeeb933f60ad2fac20e1", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1768997641, - "narHash": "sha256-7vT8oS6ra/dJaZ6ShvZiPtlZ40XI7CTSb2PmuNPMiXE=", + "lastModified": 1769132734, + "narHash": "sha256-gmU9cRplrQWqoback9PgQX7Dlsdx8JlhlVZwf0q1F7E=", "owner": "nix-community", "repo": "home-manager", - "rev": "27b60942b7285824937f8c2c05021370f6fc5904", + "rev": "d055b309a6277343cb1033a11d7500f0a0f669fc", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1769004217, - "narHash": "sha256-GWFc82LW9NfVTuAJXXfFLHuY1VU73JNUfT6uOsft6fM=", + "lastModified": 1769114016, + "narHash": "sha256-eYY8QyE+RY7sa69DZmdbfN2DFfyx3Jk9k/gALAKXi38=", "owner": "hyprwm", "repo": "hyprland", - "rev": "55f40ecc9572b55319f5af3ad947476b4fe9ce2f", + "rev": "64db62d7e2685d62cbab51a1a7cb7f2cf38a1b32", "type": "github" }, "original": { @@ -610,11 +610,11 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1769009683, - "narHash": "sha256-IgDm2HIUBZANHWZ4zrjtYQHGtRKs+5NDyds3hO/xpmE=", + "lastModified": 1769096381, + "narHash": "sha256-vq37IUSDP36hZAVQp3jgd2ckk+9A+ScwSaoPm/oj57Y=", "owner": "rgroemmer", "repo": "neonix", - "rev": "9d41f1567a2cbe16481bccae26a500e4f111b869", + "rev": "f000ad1ffd410389e3df0c0bfba734ccbb79680b", "type": "github" }, "original": { @@ -626,11 +626,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1768736227, - "narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=", + "lastModified": 1769086393, + "narHash": "sha256-3ymIZ8s3+hu7sDl/Y48o6bwMxorfKrmn97KuWiw1vjY=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "d447553bcbc6a178618d37e61648b19e744370df", + "rev": "9f7ba891ea5fc3ededd7804f1a23fafadbcb26ca", "type": "github" }, "original": { @@ -642,11 +642,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1768305791, - "narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=", + "lastModified": 1769018530, + "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e", + "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", "type": "github" }, "original": { @@ -658,11 +658,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1768886240, - "narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=", + "lastModified": 1769018530, + "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", + "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", "type": "github" }, "original": { @@ -750,11 +750,11 @@ ] }, "locked": { - "lastModified": 1768935149, - "narHash": "sha256-S5/BZo4X1D9+U/yJ6xCJyUkXZ8y261q2gPP5Xsq8RPU=", + "lastModified": 1769069492, + "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "18cbede9ff6da05b911c5c4802a397c2686ac8fa", + "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", "type": "github" }, "original": { diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index caf6f26..35949a5 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -16,7 +16,7 @@ desktop.hyprland = { enable = true; - package = null; + package = pkgs.hyprland; monitors = [ # Monitor are automatically from left to right diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index 8b38f05..99d13d1 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -35,6 +35,10 @@ in enable = true; inherit (cfg) package; + plugins = with pkgs; [ + hyprlandPlugins.hyprspace + ]; + systemd.enable = false; # Disable for uswm }; From 6db14f2ec0ba0490c0a2a7278e9d63807c3d4ba6 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 30 Jan 2026 09:51:13 +0100 Subject: [PATCH 29/81] Add nextcloud --- modules/home/desktops/hyprland/hyprland.nix | 2 +- modules/home/services/default.nix | 1 + modules/home/services/nextcloud.nix | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 modules/home/services/nextcloud.nix diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index 99d13d1..51bf836 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -36,7 +36,7 @@ in inherit (cfg) package; plugins = with pkgs; [ - hyprlandPlugins.hyprspace + hyprlandPlugins.hyprexpo ]; systemd.enable = false; # Disable for uswm diff --git a/modules/home/services/default.nix b/modules/home/services/default.nix index 88b5b36..099be71 100644 --- a/modules/home/services/default.nix +++ b/modules/home/services/default.nix @@ -4,5 +4,6 @@ ./sops.nix ./tray.nix ./keyring.nix + ./nextcloud.nix ]; } diff --git a/modules/home/services/nextcloud.nix b/modules/home/services/nextcloud.nix new file mode 100644 index 0000000..6d6bc7c --- /dev/null +++ b/modules/home/services/nextcloud.nix @@ -0,0 +1,6 @@ +{ + services.nextcloud-client = { + enable = true; + startInBackground = true; + }; +} From 5244009735e67c186b3b826b32f3ee502c7caf22 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 30 Jan 2026 09:54:16 +0100 Subject: [PATCH 30/81] plugins hypr & krew --- modules/home/cli/tools/k8s/krewfile.nix | 1 + modules/home/desktops/hyprland/hyprland.nix | 9 +++++---- modules/home/desktops/hyprland/settings/binds.nix | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/home/cli/tools/k8s/krewfile.nix b/modules/home/cli/tools/k8s/krewfile.nix index 8ec294c..b428592 100644 --- a/modules/home/cli/tools/k8s/krewfile.nix +++ b/modules/home/cli/tools/k8s/krewfile.nix @@ -13,6 +13,7 @@ "node-shell" "ns" "ctx" + "klock" ]; }; } diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index 51bf836..89f9f04 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -7,6 +7,7 @@ }: with lib; with mylib; +with pkgs; let cfg = config.roles.desktop.hyprland; in @@ -35,14 +36,14 @@ in enable = true; inherit (cfg) package; - plugins = with pkgs; [ - hyprlandPlugins.hyprexpo + plugins = with hyprlandPlugins; [ + hyprexpo ]; systemd.enable = false; # Disable for uswm }; - home.packages = with pkgs; [ + home.packages = [ hyprland-qtutils slurp ]; @@ -57,7 +58,7 @@ in ]; }; }; - extraPortals = with pkgs; [ + extraPortals = [ xdg-desktop-portal-wlr xdg-desktop-portal-hyprland ]; diff --git a/modules/home/desktops/hyprland/settings/binds.nix b/modules/home/desktops/hyprland/settings/binds.nix index 9c6370d..f1daa89 100644 --- a/modules/home/desktops/hyprland/settings/binds.nix +++ b/modules/home/desktops/hyprland/settings/binds.nix @@ -20,6 +20,9 @@ in # Notification center "SUPER,N, exec, swaync-client -t" + + # Plugins + "SUPER, g, hyprexpo:expo, toggle" ]; }; } From 02db46996753f2a567d5c058bbdfd637c58f92f8 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 30 Jan 2026 09:54:22 +0100 Subject: [PATCH 31/81] Firefox fixes --- modules/home/browsers/firefox/default.nix | 53 +---------------------- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/modules/home/browsers/firefox/default.nix b/modules/home/browsers/firefox/default.nix index 30e5c72..7d5d099 100644 --- a/modules/home/browsers/firefox/default.nix +++ b/modules/home/browsers/firefox/default.nix @@ -61,21 +61,6 @@ in "HackerNews" ]; engines = { - "Kagi" = { - urls = [ - { - template = "https://kagi.com/search"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; - "Nix Packages" = { icon = "https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg"; definedAliases = [ "@np" ]; @@ -122,24 +107,6 @@ in metaData.hideOneOffButton = true; }; - "SourceGraph" = { - icon = "https://sourcegraph.com/.assets/img/sourcegraph-mark.svg"; - definedAliases = [ "@sg" ]; - - urls = [ - { - template = "https://sourcegraph.com/search"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; - "GitHub" = { icon = "https://github.com/favicon.ico"; definedAliases = [ "@gh" ]; @@ -164,7 +131,7 @@ in urls = [ { - template = "https://mipmip.github.io/home-manager-option-search/"; + template = "https://home-manager-options.extranix.com/?&release=master"; params = [ { name = "query"; @@ -175,24 +142,6 @@ in ]; metaData.hideOneOffButton = true; }; - - "HackerNews" = { - icon = "https://news.ycombinator.com/favicon.ico"; - definedAliases = [ "@hn" ]; - - urls = [ - { - template = "https://hn.algolia.com/"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; }; }; }; From e67e88f42de0519d7ff03c6156dd83e7efd627cb Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 4 Feb 2026 18:15:05 +0100 Subject: [PATCH 32/81] minor changes, remove uwsmt --- flake.lock | 72 +++++++++---------- modules/home/browsers/chromium/default.nix | 3 +- modules/home/cli/shells/zsh/default.nix | 5 +- .../home/cli/terminals/alacritty/default.nix | 2 +- modules/home/desktops/hyprland/hyprland.nix | 2 +- .../desktops/hyprland/settings/windows.nix | 21 ++---- 6 files changed, 49 insertions(+), 56 deletions(-) diff --git a/flake.lock b/flake.lock index d2aabda..7a93cda 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1767024902, - "narHash": "sha256-sMdk6QkMDhIOnvULXKUM8WW8iyi551SWw2i6KQHbrrU=", + "lastModified": 1769428758, + "narHash": "sha256-0G/GzF7lkWs/yl82bXuisSqPn6sf8YGTnbEdFOXvOfU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "b8a0c5ba5a9fbd2c660be7dd98bdde0ff3798556", + "rev": "def5e74c97370f15949a67c62e61f1459fcb0e15", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1769164550, - "narHash": "sha256-AxLb3L4j148v4Cj6ju5E9wsVdcHULuoI8il7+H5t6cs=", + "lastModified": 1769432988, + "narHash": "sha256-q4arZjXnLiuMnLzO972lrXIGdzyGb4DGaIt69CcCYdE=", "owner": "catppuccin", "repo": "nix", - "rev": "deb2a5a54cf9e05ddf60aeeb933f60ad2fac20e1", + "rev": "d7a8632c0d8d144478aac1a8c8d5083b770cbb03", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1768923567, - "narHash": "sha256-GVJ0jKsyXLuBzRMXCDY6D5J8wVdwP1DuQmmvYL/Vw/Q=", + "lastModified": 1769524058, + "narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=", "owner": "nix-community", "repo": "disko", - "rev": "00395d188e3594a1507f214a2f15d4ce5c07cb28", + "rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1769132734, - "narHash": "sha256-gmU9cRplrQWqoback9PgQX7Dlsdx8JlhlVZwf0q1F7E=", + "lastModified": 1769723138, + "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "d055b309a6277343cb1033a11d7500f0a0f669fc", + "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073", "type": "github" }, "original": { @@ -289,11 +289,11 @@ ] }, "locked": { - "lastModified": 1766946335, - "narHash": "sha256-MRD+Jr2bY11MzNDfenENhiK6pvN+nHygxdHoHbZ1HtE=", + "lastModified": 1769284023, + "narHash": "sha256-xG34vwYJ79rA2wVC8KFuM8r36urJTG6/csXx7LiiSYU=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "4af02a3925b454deb1c36603843da528b67ded6c", + "rev": "13c536659d46893596412d180449353a900a1d31", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1769114016, - "narHash": "sha256-eYY8QyE+RY7sa69DZmdbfN2DFfyx3Jk9k/gALAKXi38=", + "lastModified": 1769694617, + "narHash": "sha256-h8+Wqc4x68mN2qOLX45HsO6Z4eQOfrdtSKiSzcBrCVg=", "owner": "hyprwm", "repo": "hyprland", - "rev": "64db62d7e2685d62cbab51a1a7cb7f2cf38a1b32", + "rev": "c92fb5e85f4a5fd3a0f5ffb5892f6a61cfe1be2b", "type": "github" }, "original": { @@ -421,11 +421,11 @@ ] }, "locked": { - "lastModified": 1764612430, - "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", + "lastModified": 1767983607, + "narHash": "sha256-8C2co8NYfR4oMOUEsPROOJ9JHrv9/ktbJJ6X1WsTbXc=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0d00dc118981531aa731150b6ea551ef037acddd", + "rev": "d4037379e6057246b408bbcf796cf3e9838af5b2", "type": "github" }, "original": { @@ -552,11 +552,11 @@ ] }, "locked": { - "lastModified": 1767473322, - "narHash": "sha256-RGOeG+wQHeJ6BKcsSB8r0ZU77g9mDvoQzoTKj2dFHwA=", + "lastModified": 1769202094, + "narHash": "sha256-gdJr/vWWLRW85ucatSjoBULPB2dqBJd/53CZmQ9t91Q=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "d5e7d6b49fe780353c1cf9a1cf39fa8970bd9d11", + "rev": "a45ca05050d22629b3c7969a926d37870d7dd75c", "type": "github" }, "original": { @@ -626,11 +626,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1769086393, - "narHash": "sha256-3ymIZ8s3+hu7sDl/Y48o6bwMxorfKrmn97KuWiw1vjY=", + "lastModified": 1769302137, + "narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "9f7ba891ea5fc3ededd7804f1a23fafadbcb26ca", + "rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8", "type": "github" }, "original": { @@ -658,11 +658,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1769018530, - "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -705,11 +705,11 @@ ] }, "locked": { - "lastModified": 1767281941, - "narHash": "sha256-6MkqajPICgugsuZ92OMoQcgSHnD6sJHwk8AxvMcIgTE=", + "lastModified": 1769069492, + "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f0927703b7b1c8d97511c4116eb9b4ec6645a0fa", + "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", "type": "github" }, "original": { @@ -785,11 +785,11 @@ ] }, "locked": { - "lastModified": 1768863606, - "narHash": "sha256-1IHAeS8WtBiEo5XiyJBHOXMzECD6aaIOJmpQKzRRl64=", + "lastModified": 1769469829, + "narHash": "sha256-wFcr32ZqspCxk4+FvIxIL0AZktRs6DuF8oOsLt59YBU=", "owner": "mic92", "repo": "sops-nix", - "rev": "c7067be8db2c09ab1884de67ef6c4f693973f4a2", + "rev": "c5eebd4eb2e3372fe12a8d70a248a6ee9dd02eff", "type": "github" }, "original": { diff --git a/modules/home/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix index 25e3a51..97ede31 100644 --- a/modules/home/browsers/chromium/default.nix +++ b/modules/home/browsers/chromium/default.nix @@ -10,8 +10,7 @@ "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--enable-wayland-ime" - # TODO: wait for next hl tag/release see https://github.com/hyprwm/Hyprland/discussions/11843 - "--disable-features=WaylandWpColorManagerV1" + "--disable-gpu" ]; }; diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix index c9b1088..95afb63 100644 --- a/modules/home/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -44,11 +44,12 @@ with types; }; initContent = mkMerge [ - (mkOrder 500 '''') + (mkOrder 500 "") (mkOrder 1000 '' + export GOPATH=$(go env GOPATH) ${config.roles.cli.zsh.zshrc} '') - (mkOrder 1500 '''') + (mkOrder 1500 "") ]; shellAliases = { diff --git a/modules/home/cli/terminals/alacritty/default.nix b/modules/home/cli/terminals/alacritty/default.nix index 9cf0df4..658d18f 100644 --- a/modules/home/cli/terminals/alacritty/default.nix +++ b/modules/home/cli/terminals/alacritty/default.nix @@ -42,7 +42,7 @@ family = fontname; style = "Italic"; }; - size = 13; + size = 12; }; mouse.bindings = [ diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index 89f9f04..f907427 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -40,7 +40,7 @@ in hyprexpo ]; - systemd.enable = false; # Disable for uswm + # systemd.enable = false; # Disable for uswm }; home.packages = [ diff --git a/modules/home/desktops/hyprland/settings/windows.nix b/modules/home/desktops/hyprland/settings/windows.nix index 53bbc5a..366474d 100644 --- a/modules/home/desktops/hyprland/settings/windows.nix +++ b/modules/home/desktops/hyprland/settings/windows.nix @@ -8,22 +8,16 @@ let in { wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - windowrulev2 = [ - "workspace 4, class:^(firefox_firefox)$" - "workspace 5, class:^(chromium-browser)$" + windowrule = [ + "match:class ^(firefox)$, workspace 4" + "match:class ^(chromium-browser)$, workspace 5" - "workspace special:aux silent, class:^(.*mumble.*)$" - "workspace special:aux silent, class:^(.*keepassxc.*)$" + "match:class ^(.*mumble.*)$, workspace special:aux silent" + "match:class ^(.*keepassxc.*)$, workspace special:aux silent" # Force floating - "float, class:steam" - "float, class:com.nextcloud.desktopclient.nextcloud" - - # Resize - "size 20% 50%, class:com.nextcloud.desktopclient.nextcloud" - "move 78% 4%, class:com.nextcloud.desktopclient.nextcloud" - "move 68% 4%, class:^(.*ZSTray.*)$" - "move 40% 40%, title:^(.*Mumble Server Connect.*)$" + "match:class steam, float yes" + "match:class ^(.*nextcloud.*)$, float yes" ]; bind = [ @@ -47,6 +41,5 @@ in "SUPER,T, togglesplit," "SUPER,U, togglefloating," ]; - }; } From 2b91e1d3f9b51efbd260d86517ffc66812677da0 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 19 Jan 2026 22:04:16 +0100 Subject: [PATCH 33/81] Update corne keyboard layout --- extra/keyboard/README.md | 7 +++++++ extra/keyboard/corne-qmk-main.json | 14 ++++++++++++++ .../{crkbd.layout.json => corne-via-backup.json} | 0 3 files changed, 21 insertions(+) create mode 100644 extra/keyboard/README.md create mode 100644 extra/keyboard/corne-qmk-main.json rename extra/keyboard/{crkbd.layout.json => corne-via-backup.json} (100%) diff --git a/extra/keyboard/README.md b/extra/keyboard/README.md new file mode 100644 index 0000000..f0baabe --- /dev/null +++ b/extra/keyboard/README.md @@ -0,0 +1,7 @@ +# Keyboard layout backup +Since there were problems restoring the keymap with via, the main file is `./corne-via-backup.json`, a layout +generated by qmk-configurator. + +## Change / Update +Upload to qmk-configurator, adapt & download new `json`. +Use qmk-configuration fork, with `flash.sh` diff --git a/extra/keyboard/corne-qmk-main.json b/extra/keyboard/corne-qmk-main.json new file mode 100644 index 0000000..e862a25 --- /dev/null +++ b/extra/keyboard/corne-qmk-main.json @@ -0,0 +1,14 @@ +{ + "keyboard": "crkbd", + "keymap": "rapsn-led", + "layers": [ + ["KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Z", "KC_U", "KC_I", "KC_O", "KC_P", "KC_ESC", "KC_LGUI", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_BSPC", "OSL(4)", "KC_LSFT", "KC_Y", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LSFT", "KC_LCTL", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_LCTL"], + ["KC_TRNS", "RALT(KC_S)", "KC_UNDS", "KC_LBRC", "KC_RBRC", "KC_CIRC", "KC_EXLM", "KC_LT", "KC_GT", "KC_PEQL", "KC_AMPR", "KC_DEL", "KC_TRNS", "KC_BSLS", "KC_SLSH", "KC_LCBR", "KC_RCBR", "KC_ASTR", "KC_QUES", "KC_LPRN", "KC_RPRN", "KC_MINS", "KC_COLN", "KC_AT", "KC_TRNS", "KC_HASH", "KC_DLR", "KC_PIPE", "KC_TILD", "KC_GRV", "KC_PPLS", "KC_PERC", "KC_DQUO", "KC_QUOT", "KC_SCLN", "KC_TRNS", "KC_LGUI", "KC_TRNS", "KC_SPC", "KC_ENT", "MO(3)", "KC_RALT"], + ["KC_TRNS", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_NO", "KC_HOME", "LCTL(KC_LEFT)", "LCTL(KC_RGHT)", "KC_END", "KC_NO", "KC_TRNS", "KC_TRNS", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT", "KC_NO", "KC_TRNS", "KC_TRNS", "KC_F10", "KC_F11", "KC_F12", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_LGUI", "MO(3)", "KC_SPC", "KC_ENT", "KC_TRNS", "KC_RALT"], + ["KC_NO", "LGUI(KC_1)", "LGUI(KC_2)", "LGUI(KC_3)", "LGUI(KC_4)", "LGUI(KC_5)", "LGUI(KC_6)", "LGUI(KC_7)", "LGUI(KC_8)", "LGUI(KC_9)", "KC_NO", "KC_NO", "KC_NO", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_NO", "KC_NO", "LALT(KC_1)", "LALT(KC_2)", "LALT(KC_3)", "KC_4", "LALT(KC_5)", "LALT(KC_6)", "KC_NO", "KC_COMM", "KC_DOT", "KC_NO", "KC_NO", "KC_LGUI", "KC_TRNS", "KC_SPC", "KC_ENT", "KC_TRNS", "KC_RALT"], + ["KC_NO", "DF(0)", "DF(5)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_U)", "KC_NO", "RALT(KC_O)", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_A)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_6)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], + ["KC_TAB", "KC_Q", "KC_TRNS", "KC_E", "KC_R", "KC_T", "KC_Z", "KC_U", "KC_I", "KC_O", "KC_P", "KC_ESC", "KC_LGUI", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_BSPC", "OSL(4)", "KC_LSFT", "KC_Y", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LCTL", "KC_LCTL", "MO(6)", "KC_SPC", "KC_ENT", "DF(0)", "KC_LCTL"], + ["KC_NO", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO"] + ], + "layout": "LAYOUT_split_3x6_3" +} diff --git a/extra/keyboard/crkbd.layout.json b/extra/keyboard/corne-via-backup.json similarity index 100% rename from extra/keyboard/crkbd.layout.json rename to extra/keyboard/corne-via-backup.json From 3586e17ebfad292dc90ab4a82f2973b02f3b1c48 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 4 Feb 2026 18:32:24 +0100 Subject: [PATCH 34/81] remove uwsm --- docs/misc.md | 2 +- hosts/firefly/home.nix | 2 +- modules/home/desktops/hyprland/settings/autostart.nix | 3 +-- modules/home/desktops/hyprland/settings/binds.nix | 4 ++-- modules/nixos/roles/desktop/hyprland.nix | 9 +++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/misc.md b/docs/misc.md index 1110365..00a641d 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -30,7 +30,7 @@ sudo efibootmgr --create \ --loader '\EFI\systemd\systemd-bootx64.efi' \ # Mind the backslashes ``` -## UWSM +## UWSM (legacy not used anymore) ### start apps Use `uswm app -- ` to start apps. diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 35949a5..1f2be1f 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -52,7 +52,7 @@ bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefer,auto, 1" bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" - exec-once = sleep 5 && uwsm app -- mumble --tray + exec-once = sleep 5 mumble --tray exec-once = sleep 5 && hyprctl dispatch closewindow class:ZSTray ''; diff --git a/modules/home/desktops/hyprland/settings/autostart.nix b/modules/home/desktops/hyprland/settings/autostart.nix index 0f54578..c72eee2 100644 --- a/modules/home/desktops/hyprland/settings/autostart.nix +++ b/modules/home/desktops/hyprland/settings/autostart.nix @@ -10,8 +10,7 @@ in { wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { exec-once = [ - # TODO: Move to own option, build function for uwsm - "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" "[ workspace special:scratchy silent ] alacritty -t scratchy" ]; }; diff --git a/modules/home/desktops/hyprland/settings/binds.nix b/modules/home/desktops/hyprland/settings/binds.nix index f1daa89..d085c19 100644 --- a/modules/home/desktops/hyprland/settings/binds.nix +++ b/modules/home/desktops/hyprland/settings/binds.nix @@ -9,8 +9,8 @@ in { wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { bind = [ - "SUPER,RETURN, exec, uwsm app -- alacritty" - "SUPER,E, exec, uwsm app -- fuzzel" + "SUPER,RETURN, exec, alacritty" + "SUPER,E, exec, fuzzel" "SUPER,P, exec, wlogout" "SUPER,Q, killactive" diff --git a/modules/nixos/roles/desktop/hyprland.nix b/modules/nixos/roles/desktop/hyprland.nix index 4f66b16..6497ec9 100644 --- a/modules/nixos/roles/desktop/hyprland.nix +++ b/modules/nixos/roles/desktop/hyprland.nix @@ -4,13 +4,14 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.hostConfiguration.roles.desktop; -in { +in +{ config = mkIf cfg { programs.hyprland = { enable = true; - withUWSM = true; }; services.greetd = { @@ -21,7 +22,7 @@ in { --time \ --remember \ --theme 'border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red' \ - --cmd '${pkgs.uwsm}/bin/uwsm start hyprland-uwsm.desktop' + --cmd start-hyprland ''; }; }; From 7a3cca1eca9c09f52e69dced22804c705144324a Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 4 Feb 2026 19:08:29 +0100 Subject: [PATCH 35/81] fix gtk --- dev-shells.nix | 4 ++-- docs/firefly.md | 9 ++++++++- hosts/zion/home.nix | 4 ++-- modules/home/desktops/addons/gtk/default.nix | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dev-shells.nix b/dev-shells.nix index a547890..e96466b 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -8,7 +8,7 @@ let src = ./.; hooks = { statix.enable = true; - nixfmt-rfc-style.enable = true; + nixfmt.enable = true; deadnix.enable = true; }; }; @@ -23,7 +23,7 @@ in nh statix deadnix - nixfmt-rfc-style + nixfmt nix-inspect ]; }; diff --git a/docs/firefly.md b/docs/firefly.md index 7312de9..80d7c37 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -26,7 +26,14 @@ cp .pki/nssdb/* /home/rapsn/.mozilla/firefox/default/ ### GTK Theme -Instead of configuring every theme myself, only the theme installation is managed via `nix`, to set the theme use `nwg-look`. +`nwg-look` can be used to set the theme for multiple setting files simultanouly. +Important is that the exact theme **name** is set via `gsetting`. + +`nwg-look` can be used to see what the actual name is, to persist configure it in home-manager `gtk.theme.name`. + +```bash +dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name +``` ## Outside nix ๐Ÿ˜ญ - mumble (apt) diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index a60c5da..ebc4b67 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -40,9 +40,9 @@ "7,monitor:eDP-1" ]; - extraConfig = ''''; + extraConfig = ""; - hyprlock.enable = false; + hyprlock.enable = true; hypridle = { enable = true; cmd = "${pkgs.hyprlock}/bin/hyprlock"; diff --git a/modules/home/desktops/addons/gtk/default.nix b/modules/home/desktops/addons/gtk/default.nix index f0ceabb..e50ab25 100644 --- a/modules/home/desktops/addons/gtk/default.nix +++ b/modules/home/desktops/addons/gtk/default.nix @@ -8,7 +8,7 @@ enable = true; theme = { - name = "Catppuccin-GTK-Purple-Dark"; + name = "Catppuccin-GTK-Mauve-Dark"; package = pkgs.magnetic-catppuccin-gtk.override { tweaks = [ "black" ]; accent = [ "mauve" ]; From 09effcb28c948c03e7ef41204e47f137f7bfb60b Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 4 Feb 2026 19:08:33 +0100 Subject: [PATCH 36/81] flake update --- flake.lock | 42 +++++++++++++++++++++--------------------- flake.nix | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 7a93cda..43ed4f5 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1769432988, - "narHash": "sha256-q4arZjXnLiuMnLzO972lrXIGdzyGb4DGaIt69CcCYdE=", + "lastModified": 1769946009, + "narHash": "sha256-cjPsPx3qlP7RW78lcGJoTP/B6yqY6BJJjwT7QUg8ByY=", "owner": "catppuccin", "repo": "nix", - "rev": "d7a8632c0d8d144478aac1a8c8d5083b770cbb03", + "rev": "ff59ad5085b7d71705ea1f019c02b08dfe40d9c8", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1769723138, - "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=", + "lastModified": 1770164260, + "narHash": "sha256-mQgOAYWlVJyuyXjZN6yxqXWyODvQI5P/UZUCU7IOuYo=", "owner": "nix-community", "repo": "home-manager", - "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073", + "rev": "4fda26500b4539e0a1e3afba9f0e1616bdad4f85", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1769694617, - "narHash": "sha256-h8+Wqc4x68mN2qOLX45HsO6Z4eQOfrdtSKiSzcBrCVg=", + "lastModified": 1770208963, + "narHash": "sha256-5oMhKcLzNLMy9GFpHtrZ6XJdgJpthhprv2ZC88DPN5Q=", "owner": "hyprwm", "repo": "hyprland", - "rev": "c92fb5e85f4a5fd3a0f5ffb5892f6a61cfe1be2b", + "rev": "02ff413002eddd7419ba70eb0f9f92acd2d97ddc", "type": "github" }, "original": { @@ -642,11 +642,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769018530, - "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -658,11 +658,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1770115704, + "narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "e6eae2ee2110f3d31110d5c222cd395303343b08", "type": "github" }, "original": { @@ -750,11 +750,11 @@ ] }, "locked": { - "lastModified": 1769069492, - "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", + "lastModified": 1769939035, + "narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", + "rev": "a8ca480175326551d6c4121498316261cbb5b260", "type": "github" }, "original": { @@ -785,11 +785,11 @@ ] }, "locked": { - "lastModified": 1769469829, - "narHash": "sha256-wFcr32ZqspCxk4+FvIxIL0AZktRs6DuF8oOsLt59YBU=", + "lastModified": 1770145881, + "narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=", "owner": "mic92", "repo": "sops-nix", - "rev": "c5eebd4eb2e3372fe12a8d70a248a6ee9dd02eff", + "rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b233ffd..be60147 100644 --- a/flake.nix +++ b/flake.nix @@ -83,7 +83,7 @@ { inherit lib; - formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); + formatter = forAllSystems (pkgs: pkgs.nixfmt); devShells = forAllSystems (pkgs: import ./dev-shells.nix { inherit pkgs pre-commit-hooks; }); packages = forAllSystems (pkgs: import ./packages { inherit pkgs; }); From 167ef32f74817a77904cc4ccd1012fcc7189affb Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 4 Feb 2026 20:27:46 +0100 Subject: [PATCH 37/81] enable alacritty hints --- .../home/cli/terminals/alacritty/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/home/cli/terminals/alacritty/default.nix b/modules/home/cli/terminals/alacritty/default.nix index 658d18f..b5cb6b8 100644 --- a/modules/home/cli/terminals/alacritty/default.nix +++ b/modules/home/cli/terminals/alacritty/default.nix @@ -18,6 +18,7 @@ selection = { save_to_clipboard = true; }; + window = { padding = { x = 3; @@ -25,6 +26,22 @@ }; }; + hints.enabled = [ + # Hint to copy uuids + { + action = "Copy"; + hyperlinks = true; + post_processing = true; + # URL, email, ipv4/6, UUID, Git-Hash + regex = ''(?:(?:https?://|ssh://)[^\\s<>"']+|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}|\\[(?:[0-9A-Fa-f]{0,4}:){2,7}[0-9A-Fa-f]{0,4}\\]|(?:[0-9A-Fa-f]{0,4}:){2,7}[0-9A-Fa-f]{0,4}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|[0-9a-fA-F]{7,40})''; + + binding = { + key = "H"; + mods = "Control|Shift"; + }; + } + ]; + font = let fontname = "CaskaydiaCove Nerd Font"; From ecf7182f4c0fd419e782ce367efa0c73bb14d30d Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 6 Feb 2026 00:20:45 +0100 Subject: [PATCH 38/81] Add secret for kubex --- .sops.yaml | 5 +++++ flake.nix | 1 + hosts/kubex/default.nix | 27 ++++++++++++++++++++------- hosts/kubex/secrets.yaml | 25 +++++++++++++++++++++++++ modules/home/secrets.yaml | 7 +++---- 5 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 hosts/kubex/secrets.yaml diff --git a/.sops.yaml b/.sops.yaml index 201a93c..9cd643e 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -9,3 +9,8 @@ creation_rules: - age: - *rap_zion - *firefly + - path_regex: hosts/kubex/secrets.yaml$ + key_groups: + - age: + - *kubex + - *rap_zion diff --git a/flake.nix b/flake.nix index be60147..c6ce39d 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,7 @@ nixosModules = [ inputs.catppuccin.nixosModules.catppuccin + inputs.sops-nix.nixosModules.sops (inputs.import-tree.match ".*/default\\.nix" ./modules/nixos) ./modules/nix.nix ]; diff --git a/hosts/kubex/default.nix b/hosts/kubex/default.nix index 74fc196..04dc189 100644 --- a/hosts/kubex/default.nix +++ b/hosts/kubex/default.nix @@ -2,20 +2,20 @@ inputs, pkgs, ... -}: { +}: +{ imports = [ inputs.disko.nixosModules.disko ./hardware-configuration.nix ./disko.nix - ../../modules/nixos ]; # Host specific configuration hostConfiguration = { boot = { enable = true; - supportedFilesystems = ["zfs"]; + supportedFilesystems = [ "zfs" ]; }; user = { @@ -25,8 +25,8 @@ "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIKX8MmA9KdHCny6rKCGZlyd/J5qCXh+YDM0/3ZGDmfyaAAAABHNzaDo= yubi@rapsn.me" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn" ]; - extraOptions = {}; - extraGroups = []; + extraOptions = { }; + extraGroups = [ ]; }; roles = { @@ -34,6 +34,19 @@ }; }; + # TODO: make to module + sops.age = { + generateKey = true; + keyFile = "/home/kubex/.config/sops/age/keys.txt"; + }; + + sops.secrets.ssh_config = { + sopsFile = ./secrets.yaml; + path = "/home/kubex/.ssh/config"; + mode = "600"; + owner = "kubex"; + }; + networking = { hostName = "kubex"; hostId = "5851308f"; # Required by zfs @@ -44,8 +57,8 @@ PROMPT = "%m@%n> "; RPROMPT = "%D %T"; }; - systemPackages = [pkgs.restic]; + systemPackages = [ pkgs.restic ]; }; - nix.settings.trusted-users = ["@wheel"]; # need for remote build + nix.settings.trusted-users = [ "@wheel" ]; # need for remote build } diff --git a/hosts/kubex/secrets.yaml b/hosts/kubex/secrets.yaml new file mode 100644 index 0000000..b5ed1ca --- /dev/null +++ b/hosts/kubex/secrets.yaml @@ -0,0 +1,25 @@ +ssh_config: ENC[AES256_GCM,data:64xDEb/HxlPDoStyhWRXB5n3SBT1EgRMJ4nqZcXq2d9sCfkiUA2v0riKHMKLRKyU96rJSTB84LwNMhMRsU1GI784cINReyZfqDVSdum7InSZ1xQjSK32V5qfODU+c2smz0/59ExseDjYv8ccPNfVX5PRyv2ssM8A28Fa/XF13F4aid1hBu82x+RwssG+xISPk9EPsA5L7UvvQJHuT+M8Hq6gby2yi1mL6MTy/HSxGy6jWaYJsZ134yAyyi2xnoYpPrzQyTNkJKDaI1pMnY1Qf3tLT9igcQ7+d5dxM7ffMtVI/XvZxtLQzxTjJcU=,iv:Oo3M9iGmylQ3L5U7ClbDYH8QIVgXfjr7q5iAQ0MAYlg=,tag:Ac/iK+JFMOZaIWiMhQswbw==,type:str] +sops: + age: + - recipient: age1qmfyk82lve992tvzw82d4dgr3ek77xx9m7uez3uq55mgqu6r5eys40evkr + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB1Y3NSbWFHVjMwd3FmVFA2 + OGNzaWZEc3FWdzh5bjJuU1Q4UDhubHB3VGtnCmxMd2lsQkFOM0FsVG5rN3Y4TkM4 + NGZUbndZNldLWGhJcVQ0TGZnejk2cjAKLS0tIGtMMUw5dWdqK29jMXo4bTRzU0lD + ZS92UjhLSGFxTElGN0UvQ3FhSFU4NWcK6oiKj+dXZubGSFoaxTZT1xmgcFbJq0Fi + nSjsj44mPB1TSiPyQmujMdZlT4IBX6lmDXV7KR0zC0E7CprLNxaDRQ== + -----END AGE ENCRYPTED FILE----- + - recipient: age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCZ0wzZmM0ZS9xRTh3NUhK + Wk5FOTlvazd6cUhPSW1EQ05ZSDB3c3g1L2gwCmUrUk5NNmhLazNwSnFUS2VxTUpa + RlE2aFZuMWVqTmZwTkFyVGhqUkZ4SmsKLS0tIHB0Z0lhQTBkdkFKMDhuam1iaWxF + djVYN0ZzOU0vQmg2UDF3MUNHV3pLcUEKrbgYGtMzqWJ5TMyGbiE/VjBx3thLX8j4 + EOgpqO9B9VhvvA7kYxyUAbmNH+QJ0IUWrVPJPQdhMQzwTXifhbLtLg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2026-02-05T23:32:13Z" + mac: ENC[AES256_GCM,data:c2g2+Micq8h9nhYuIO7P7c8+Bgu3rU8JyI5CzPUUJZKS6LyvhuL7siaIBLyB2FxcoBP4WDdBBKr9mLUATagAoBVGHGsO9Q1v/ksCei1OoU4zoUBgNKuZEGrlvB7TU4pAM6fv+6OiFbY/Ts4hOj41P+bbBi06ZyW2D6ligCHMIYw=,iv:raR6SbqP2tLKbWUkgqrD5Un7BhuN9jsHMa4OmlMJ1Rg=,tag:CwZytmB85tCMkOats25wEQ==,type:str] + unencrypted_suffix: _unencrypted + version: 3.11.0 diff --git a/modules/home/secrets.yaml b/modules/home/secrets.yaml index 2f0d5e1..d39b23e 100644 --- a/modules/home/secrets.yaml +++ b/modules/home/secrets.yaml @@ -1,5 +1,4 @@ -ssh_config: ENC[AES256_GCM,data:vGa5w0lLAscKQgoMREat343g/pKGNQ2bPdp0O1RmePLuBYu2S2euVBzMY6vbC09rMVViIrnR8LVLbdyJFi2Us1DBAZByck5dYDB2JJ04hemHVyKeuF5IlKb4zEcRfzFAGc6TlaBr0Y1A8TtrmmnlzQIw9kP0+8CKLaM6KtJSgjBA3EP+NKuSK/kHBwEPyS008NuXTIjxt348gPq6Q+eA4Jf6LqAY5SzQso02ELtVHblxD7E8ICQfCl4r/fDIpfycYNSTOI2CoTIyS6/WsapQrrBW/9hcDvr7iP0Nap5q7v7fZrazCtuaSOEcxp+xzVWcCcVT3e7/uVVcz/f1U1HZ1DOM31yBuT3NH0ISJzy4XrbRSPNT6EBNv3yr8ChCiTiKx6NckH7QpHIR4mWpCtydUygT2kc5P99WL/WYU2lFC8uu+dG5+mamO5iw7pOiLqjRdZuYac5nqmzaV3MbsKygYdg63l+f7WUud9+nf90DaUyf6xHAkvsMTzY=,iv:mywy0TtgZwPIg568Lx4xYqVYHYFllI3nVdSEhkHzl7k=,tag:IgkWvNn4QNiW3ENDldy0tw==,type:str] -atuin: ENC[AES256_GCM,data:ZgSp0GB28ofHD2Jx+xICoMLiPD9Hi0aL1E8uUxsHRpKuWa7OfYzuknQj3PMKU1NUJCcwCSfGG0LF7Jt44n8Yd+sh98fBxhPxFLR6PegHTfF8kkPpMz7cHKfFRK+JjOvTDzPr6A5ZAjlBuwQOcdBN5yatb7pMl0uXJoSPJ1DFTIoUvmw0FhbXHuc2HRDqR5PHyA==,iv:hhnVj2xP7Bpw7PldRuNoBs8mpee/6fOzK6BrPm5aFIk=,tag:KG1Z8yKQbKr79JBt/rDlKQ==,type:str] +ssh_config: ENC[AES256_GCM,data:FSxU3PQPan52dZuZeWORY8QEZU1uJt8xrua48lu4qNlmRd7j/rJHLeKDPNIgdOPxEGspxn/OVW9pt5N6h1LDe5CAT2fdxB8ij7LK7u8ZEWqCt02bqr/tLFSpxRcGvM0DHsQPozfaldav6UszbARqPCRTAdQSP+2UHVTc3G734SR0xoXv0W5y+iB1b17y8YvkHovNDfFe+I9ctslbJxxp7MllnrAbkvZLxxfna9ZCy+KpHcaDnkQouQZ6GyfNCffEoA0MxaQkOtyA+JUpcFkFuDKARe+w3OTex5LWlieNIDkfSDIGqFqUJDLtg4ldYJgo9x6y2kDYFZjzKNidxZ8RHr70MaZSyghfkYHNsx5sf1zcO6IOIzX/FAsPY4RjrgiUAx8efQ34jxYK7bNkHhKQL+wNUZyuP6c0rYOPZdeHvb2oPHagyxyJ80VsFrZylXH5MzTU/TDfDyTAHw7nwpvXe7465/+E0BadxsEnts/TxmpBnJass6zdOQmt9BJgx4fggFnxhN3J+WRKlUFqILRN4bIf2gWXuL7TtWOi4WTC+bVHtoV6XVfWa1aXKsEhr/Rut37nzsPZJIRQdQl8PTANdH3haVb2Dbr8EBsTLnRzdunG7BSZqrHS3NlgMIvCd5V3tr2i8K4+naQ1Pf6HX5WBA722iVkmFCOH8ylRHosLpZT5WmIAxgIB9nmrmia6kNd+29dGy7P8QAhu7+QFyCsqrwhJuTWNDIzuM3BHle4nJ/si2R+HLKUhU1B74VGR7WTsBZC9NdUMBrstOFnHAMfeobkL1TrZHoU5DaPDu4Q=,iv:gDbgOr7AoJBZnwEk4NUTtBIIfgrccyApY97qUDAbBkU=,tag:dPJQ3MYC9xmvcUxKcqqjRA==,type:str] sops: age: - recipient: age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf @@ -20,7 +19,7 @@ sops: bURQd1VuZ1VRYnhVNEJGY21BdFNOdncKLArYp3z6H2gu8ZP/+LxXu4bd0wEFQO+6 m33V0qCP/EDkyXgTj07+8M2B/z75Kx2+b1FFCi/dN0aF/jpVYdwdWQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-12-02T15:03:44Z" - mac: ENC[AES256_GCM,data:gCuKWTJ5vCRe6M5/bpXZvFBKxfSRzGlwgQ6XctJ56kX/eVd5mztYp1aAZExn4+pRrd+8MpIdposfKmFpy59dD/g4jb1e5dvplQx+9Yv2okMnhLgS/zxCc70+HuFwqUFI1wA4C5YF3qFldKPxByQr1+z/HMFuCpByYZ5YZ0kiAbY=,iv:HCf3NB3PucaybWpmG3kdrLx6w1m4uJf35oE7igAqQMk=,tag:zOXCxQ5C6c5sNr6DXpV3EA==,type:str] + lastmodified: "2026-02-05T22:54:02Z" + mac: ENC[AES256_GCM,data:8nBJ0RzeKWEOj+b5PKThmkOX9MrGZf91qG8Q3wJTn2UCZwcoVpy5lSwspZqJ2M5I7TwYe62BtQ9R0PMDBLKkyvVt68NDJQS0ky+rUQCXjkRivmgDDOcvppJ/6THQTJWQc+0PbqVY3eNMyNz14oMfc6bPSmjYmqQ7FzWNK+/57JU=,iv:u/kRVihG0L7JV+Iqal6sHd0RtkTBafPFS1cPMgJ8k7A=,tag:TK6J1d++P9iy8BBsdoYq9g==,type:str] unencrypted_suffix: _unencrypted version: 3.11.0 From 54abc47c3359f916548fe238f87da8072a76a668 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 13 Feb 2026 20:11:15 +0100 Subject: [PATCH 39/81] Add some nixberry stuffl --- hosts/nixberry/default.nix | 18 +++++++++--------- modules/nixos/system/user.nix | 8 ++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hosts/nixberry/default.nix b/hosts/nixberry/default.nix index e991b69..2fdb4fa 100644 --- a/hosts/nixberry/default.nix +++ b/hosts/nixberry/default.nix @@ -1,9 +1,9 @@ { - pkgs, inputs, lib, ... -}: { +}: +{ imports = [ inputs.nixos-hardware.nixosModules.raspberry-pi-3 @@ -15,9 +15,11 @@ user = { name = "rap"; initialHashedPassword = "$y$j9T$8uQSJbY6w9kjXnj74JKjA1$pWYgNf.gb497suX//oIw6aggEPoD2Xv1kvMKZfDTOU/"; - keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn"]; - extraOptions = {}; - extraGroups = []; + keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn" + ]; + extraOptions = { }; + extraGroups = [ ]; }; boot.enable = false; @@ -31,7 +33,7 @@ "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; - options = ["noatime"]; + options = [ "noatime" ]; }; }; @@ -46,9 +48,7 @@ } ]; - environment.systemPackages = with pkgs; [neovim]; - - nix.settings.trusted-users = ["@wheel"]; # need for remote build + nix.settings.trusted-users = [ "@wheel" ]; # need for remote build nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/modules/nixos/system/user.nix b/modules/nixos/system/user.nix index 10c1fc1..9e1be05 100644 --- a/modules/nixos/system/user.nix +++ b/modules/nixos/system/user.nix @@ -3,6 +3,7 @@ mylib, config, pkgs, + inputs, ... }: with lib; @@ -47,5 +48,12 @@ in services.openssh.enable = true; nix.optimise.automatic = true; system.stateVersion = "24.11"; + + # TODO: make common packages as module + environment.systemPackages = [ + inputs.neonix.packages.${pkgs.stdenv.hostPlatform.system}.mini + pkgs.jq + pkgs.tmux + ]; }; } From fe52fefbb20c9b8e9689972276b65e13ae790910 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 13 Feb 2026 20:48:38 +0100 Subject: [PATCH 40/81] fix chrome --- modules/home/browsers/chromium/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/home/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix index 97ede31..e34e706 100644 --- a/modules/home/browsers/chromium/default.nix +++ b/modules/home/browsers/chromium/default.nix @@ -9,8 +9,7 @@ commandLineArgs = [ "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" - "--enable-wayland-ime" - "--disable-gpu" + "--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo" ]; }; From 9d68053f3b7866cc0e0f7de4405efc2f794ea163 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 13 Feb 2026 20:48:43 +0100 Subject: [PATCH 41/81] nix flake update --- flake.lock | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/flake.lock b/flake.lock index 43ed4f5..982cb38 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1769428758, - "narHash": "sha256-0G/GzF7lkWs/yl82bXuisSqPn6sf8YGTnbEdFOXvOfU=", + "lastModified": 1770411700, + "narHash": "sha256-VpeOlyospHF+vxE+xEGEy0utMN0d/FUDvD2dOg9ZiIo=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "def5e74c97370f15949a67c62e61f1459fcb0e15", + "rev": "b91f570bb7885df9e4a512d6e95a13960a5bdca0", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1769946009, - "narHash": "sha256-cjPsPx3qlP7RW78lcGJoTP/B6yqY6BJJjwT7QUg8ByY=", + "lastModified": 1770551880, + "narHash": "sha256-+cS5yXWsSLiK36+PP/+dcQdxpXSclx2d65p7l6Dis+A=", "owner": "catppuccin", "repo": "nix", - "rev": "ff59ad5085b7d71705ea1f019c02b08dfe40d9c8", + "rev": "db4dfe3f2a80e9c33492d839accd49f75c7324c2", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1770164260, - "narHash": "sha256-mQgOAYWlVJyuyXjZN6yxqXWyODvQI5P/UZUCU7IOuYo=", + "lastModified": 1770995331, + "narHash": "sha256-MZOF7PVKDOMAOp6bJpzuKOb1DVcyUT84568r8y3iVGg=", "owner": "nix-community", "repo": "home-manager", - "rev": "4fda26500b4539e0a1e3afba9f0e1616bdad4f85", + "rev": "5e90b62996d56da9acb21e502c078e7c4e6ab40f", "type": "github" }, "original": { @@ -289,11 +289,11 @@ ] }, "locked": { - "lastModified": 1769284023, - "narHash": "sha256-xG34vwYJ79rA2wVC8KFuM8r36urJTG6/csXx7LiiSYU=", + "lastModified": 1770511807, + "narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "13c536659d46893596412d180449353a900a1d31", + "rev": "7c75487edd43a71b61adb01cae8326d277aab683", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1770208963, - "narHash": "sha256-5oMhKcLzNLMy9GFpHtrZ6XJdgJpthhprv2ZC88DPN5Q=", + "lastModified": 1770847962, + "narHash": "sha256-nNE++7RzSdpKwE2sUV3P9q7/8qQQLZBzOjncyeTv55A=", "owner": "hyprwm", "repo": "hyprland", - "rev": "02ff413002eddd7419ba70eb0f9f92acd2d97ddc", + "rev": "81a029e5049853481c36379caeb1fa1beeb097ee", "type": "github" }, "original": { @@ -498,11 +498,11 @@ ] }, "locked": { - "lastModified": 1766253372, - "narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=", + "lastModified": 1770139857, + "narHash": "sha256-bCqxcXjavgz5KBJ/1CBLqnagMMf9JvU1m9HmYVASKoc=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9", + "rev": "9038eec033843c289b06b83557a381a2648d8fa5", "type": "github" }, "original": { @@ -523,11 +523,11 @@ ] }, "locked": { - "lastModified": 1763640274, - "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "lastModified": 1770501770, + "narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40", "type": "github" }, "original": { @@ -552,11 +552,11 @@ ] }, "locked": { - "lastModified": 1769202094, - "narHash": "sha256-gdJr/vWWLRW85ucatSjoBULPB2dqBJd/53CZmQ9t91Q=", + "lastModified": 1770203293, + "narHash": "sha256-PR/KER+yiHabFC/h1Wjb+9fR2Uy0lWM3Qld7jPVaWkk=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "a45ca05050d22629b3c7969a926d37870d7dd75c", + "rev": "37bc90eed02b0c8b5a77a0b00867baf3005cfb98", "type": "github" }, "original": { @@ -626,11 +626,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1769302137, - "narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=", + "lastModified": 1770882871, + "narHash": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8", + "rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b", "type": "github" }, "original": { @@ -642,11 +642,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1770197578, + "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", "type": "github" }, "original": { @@ -658,11 +658,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1770115704, - "narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=", + "lastModified": 1770841267, + "narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e6eae2ee2110f3d31110d5c222cd395303343b08", + "rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae", "type": "github" }, "original": { @@ -705,11 +705,11 @@ ] }, "locked": { - "lastModified": 1769069492, - "narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", + "lastModified": 1769939035, + "narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", + "rev": "a8ca480175326551d6c4121498316261cbb5b260", "type": "github" }, "original": { @@ -750,11 +750,11 @@ ] }, "locked": { - "lastModified": 1769939035, - "narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=", + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "a8ca480175326551d6c4121498316261cbb5b260", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", "type": "github" }, "original": { @@ -785,11 +785,11 @@ ] }, "locked": { - "lastModified": 1770145881, - "narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=", + "lastModified": 1770683991, + "narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=", "owner": "mic92", "repo": "sops-nix", - "rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c", + "rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033", "type": "github" }, "original": { From 3eb0c98e9ac2a8948281235cb1ca17a857d7dc14 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 21 Feb 2026 21:58:04 +0100 Subject: [PATCH 42/81] enhance timeout --- modules/nixos/system/boot.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/nixos/system/boot.nix b/modules/nixos/system/boot.nix index e859466..6e0e597 100644 --- a/modules/nixos/system/boot.nix +++ b/modules/nixos/system/boot.nix @@ -3,22 +3,24 @@ config, ... }: -with lib; let +with lib; +let cfg = config.hostConfiguration.boot; -in { +in +{ options.hostConfiguration.boot = { enable = mkEnableOption "Enable install / config of bootloader"; armSupport = mkEnableOption "Enable arm cross-compiler support"; supportedFilesystems = mkOption { type = with types; listOf str; - default = []; + default = [ ]; }; }; config = mkIf cfg.enable { boot = { inherit (cfg) supportedFilesystems; - binfmt.emulatedSystems = mkIf cfg.armSupport ["aarch64-linux"]; + binfmt.emulatedSystems = mkIf cfg.armSupport [ "aarch64-linux" ]; consoleLogLevel = 3; initrd.verbose = false; @@ -32,7 +34,7 @@ in { ]; loader = { - timeout = mkDefault 0; + timeout = 3; systemd-boot = { enable = true; From 73cd8941923622adc8e08d30bf0e73752f262177 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Feb 2026 19:21:06 +0100 Subject: [PATCH 43/81] flake update & minor changes --- flake.lock | 131 ++++++++++-------- flake.nix | 2 +- hosts/firefly/home.nix | 2 +- modules/home/cli/tools/core/packages.nix | 1 + modules/home/cli/tools/git/default.nix | 6 + modules/home/desktops/hyprland/hyprland.nix | 6 +- .../home/desktops/hyprland/settings/binds.nix | 2 +- modules/nixos/system/default.nix | 1 + modules/nixos/system/zsh.nix | 12 ++ 9 files changed, 99 insertions(+), 64 deletions(-) create mode 100644 modules/nixos/system/zsh.nix diff --git a/flake.lock b/flake.lock index 982cb38..3c7dfb8 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1770411700, - "narHash": "sha256-VpeOlyospHF+vxE+xEGEy0utMN0d/FUDvD2dOg9ZiIo=", + "lastModified": 1772292445, + "narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "b91f570bb7885df9e4a512d6e95a13960a5bdca0", + "rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1770551880, - "narHash": "sha256-+cS5yXWsSLiK36+PP/+dcQdxpXSclx2d65p7l6Dis+A=", + "lastModified": 1772153824, + "narHash": "sha256-T65qXmlcD9qFpPTi+mOXsn4dIkO2N8Ls67nqmuzepv0=", "owner": "catppuccin", "repo": "nix", - "rev": "db4dfe3f2a80e9c33492d839accd49f75c7324c2", + "rev": "4b0f5b7bf7b3eeb484d49524f3c9791864ab9362", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1769524058, - "narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=", + "lastModified": 1772420042, + "narHash": "sha256-naZz40TUFMa0E0CutvwWsSPhgD5JldyTUDEgP9ADpfU=", "owner": "nix-community", "repo": "disko", - "rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d", + "rev": "5af7af10f14706e4095bd6bc0d9373eb097283c6", "type": "github" }, "original": { @@ -128,11 +128,11 @@ ] }, "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1770995331, - "narHash": "sha256-MZOF7PVKDOMAOp6bJpzuKOb1DVcyUT84568r8y3iVGg=", + "lastModified": 1772633327, + "narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=", "owner": "nix-community", "repo": "home-manager", - "rev": "5e90b62996d56da9acb21e502c078e7c4e6ab40f", + "rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc", "type": "github" }, "original": { @@ -321,11 +321,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1770847962, - "narHash": "sha256-nNE++7RzSdpKwE2sUV3P9q7/8qQQLZBzOjncyeTv55A=", + "lastModified": 1772654524, + "narHash": "sha256-wZ+NFWqNye3FCAEE36dfK60ZrWZCQz2xYiejO/aZ8WQ=", "owner": "hyprwm", "repo": "hyprland", - "rev": "81a029e5049853481c36379caeb1fa1beeb097ee", + "rev": "34c7cc7d38256f32f30a947f8b459df220149feb", "type": "github" }, "original": { @@ -421,11 +421,11 @@ ] }, "locked": { - "lastModified": 1767983607, - "narHash": "sha256-8C2co8NYfR4oMOUEsPROOJ9JHrv9/ktbJJ6X1WsTbXc=", + "lastModified": 1771866172, + "narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "d4037379e6057246b408bbcf796cf3e9838af5b2", + "rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41", "type": "github" }, "original": { @@ -498,11 +498,11 @@ ] }, "locked": { - "lastModified": 1770139857, - "narHash": "sha256-bCqxcXjavgz5KBJ/1CBLqnagMMf9JvU1m9HmYVASKoc=", + "lastModified": 1771271487, + "narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "9038eec033843c289b06b83557a381a2648d8fa5", + "rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d", "type": "github" }, "original": { @@ -552,11 +552,11 @@ ] }, "locked": { - "lastModified": 1770203293, - "narHash": "sha256-PR/KER+yiHabFC/h1Wjb+9fR2Uy0lWM3Qld7jPVaWkk=", + "lastModified": 1771606233, + "narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "37bc90eed02b0c8b5a77a0b00867baf3005cfb98", + "rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a", "type": "github" }, "original": { @@ -567,11 +567,26 @@ }, "import-tree": { "locked": { - "lastModified": 1763762820, - "narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=", + "lastModified": 1772344373, + "narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=", "owner": "vic", "repo": "import-tree", - "rev": "3c23749d8013ec6daa1d7255057590e9ca726646", + "rev": "10fda59eee7d7970ec443b925f32a1bc7526648c", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, + "import-tree_2": { + "locked": { + "lastModified": 1771045967, + "narHash": "sha256-oYO4poyw0Sb/db2PigqugMlDwsvwLg6CSpFrMUWxA3Q=", + "owner": "vic", + "repo": "import-tree", + "rev": "c968d3b54d12cf5d9c13f16f7c545a06c9d1fde6", "type": "github" }, "original": { @@ -603,6 +618,7 @@ }, "neonix": { "inputs": { + "import-tree": "import-tree_2", "nixpkgs": [ "nixpkgs" ], @@ -610,27 +626,26 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1769096381, - "narHash": "sha256-vq37IUSDP36hZAVQp3jgd2ckk+9A+ScwSaoPm/oj57Y=", + "lastModified": 1772644229, + "narHash": "sha256-8BmH5+4M/cLaGxptPP0xCW1I7EhyvkffgrQC8KyeBP0=", "owner": "rgroemmer", "repo": "neonix", - "rev": "f000ad1ffd410389e3df0c0bfba734ccbb79680b", + "rev": "09a231c5dc1374079f42c56262d7cd07c8edc87d", "type": "github" }, "original": { "owner": "rgroemmer", - "ref": "plugin-enhancement", "repo": "neonix", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1770882871, - "narHash": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=", + "lastModified": 1771969195, + "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b", + "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", "type": "github" }, "original": { @@ -642,11 +657,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770197578, - "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", "type": "github" }, "original": { @@ -658,11 +673,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1770841267, - "narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=", + "lastModified": 1772542754, + "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae", + "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", "type": "github" }, "original": { @@ -682,11 +697,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1768910181, - "narHash": "sha256-YRU0IHMzXluZxr0JDfq9jtblb4DV7MIB5wj2jYMFKQc=", + "lastModified": 1771135771, + "narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=", "owner": "nix-community", "repo": "nixvim", - "rev": "5b138edcb2f1c3ed4b29eca3658f04f0639b98b3", + "rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba", "type": "github" }, "original": { @@ -705,11 +720,11 @@ ] }, "locked": { - "lastModified": 1769939035, - "narHash": "sha256-Fok2AmefgVA0+eprw2NDwqKkPGEI5wvR+twiZagBvrg=", + "lastModified": 1772024342, + "narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "a8ca480175326551d6c4121498316261cbb5b260", + "rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476", "type": "github" }, "original": { @@ -728,11 +743,11 @@ ] }, "locked": { - "lastModified": 1768935149, - "narHash": "sha256-S5/BZo4X1D9+U/yJ6xCJyUkXZ8y261q2gPP5Xsq8RPU=", + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "18cbede9ff6da05b911c5c4802a397c2686ac8fa", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", "type": "github" }, "original": { @@ -750,11 +765,11 @@ ] }, "locked": { - "lastModified": 1770726378, - "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "lastModified": 1772665116, + "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198", "type": "github" }, "original": { @@ -785,11 +800,11 @@ ] }, "locked": { - "lastModified": 1770683991, - "narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=", + "lastModified": 1772495394, + "narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=", "owner": "mic92", "repo": "sops-nix", - "rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033", + "rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c6ce39d..6996443 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; neonix = { - url = "github:rgroemmer/neonix/plugin-enhancement"; + url = "github:rgroemmer/neonix"; inputs.nixpkgs.follows = "nixpkgs"; }; krewfile = { diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 1f2be1f..41d3618 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -7,7 +7,7 @@ { roles = { work = true; - email = "raphael.groemmer@stackit.cloud"; + email = "raphael.groemmer@digits.schwarz"; apparmor-gen = with pkgs; [ config.programs.chromium.finalPackage diff --git a/modules/home/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix index 376627c..177e037 100644 --- a/modules/home/cli/tools/core/packages.nix +++ b/modules/home/cli/tools/core/packages.nix @@ -27,6 +27,7 @@ nmap netcat tcpdump + iproute2 # Text processing jq diff --git a/modules/home/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix index 20a7f98..4aeaf90 100644 --- a/modules/home/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -63,6 +63,12 @@ user.email = "github@rapsn.me"; }; } + { + condition = "gitdir:~/Projects/rapsnx/**"; + contents = { + user.email = "github@rapsn.me"; + }; + } { condition = "gitdir:~/Projects/schwarzit/**"; contents = { diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index f907427..b4cf853 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -36,9 +36,9 @@ in enable = true; inherit (cfg) package; - plugins = with hyprlandPlugins; [ - hyprexpo - ]; + # plugins = with hyprlandPlugins; [ + # hyprexpo + # ]; # systemd.enable = false; # Disable for uswm }; diff --git a/modules/home/desktops/hyprland/settings/binds.nix b/modules/home/desktops/hyprland/settings/binds.nix index d085c19..e895a23 100644 --- a/modules/home/desktops/hyprland/settings/binds.nix +++ b/modules/home/desktops/hyprland/settings/binds.nix @@ -22,7 +22,7 @@ in "SUPER,N, exec, swaync-client -t" # Plugins - "SUPER, g, hyprexpo:expo, toggle" + # "SUPER, g, hyprexpo:expo, toggle" ]; }; } diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index 692b8b6..89a3a13 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -4,5 +4,6 @@ ./boot.nix ./user.nix ./locale.nix + ./zsh.nix ]; } diff --git a/modules/nixos/system/zsh.nix b/modules/nixos/system/zsh.nix new file mode 100644 index 0000000..ef1f2dd --- /dev/null +++ b/modules/nixos/system/zsh.nix @@ -0,0 +1,12 @@ +{ + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + + shellInit = '' + eval "$(fzf --zsh)" + ''; + }; +} From 115bd1991ebe868a3cf56abcc0809a6dbb8bf572 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 5 Mar 2026 01:02:52 +0100 Subject: [PATCH 44/81] rename to hostConfig, move nixos config to modules --- hosts/kubex/default.nix | 12 +++---- hosts/nixberry/default.nix | 2 +- hosts/vinox/default.nix | 2 +- hosts/vinox/diagnostics.nix | 15 ++------ hosts/zion/default.nix | 2 +- modules/nixos/roles/desktop/explorer.nix | 4 +-- modules/nixos/roles/desktop/fonts.nix | 10 +++--- modules/nixos/roles/desktop/hyprland.nix | 2 +- modules/nixos/roles/desktop/power.nix | 8 +++-- modules/nixos/roles/gaming/default.nix | 14 ++++---- modules/nixos/roles/k3s/default.nix | 4 +-- modules/nixos/roles/k3s/network.nix | 8 +++-- modules/nixos/roles/k3s/service.nix | 8 +++-- modules/nixos/services/bluetooth.nix | 10 +++--- modules/nixos/services/default.nix | 1 + modules/nixos/services/opengl.nix | 12 ++++--- modules/nixos/services/podman.nix | 10 +++--- modules/nixos/services/printer.nix | 10 +++--- modules/nixos/services/sops.nix | 19 ++++++++++ modules/nixos/services/sound.nix | 10 +++--- modules/nixos/services/tailscale.nix | 10 +++--- modules/nixos/system/boot.nix | 4 +-- modules/nixos/system/env.nix | 44 +++++++++++++++++------- modules/nixos/system/user.nix | 12 ++----- modules/nixos/system/zsh.nix | 19 +++++----- 25 files changed, 147 insertions(+), 105 deletions(-) create mode 100644 modules/nixos/services/sops.nix diff --git a/hosts/kubex/default.nix b/hosts/kubex/default.nix index 04dc189..9b27dfc 100644 --- a/hosts/kubex/default.nix +++ b/hosts/kubex/default.nix @@ -11,8 +11,7 @@ ./disko.nix ]; - # Host specific configuration - hostConfiguration = { + hostConfig = { boot = { enable = true; supportedFilesystems = [ "zfs" ]; @@ -32,12 +31,9 @@ roles = { k3s = true; }; - }; - - # TODO: make to module - sops.age = { - generateKey = true; - keyFile = "/home/kubex/.config/sops/age/keys.txt"; + services = { + sops = true; + }; }; sops.secrets.ssh_config = { diff --git a/hosts/nixberry/default.nix b/hosts/nixberry/default.nix index 2fdb4fa..08af836 100644 --- a/hosts/nixberry/default.nix +++ b/hosts/nixberry/default.nix @@ -11,7 +11,7 @@ ]; # Host specific configuration - hostConfiguration = { + hostConfig = { user = { name = "rap"; initialHashedPassword = "$y$j9T$8uQSJbY6w9kjXnj74JKjA1$pWYgNf.gb497suX//oIw6aggEPoD2Xv1kvMKZfDTOU/"; diff --git a/hosts/vinox/default.nix b/hosts/vinox/default.nix index f3739f5..faf32ae 100644 --- a/hosts/vinox/default.nix +++ b/hosts/vinox/default.nix @@ -13,7 +13,7 @@ ]; # Host specific configuration - hostConfiguration = { + hostConfig = { boot = { enable = true; supportedFilesystems = [ "ntfs" ]; diff --git a/hosts/vinox/diagnostics.nix b/hosts/vinox/diagnostics.nix index 2673285..ca52a49 100644 --- a/hosts/vinox/diagnostics.nix +++ b/hosts/vinox/diagnostics.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = with pkgs; [ # General util-linux @@ -44,17 +45,5 @@ usbutils pciutils hardinfo2 - - # Tooling - git - curl - - jq - yq-go - gawk - gnused - - p7zip - gnumake ]; } diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index f736d02..4a00b30 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -5,7 +5,7 @@ ]; # Host specific configuration - hostConfiguration = { + hostConfig = { boot = { enable = true; armSupport = true; diff --git a/modules/nixos/roles/desktop/explorer.nix b/modules/nixos/roles/desktop/explorer.nix index 497390f..7fa7584 100644 --- a/modules/nixos/roles/desktop/explorer.nix +++ b/modules/nixos/roles/desktop/explorer.nix @@ -6,10 +6,10 @@ }: with lib; let - cfg = config.hostConfiguration.roles.desktop; + cfg = config.hostConfig.roles.desktop; in { - options.hostConfiguration.roles.desktop = mkEnableOption "Enable hyprland and desktop features."; + options.hostConfig.roles.desktop = mkEnableOption "Enable hyprland and desktop features."; config = mkIf cfg { programs = { diff --git a/modules/nixos/roles/desktop/fonts.nix b/modules/nixos/roles/desktop/fonts.nix index d10b142..f56dad3 100644 --- a/modules/nixos/roles/desktop/fonts.nix +++ b/modules/nixos/roles/desktop/fonts.nix @@ -4,9 +4,11 @@ pkgs, ... }: -with lib; let - cfg = config.hostConfiguration.roles.desktop; -in { +with lib; +let + cfg = config.hostConfig.roles.desktop; +in +{ config = mkIf cfg { nixpkgs.config.joypixels.acceptLicense = true; fonts = { @@ -30,7 +32,7 @@ in { lcdfilter = "light"; }; defaultFonts = { - emoji = ["Joypixels"]; + emoji = [ "Joypixels" ]; }; }; }; diff --git a/modules/nixos/roles/desktop/hyprland.nix b/modules/nixos/roles/desktop/hyprland.nix index 6497ec9..baede18 100644 --- a/modules/nixos/roles/desktop/hyprland.nix +++ b/modules/nixos/roles/desktop/hyprland.nix @@ -6,7 +6,7 @@ }: with lib; let - cfg = config.hostConfiguration.roles.desktop; + cfg = config.hostConfig.roles.desktop; in { config = mkIf cfg { diff --git a/modules/nixos/roles/desktop/power.nix b/modules/nixos/roles/desktop/power.nix index 41939ff..5bc26e9 100644 --- a/modules/nixos/roles/desktop/power.nix +++ b/modules/nixos/roles/desktop/power.nix @@ -3,9 +3,11 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.roles.desktop; -in { +with lib; +let + cfg = config.hostConfig.roles.desktop; +in +{ config = mkIf cfg { powerManagement.enable = false; systemd.targets = { diff --git a/modules/nixos/roles/gaming/default.nix b/modules/nixos/roles/gaming/default.nix index eab288a..7ca767f 100644 --- a/modules/nixos/roles/gaming/default.nix +++ b/modules/nixos/roles/gaming/default.nix @@ -4,10 +4,12 @@ pkgs, ... }: -with lib; let - cfg = config.hostConfiguration.roles.gaming; -in { - options.hostConfiguration.roles.gaming = mkEnableOption "Enable NixOS gaming environment."; +with lib; +let + cfg = config.hostConfig.roles.gaming; +in +{ + options.hostConfig.roles.gaming = mkEnableOption "Enable NixOS gaming environment."; config = mkIf cfg { services.ratbagd.enable = true; # Daemon to configure gaming mice, GUI piper comes through HM. @@ -18,8 +20,8 @@ in { steam = { enable = true; package = pkgs.steam.override { - extraPkgs = p: - with p; [ + extraPkgs = + p: with p; [ mangohud # Fps widget ingame gamemode ]; diff --git a/modules/nixos/roles/k3s/default.nix b/modules/nixos/roles/k3s/default.nix index d8257a3..b71a91c 100644 --- a/modules/nixos/roles/k3s/default.nix +++ b/modules/nixos/roles/k3s/default.nix @@ -6,7 +6,7 @@ }: with lib; let - cfg = config.hostConfiguration.roles.k3s; + cfg = config.hostConfig.roles.k3s; getConfig = pkgs.writeShellScriptBin "getConfig" '' mkdir -p ~/.kube/ sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config @@ -19,7 +19,7 @@ in ./network.nix ]; - options.hostConfiguration.roles.k3s = mkEnableOption "Enable k3s cluster configuration."; + options.hostConfig.roles.k3s = mkEnableOption "Enable k3s cluster configuration."; config = mkIf cfg { environment = { diff --git a/modules/nixos/roles/k3s/network.nix b/modules/nixos/roles/k3s/network.nix index 2f66fda..11428e5 100644 --- a/modules/nixos/roles/k3s/network.nix +++ b/modules/nixos/roles/k3s/network.nix @@ -3,9 +3,11 @@ lib, ... }: -with lib; let - cfg = config.hostConfiguration.roles.k3s; -in { +with lib; +let + cfg = config.hostConfig.roles.k3s; +in +{ config = mkIf cfg { networking = { firewall.allowedTCPPorts = [ diff --git a/modules/nixos/roles/k3s/service.nix b/modules/nixos/roles/k3s/service.nix index ad9522e..0f35fd8 100644 --- a/modules/nixos/roles/k3s/service.nix +++ b/modules/nixos/roles/k3s/service.nix @@ -4,9 +4,11 @@ lib, ... }: -with lib; let - cfg = config.hostConfiguration.roles.k3s; -in { +with lib; +let + cfg = config.hostConfig.roles.k3s; +in +{ config = mkIf cfg { services.k3s = { enable = true; diff --git a/modules/nixos/services/bluetooth.nix b/modules/nixos/services/bluetooth.nix index ad982fa..c540e21 100644 --- a/modules/nixos/services/bluetooth.nix +++ b/modules/nixos/services/bluetooth.nix @@ -3,10 +3,12 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.services.bluetooth; -in { - options.hostConfiguration.services.bluetooth = mkEnableOption "Enable bluetooth features."; +with lib; +let + cfg = config.hostConfig.services.bluetooth; +in +{ + options.hostConfig.services.bluetooth = mkEnableOption "Enable bluetooth features."; config = mkIf cfg { hardware.bluetooth.enable = true; diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 3f00e11..444551a 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -7,5 +7,6 @@ ./tailscale.nix ./printer.nix ./bluetooth.nix + ./sops.nix ]; } diff --git a/modules/nixos/services/opengl.nix b/modules/nixos/services/opengl.nix index 8bda58a..62ef024 100644 --- a/modules/nixos/services/opengl.nix +++ b/modules/nixos/services/opengl.nix @@ -4,17 +4,19 @@ pkgs, ... }: -with lib; let - cfg = config.hostConfiguration.services.opengl; -in { - options.hostConfiguration.services.opengl = mkEnableOption "Enable opengl features."; +with lib; +let + cfg = config.hostConfig.services.opengl; +in +{ + options.hostConfig.services.opengl = mkEnableOption "Enable opengl features."; config = mkIf cfg { hardware = { graphics = { enable = true; enable32Bit = true; - extraPackages = with pkgs; [mesa]; + extraPackages = with pkgs; [ mesa ]; }; }; }; diff --git a/modules/nixos/services/podman.nix b/modules/nixos/services/podman.nix index 14c8706..7cce22f 100644 --- a/modules/nixos/services/podman.nix +++ b/modules/nixos/services/podman.nix @@ -3,10 +3,12 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.services.podman; -in { - options.hostConfiguration.services.podman = mkEnableOption "Enable podman containerization engine:"; +with lib; +let + cfg = config.hostConfig.services.podman; +in +{ + options.hostConfig.services.podman = mkEnableOption "Enable podman containerization engine:"; config = mkIf cfg { virtualisation.containers.enable = true; diff --git a/modules/nixos/services/printer.nix b/modules/nixos/services/printer.nix index 7068090..5f0b0cd 100644 --- a/modules/nixos/services/printer.nix +++ b/modules/nixos/services/printer.nix @@ -3,10 +3,12 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.services.printing; -in { - options.hostConfiguration.services.printing = mkEnableOption "Enable printing service."; +with lib; +let + cfg = config.hostConfig.services.printing; +in +{ + options.hostConfig.services.printing = mkEnableOption "Enable printing service."; config = mkIf cfg { services = { diff --git a/modules/nixos/services/sops.nix b/modules/nixos/services/sops.nix new file mode 100644 index 0000000..bd44b5c --- /dev/null +++ b/modules/nixos/services/sops.nix @@ -0,0 +1,19 @@ +{ + lib, + config, + ... +}: +with lib; +let + cfg = config.hostConfig.services.sops; +in +{ + options.hostConfig.services.sops = mkEnableOption "Enable tailscaled."; + + config = mkIf cfg { + sops.age = { + generateKey = true; + keyFile = "/home/${config.hostConfig.user.name}/.config/sops/age/keys.txt"; + }; + }; +} diff --git a/modules/nixos/services/sound.nix b/modules/nixos/services/sound.nix index 4eb9224..7333f02 100644 --- a/modules/nixos/services/sound.nix +++ b/modules/nixos/services/sound.nix @@ -3,10 +3,12 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.services.sound; -in { - options.hostConfiguration.services.sound = mkEnableOption "Enable sound."; +with lib; +let + cfg = config.hostConfig.services.sound; +in +{ + options.hostConfig.services.sound = mkEnableOption "Enable sound."; config = mkIf cfg { services = { diff --git a/modules/nixos/services/tailscale.nix b/modules/nixos/services/tailscale.nix index 791ee24..27cca79 100644 --- a/modules/nixos/services/tailscale.nix +++ b/modules/nixos/services/tailscale.nix @@ -3,10 +3,12 @@ config, ... }: -with lib; let - cfg = config.hostConfiguration.services.tailscale; -in { - options.hostConfiguration.services.tailscale = mkEnableOption "Enable tailscaled."; +with lib; +let + cfg = config.hostConfig.services.tailscale; +in +{ + options.hostConfig.services.tailscale = mkEnableOption "Enable tailscaled."; config = mkIf cfg { services.tailscale.enable = true; diff --git a/modules/nixos/system/boot.nix b/modules/nixos/system/boot.nix index 6e0e597..2c35a8b 100644 --- a/modules/nixos/system/boot.nix +++ b/modules/nixos/system/boot.nix @@ -5,10 +5,10 @@ }: with lib; let - cfg = config.hostConfiguration.boot; + cfg = config.hostConfig.boot; in { - options.hostConfiguration.boot = { + options.hostConfig.boot = { enable = mkEnableOption "Enable install / config of bootloader"; armSupport = mkEnableOption "Enable arm cross-compiler support"; supportedFilesystems = mkOption { diff --git a/modules/nixos/system/env.nix b/modules/nixos/system/env.nix index 95abf71..13f48c9 100644 --- a/modules/nixos/system/env.nix +++ b/modules/nixos/system/env.nix @@ -1,20 +1,40 @@ -{pkgs, ...}: { +{ + pkgs, + config, + inputs, + ... +}: +{ environment = { - systemPackages = with pkgs; [ - dnsutils # dig, nslookup, etc. - inetutils # ping, traceroute, etc. + systemPackages = + with pkgs; + [ + dnsutils # dig, nslookup, etc. + inetutils # ping, traceroute, etc. - # Cpu & Networking tools - htop - curl + # Cpu & Networking tools + htop + curl - # TODO: Add neonix mini to all non desktops + # Tooling + git + curl + fzf + file - # Programs - git + jq + yq-go + gawk + gnused - fzf - ]; + p7zip + gnumake + ] + ++ lib.optionals (!config.hostConfig.roles.desktop) [ + inputs.neonix.packages.${pkgs.stdenv.hostPlatform.system}.mini + jq + tmux + ]; variables = { EDITOR = "vim"; VISUAL = "vim"; diff --git a/modules/nixos/system/user.nix b/modules/nixos/system/user.nix index 9e1be05..0937fb6 100644 --- a/modules/nixos/system/user.nix +++ b/modules/nixos/system/user.nix @@ -3,16 +3,15 @@ mylib, config, pkgs, - inputs, ... }: with lib; with mylib; let - cfg = config.hostConfiguration.user; + cfg = config.hostConfig.user; in { - options.hostConfiguration.user = with types; { + options.hostConfig.user = with types; { name = mkOpt str "Name of user."; initialHashedPassword = mkOpt str "Password of user."; keys = mkOpt (listOf str) "Public SSH keys of user."; @@ -48,12 +47,5 @@ in services.openssh.enable = true; nix.optimise.automatic = true; system.stateVersion = "24.11"; - - # TODO: make common packages as module - environment.systemPackages = [ - inputs.neonix.packages.${pkgs.stdenv.hostPlatform.system}.mini - pkgs.jq - pkgs.tmux - ]; }; } diff --git a/modules/nixos/system/zsh.nix b/modules/nixos/system/zsh.nix index ef1f2dd..4c47873 100644 --- a/modules/nixos/system/zsh.nix +++ b/modules/nixos/system/zsh.nix @@ -1,12 +1,15 @@ +{ config, lib, ... }: { - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; + config = lib.mkIf (!config.hostConfig.roles.desktop) { + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; - shellInit = '' - eval "$(fzf --zsh)" - ''; + shellInit = '' + eval "$(fzf --zsh)" + ''; + }; }; } From c7ea40e347bce1339b42d0c04acc3291a5141144 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 5 Mar 2026 03:00:00 +0100 Subject: [PATCH 45/81] Add niri --- flake.lock | 191 +++++++++++++++++++++-- flake.nix | 20 ++- hosts/zion/home.nix | 4 + modules/home/desktops/niri/default.nix | 156 ++++++++++++++++++ modules/nixos/roles/desktop/hyprland.nix | 5 +- 5 files changed, 361 insertions(+), 15 deletions(-) create mode 100644 modules/home/desktops/niri/default.nix diff --git a/flake.lock b/flake.lock index 3c7dfb8..b56405e 100644 --- a/flake.lock +++ b/flake.lock @@ -159,6 +159,27 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": [ + "nfsm", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -582,11 +603,11 @@ }, "import-tree_2": { "locked": { - "lastModified": 1771045967, - "narHash": "sha256-oYO4poyw0Sb/db2PigqugMlDwsvwLg6CSpFrMUWxA3Q=", + "lastModified": 1772344373, + "narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=", "owner": "vic", "repo": "import-tree", - "rev": "c968d3b54d12cf5d9c13f16f7c545a06c9d1fde6", + "rev": "10fda59eee7d7970ec443b925f32a1bc7526648c", "type": "github" }, "original": { @@ -626,11 +647,11 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1772644229, - "narHash": "sha256-8BmH5+4M/cLaGxptPP0xCW1I7EhyvkffgrQC8KyeBP0=", + "lastModified": 1772669650, + "narHash": "sha256-+1FsAJde390EntBPUL8rI0SiZ/XsBqVgUH+/rDa8ZcQ=", "owner": "rgroemmer", "repo": "neonix", - "rev": "09a231c5dc1374079f42c56262d7cd07c8edc87d", + "rev": "bdba0bd023bf4ad1c0daf458c16f85fcd0723255", "type": "github" }, "original": { @@ -639,6 +660,86 @@ "type": "github" } }, + "nfsm": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1767882499, + "narHash": "sha256-vH7ILtO2y7wesmbgzi4XiDVjiq2rvLEt4s8sW2t5IpY=", + "owner": "gvolpe", + "repo": "nfsm", + "rev": "c55e5e6bcb5f221f2f032fcf4ec7b06ea34af6b4", + "type": "github" + }, + "original": { + "owner": "gvolpe", + "repo": "nfsm", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1772631301, + "narHash": "sha256-wAHeBX+aSiA+cAlWtwe5NisjMfrJq6WxrtT+CE7/tFM=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "110e61e49828860499ead8bc539470f1261896ae", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1772207631, + "narHash": "sha256-Jkkg+KqshFO3CbTszVVpkKN2AOObYz+wMsM3ONo1z5g=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "e708f546153f74acf33eb183b3b2992587a701e5", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1771969195, @@ -671,6 +772,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1772598333, + "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1772542754, @@ -697,11 +814,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1771135771, - "narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=", + "lastModified": 1772402258, + "narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=", "owner": "nix-community", "repo": "nixvim", - "rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba", + "rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10", "type": "github" }, "original": { @@ -743,11 +860,11 @@ ] }, "locked": { - "lastModified": 1770726378, - "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "lastModified": 1772665116, + "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198", "type": "github" }, "original": { @@ -787,6 +904,8 @@ "import-tree": "import-tree", "krewfile": "krewfile", "neonix": "neonix", + "nfsm": "nfsm", + "niri": "niri", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks_3", @@ -858,6 +977,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -898,6 +1032,39 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1772429643, + "narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6996443..54a1d06 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,16 @@ nixos-hardware.url = "github:nixos/nixos-hardware/master"; catppuccin.url = "github:catppuccin/nix"; + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nfsm = { + # Niri fullscreen manager + url = "github:gvolpe/nfsm"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + import-tree.url = "github:vic/import-tree"; }; @@ -54,11 +64,15 @@ "x86_64-linux" ]; + overlays = [ + (import ./overlays) + inputs.niri.overlays.niri + ]; + pkgsFor = lib.genAttrs systems ( system: import nixpkgs { - inherit system; - overlays = [ (import ./overlays) ]; + inherit system overlays; } ); @@ -67,6 +81,7 @@ nixosModules = [ inputs.catppuccin.nixosModules.catppuccin inputs.sops-nix.nixosModules.sops + inputs.niri.nixosModules.niri (inputs.import-tree.match ".*/default\\.nix" ./modules/nixos) ./modules/nix.nix ]; @@ -76,6 +91,7 @@ inputs.neonix.homeManagerModules.neonix inputs.krewfile.homeManagerModules.krewfile inputs.sops-nix.homeManagerModules.sops + inputs.niri.homeModules.niri (inputs.import-tree.match ".*/default\\.nix" ./modules/home) ./modules/nix.nix ]; diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index ebc4b67..133fb81 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -48,6 +48,10 @@ cmd = "${pkgs.hyprlock}/bin/hyprlock"; }; }; + + desktop.niri = { + enable = true; + }; }; home = { diff --git a/modules/home/desktops/niri/default.nix b/modules/home/desktops/niri/default.nix new file mode 100644 index 0000000..ecc244a --- /dev/null +++ b/modules/home/desktops/niri/default.nix @@ -0,0 +1,156 @@ +{ + pkgs, + lib, + mylib, + config, + ... +}: +with lib; +with mylib; +with pkgs; +let + cfg = config.roles.desktop.niri; +in +{ + options.roles.desktop.niri = { + enable = mkEnableOption "Enable hyprland"; + }; + + config = lib.mkIf cfg.enable { + programs.niri = { + enable = true; + + settings = { + + input = { + keyboard = { + xkb = { + layout = "eu"; + }; + + repeat-delay = 150; + repeat-rate = 45; + }; + + focus-follows-mouse = { + enable = true; + max-scroll-amount = "0%"; + }; + }; + + outputs = { + "DP-1" = { + mode = { + width = 3840; + height = 2160; + refresh = 239.991; + }; + scale = 1.5; + position = { + x = 0; + y = 0; + }; + }; + "DP-1" = { + }; + }; + + workspaces = { + "term" = { + open-on-output = "DP-1"; + }; + "code" = { + open-on-output = "DP-1"; + }; + "spare" = { + open-on-output = "DP-1"; + }; + "browser" = { + open-on-output = "DP-2"; + }; + "chat" = { + open-on-output = "DP-2"; + }; + "gear" = { + open-on-output = "DP-2"; + }; + }; + + prefer-no-csd = true; + + layout = { + gaps = 8; + default-column-width = { + proportion = 0.5; + }; + preset-column-widths = [ + { proportion = 0.25; } + { proportion = 0.33333; } + { proportion = 0.5; } + { proportion = 0.66667; } + { proportion = 0.75; } + { proportion = 1.0; } + ]; + }; + + window-rules = [ + { + clip-to-geometry = true; + geometry-corner-radius = { + bottom-left = 10.0; + bottom-right = 10.0; + top-left = 10.0; + top-right = 10.0; + }; + open-maximized = true; + } + ]; + + binds = with config.lib.niri.actions; { + "Mod+Return".action.spawn = [ "alacritty" ]; + "Mod+E".action.spawn = [ "fuzzel" ]; + "Mod+P".action.spawn = [ "wlogout" ]; + + "Mod+Q".action = close-window; + "Mod+F".action = fullscreen-window; + + "Mod+H".action = focus-column-or-monitor-left; + "Mod+L".action = focus-column-or-monitor-right; + "Mod+J".action = focus-window-or-workspace-down; + "Mod+K".action = focus-window-or-workspace-up; + + # Smart movement: move within monitor, then to adjacent monitor when at edge + "Mod+Shift+H".action = consume-or-expel-window-left; + "Mod+Shift+L".action = consume-or-expel-window-right; + + # then reorder inside the column (up/down) + "Mod+Shift+K".action = move-window-up; + "Mod+Shift+J".action = move-window-down; + + "Mod+R".action = switch-preset-column-width; + "Mod+Shift+R".action = switch-preset-column-width-back; + + "Mod+1".action.focus-workspace = "term"; + "Mod+2".action.focus-workspace = "code"; + "Mod+3".action.focus-workspace = "spare"; + "Mod+4".action.focus-workspace = "browser"; + "Mod+5".action.focus-workspace = "chat"; + "Mod+6".action.focus-workspace = "gear"; + "Mod+7".action.focus-workspace = 7; + "Mod+8".action.focus-workspace = 8; + + # Move only window to workspace (not whole column) + "Mod+Alt+1".action.move-window-to-workspace = 1; + "Mod+Alt+2".action.move-window-to-workspace = 2; + "Mod+Alt+3".action.move-window-to-workspace = 3; + "Mod+Alt+4".action.move-window-to-workspace = 4; + "Mod+Alt+5".action.move-window-to-workspace = 5; + "Mod+Alt+6".action.move-window-to-workspace = 6; + "Mod+Alt+7".action.move-window-to-workspace = 7; + "Mod+Alt+8".action.move-window-to-workspace = 8; + "Mod+Alt+9".action.move-window-to-workspace = 9; + }; + }; + }; + }; +} diff --git a/modules/nixos/roles/desktop/hyprland.nix b/modules/nixos/roles/desktop/hyprland.nix index baede18..eaa2309 100644 --- a/modules/nixos/roles/desktop/hyprland.nix +++ b/modules/nixos/roles/desktop/hyprland.nix @@ -12,8 +12,11 @@ in config = mkIf cfg { programs.hyprland = { enable = true; + withUWSM = false; }; + programs.niri.enable = true; + services.greetd = { enable = true; @@ -22,7 +25,7 @@ in --time \ --remember \ --theme 'border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red' \ - --cmd start-hyprland + --cmd niri ''; }; }; From fb6cd382975c5f2bd97fc5ebd8c6daa96e292b1d Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 17 Mar 2026 10:44:44 +0100 Subject: [PATCH 46/81] timeout and layout --- modules/home/desktops/hyprland/addons/hypridle.nix | 2 +- modules/home/desktops/hyprland/settings/global.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/desktops/hyprland/addons/hypridle.nix b/modules/home/desktops/hyprland/addons/hypridle.nix index b0b68fa..64e88e1 100644 --- a/modules/home/desktops/hyprland/addons/hypridle.nix +++ b/modules/home/desktops/hyprland/addons/hypridle.nix @@ -18,7 +18,7 @@ in listener = [ # autolock { - timeout = 120; + timeout = 300; on-timeout = "loginctl lock-session"; } # display off diff --git a/modules/home/desktops/hyprland/settings/global.nix b/modules/home/desktops/hyprland/settings/global.nix index a49bd20..2c6fe78 100644 --- a/modules/home/desktops/hyprland/settings/global.nix +++ b/modules/home/desktops/hyprland/settings/global.nix @@ -21,8 +21,8 @@ in }; input = { - kb_layout = "eu,de"; - kb_variant = ",neo_qwertz"; + kb_layout = "eu,de,de"; + kb_variant = ",neo_qwertz,"; repeat_rate = 45; repeat_delay = 150; accel_profile = "flat"; From 2dd03f59cd9598c8686907067b8033f729af097b Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Fri, 20 Mar 2026 15:22:55 +0100 Subject: [PATCH 47/81] Prefer dark GTK --- modules/home/desktops/addons/gtk/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/desktops/addons/gtk/default.nix b/modules/home/desktops/addons/gtk/default.nix index e50ab25..086a818 100644 --- a/modules/home/desktops/addons/gtk/default.nix +++ b/modules/home/desktops/addons/gtk/default.nix @@ -6,6 +6,7 @@ { gtk = lib.mkForce { enable = true; + colorScheme = "dark"; theme = { name = "Catppuccin-GTK-Mauve-Dark"; From dd9bcef4b16d47b175d36eaf28e07fd114c68493 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Mar 2026 21:28:01 +0100 Subject: [PATCH 48/81] Update docs on firefly --- docs/firefly.md | 65 +++++++++++++++++++++++++++++++++++++++---------- docs/misc.md | 14 ----------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/docs/firefly.md b/docs/firefly.md index 80d7c37..300481b 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -1,13 +1,37 @@ +# Backups + +1. Firefox profile + +```bash +rsync -av --update ~/.mozilla/firefox/default ~/Nextcloud/Home/Backups/firefox_profile/ +``` + +2. Check atuin `key` -> bitwarden + # Install device -1. Install it via usb-image -2. Install lix -3. Create local user -4. Get user-certificate with chandler -3. clone dotfiles -4. Make home-manager switch +1. Install `lix` or `nix` +2. Clone dotfiles + 1. Change username if needed in `home.nix` +3. Switch config +```bash +nh home switch -c nix@firefly . --show-activation-logs ``` -home-manager switch --flake .#rapsn@firefly + +4. Create `hyprland` desktop file. + +```bash +echo "[Desktop Entry] +Name=Hyprland +Comment=An intelligent dynamic tiling Wayland compositor +Exec=/home/$USER/.nix-profile/bin/start-hyprland +Type=Application" | sudo tee /usr/share/wayland-sessions/hyprland.desktop +``` + +5. Copy user-certificate to firefox + +```bash +ln -sf ~/.pki/nssdb/* ~/.mozilla/firefox/default/ ``` ## Manual things @@ -18,11 +42,21 @@ systemctl --user mask --now gpg-agent.service gpg-agent.socket \ gpg-agent-ssh.socket gpg-agent-extra.socket gpg-agent-browser.socket ``` -### Copy user-certificate to firefox +### Chromium -```bash -cp .pki/nssdb/* /home/rapsn/.mozilla/firefox/default/ +Extension: `Open in firefox`: + +**Other Settings** + +- Enable Reverse Mode + +**Automation Rules** + +Comma-separated list of URLs: ``` +*://*.google.com/*, *://chat.ske.eu01.stackit.cloud/* +``` + ### GTK Theme @@ -30,11 +64,16 @@ cp .pki/nssdb/* /home/rapsn/.mozilla/firefox/default/ Important is that the exact theme **name** is set via `gsetting`. `nwg-look` can be used to see what the actual name is, to persist configure it in home-manager `gtk.theme.name`. +Also `gtk.colorScheme = dark`, should enable most GTK apps to use dark by default. ```bash dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name ``` -## Outside nix ๐Ÿ˜ญ -- mumble (apt) -- hyprland (apt ppa:piper) +## Installed via APT + +Those programs are installed via apt, since they do not work within `nix`. + +```bash +sudo apt install xdg-desktop-portal-wlr mumble +``` diff --git a/docs/misc.md b/docs/misc.md index 00a641d..3525aba 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -30,20 +30,6 @@ sudo efibootmgr --create \ --loader '\EFI\systemd\systemd-bootx64.efi' \ # Mind the backslashes ``` -## UWSM (legacy not used anymore) - -### start apps -Use `uswm app -- ` to start apps. -This will start the app in a seperate `systemd` scope, which is part of the `app.slice`. -If not, the process will be part of the `session.slice`, which can result in termination of the user session. - -Keep the slice as clean as possible: -```bash -โ”‚ โ”‚ โ”‚ โ”œโ”€wayland-wm@hyprland\x2duwsm.desktop.service -โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€77102 /run/current-system/sw/bin/Hyprland -โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€77200 Xwayland :0 -rootless -core -listenfd 54 -listenfd 55 -displayfd 107 -wm 104 -``` - ## Nix follows ``` From 6751fa6588381fa4f343546c0d7f52294628af87 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Mar 2026 21:28:29 +0100 Subject: [PATCH 49/81] Update user config --- flake.lock | 6 +++--- flake.nix | 2 +- hosts/firefly/home.nix | 13 +++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index b56405e..bb0022f 100644 --- a/flake.lock +++ b/flake.lock @@ -647,11 +647,11 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1772669650, - "narHash": "sha256-+1FsAJde390EntBPUL8rI0SiZ/XsBqVgUH+/rDa8ZcQ=", + "lastModified": 1773763727, + "narHash": "sha256-eIs5oebsXVNlSzOUBE/bPhOO0wTPaeqG6Mt282BAFCY=", "owner": "rgroemmer", "repo": "neonix", - "rev": "bdba0bd023bf4ad1c0daf458c16f85fcd0723255", + "rev": "c357d962e8963bda78295b3becfc70816a540c44", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 54a1d06..aeb7ee2 100644 --- a/flake.nix +++ b/flake.nix @@ -140,7 +140,7 @@ }; # Firefly workmachine - "rapsn@firefly" = homeManagerConfiguration { + "nix@firefly" = homeManagerConfiguration { modules = homeModules ++ [ ./hosts/firefly/home.nix ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs self mylib; }; diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 41d3618..1d735f9 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -5,6 +5,13 @@ ... }: { + + home = { + username = "raphaelgroemmer"; + homeDirectory = lib.mkDefault "/home/${config.home.username}"; + stateVersion = lib.mkDefault "22.05"; + }; + roles = { work = true; email = "raphael.groemmer@digits.schwarz"; @@ -87,10 +94,4 @@ enable = true; gpu.enable = true; }; - - home = { - username = "rapsn"; - homeDirectory = lib.mkDefault "/home/rapsn"; - stateVersion = lib.mkDefault "22.05"; - }; } From fed9303852825ccca68f2f133a53235deb7f4969 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Mar 2026 21:29:18 +0100 Subject: [PATCH 50/81] Update git config, swaync + remove sops --- modules/home/cli/tools/git/default.nix | 6 ------ modules/home/desktops/addons/swaync/default.nix | 10 +++++----- modules/home/services/ssh.nix | 7 ------- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/modules/home/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix index 4aeaf90..37adbe4 100644 --- a/modules/home/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -57,12 +57,6 @@ }; includes = [ - { - condition = "gitdir:~/Projects/rgroemmer/**"; - contents = { - user.email = "github@rapsn.me"; - }; - } { condition = "gitdir:~/Projects/rapsnx/**"; contents = { diff --git a/modules/home/desktops/addons/swaync/default.nix b/modules/home/desktops/addons/swaync/default.nix index b32dd4f..f463b53 100644 --- a/modules/home/desktops/addons/swaync/default.nix +++ b/modules/home/desktops/addons/swaync/default.nix @@ -1,8 +1,8 @@ -{ pkgs, ... }: { # swaynotificationcenter like "dunst" - home.packages = with pkgs; [ swaynotificationcenter ]; - - xdg.configFile."swaync/style.css".source = ./swaync.css; - xdg.configFile."swaync/config.json".source = ./swaync.json; + services.swaync = { + enable = true; + settings = builtins.fromJSON (builtins.readFile ./swaync.json); + style = builtins.readFile ./swaync.css; + }; } diff --git a/modules/home/services/ssh.nix b/modules/home/services/ssh.nix index e2893ba..2d8cb2b 100644 --- a/modules/home/services/ssh.nix +++ b/modules/home/services/ssh.nix @@ -1,10 +1,3 @@ -{ config, ... }: { services.ssh-agent.enable = true; - - sops.secrets.ssh_config = { - sopsFile = ../secrets.yaml; - path = "${config.home.homeDirectory}/.ssh/config"; - mode = "600"; - }; } From bea3d36235202c3d5a2932b63b9511bbaedafd9a Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Mar 2026 21:30:09 +0100 Subject: [PATCH 51/81] remove desktop portal for hyprland --- modules/home/desktops/hyprland/hyprland.nix | 44 +++++++++++---------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix index b4cf853..8026353 100644 --- a/modules/home/desktops/hyprland/hyprland.nix +++ b/modules/home/desktops/hyprland/hyprland.nix @@ -35,12 +35,6 @@ in wayland.windowManager.hyprland = { enable = true; inherit (cfg) package; - - # plugins = with hyprlandPlugins; [ - # hyprexpo - # ]; - - # systemd.enable = false; # Disable for uswm }; home.packages = [ @@ -48,21 +42,29 @@ in slurp ]; - xdg.portal = { - enable = true; - config = { - common = { - default = [ - "hyprland" - "gtk" - ]; - }; - }; - extraPortals = [ - xdg-desktop-portal-wlr - xdg-desktop-portal-hyprland - ]; - }; + # systemd.user = { + # enable = true; + # # This could be removed if https://github.com/nix-community/home-manager/pull/8541 gets merged + # # Inside xdg.portal they do exactly the same thing, that is: packages = [ pkgs.xdg-desktop-portal ] ++ config.xdg.portal.extraPortals; + # # and this MR just adds systemd.user.packages = packages; + # packages = [ + # pkgs.xdg-desktop-portal + # pkgs.xdg-desktop-portal-wlr + # ]; + # }; + # # + # xdg.portal = { + # enable = true; + # extraPortals = with pkgs; [ + # xdg-desktop-portal-hyprland + # xdg-desktop-portal-wlr + # ]; + # config.common = { + # default = [ + # "wlr" + # ]; + # }; + # }; # environment.d defines environment variables for the user session, beyond shell level. # It is processed by `systemd --user`, basically after login. From 8e916d91274206465a93e1ecc4229a0653c32a83 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 22 Mar 2026 21:32:49 +0100 Subject: [PATCH 52/81] update docs --- docs/firefly.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/firefly.md b/docs/firefly.md index 300481b..d3f05da 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -16,6 +16,9 @@ rsync -av --update ~/.mozilla/firefox/default ~/Nextcloud/Home/Backups/firefox_ ```bash nh home switch -c nix@firefly . --show-activation-logs + +# TODO: Remove when lix breaking changes are integrated into nixpkgs || move to official nix +nh home switch -c nix@firefly . --show-activation-logs -- --extra-deprecated-features tokens-no-whitespace --extra-deprecated-features rec-set-merges --extra-deprecated-features broken-string-escape ``` 4. Create `hyprland` desktop file. From 248b9d98df06cd802b7853eb5e2e1dc41833267f Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 26 Mar 2026 10:40:04 +0100 Subject: [PATCH 53/81] some changes --- modules/home/cli/tools/core/packages.nix | 3 +++ modules/home/cli/tools/custom/shell-scripts.nix | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/home/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix index 177e037..cf12e3a 100644 --- a/modules/home/cli/tools/core/packages.nix +++ b/modules/home/cli/tools/core/packages.nix @@ -49,5 +49,8 @@ # Clipboard wl-clipboard + + # Compilers + gcc ]; } diff --git a/modules/home/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix index 008e84f..09b9418 100644 --- a/modules/home/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -11,7 +11,7 @@ let # kubeconfig selector selc_ = pkgs.writeShellScriptBin "selc_" '' - BASE_PATH=$HOME/.config/kubeconfig + BASE_PATH=$HOME/.config/kubeconfigs YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') KUBECONFIG=$(fzf <<<"$YAMLS") export KUBECONFIG=$BASE_PATH/$KUBECONFIG From 1d830860abbab5d5629ce6c1162caf8432c6b579 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 30 Mar 2026 15:21:45 +0200 Subject: [PATCH 54/81] update firefly doc --- docs/firefly.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/firefly.md b/docs/firefly.md index d3f05da..0f65850 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -78,5 +78,10 @@ dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name Those programs are installed via apt, since they do not work within `nix`. ```bash -sudo apt install xdg-desktop-portal-wlr mumble +sudo apt update +sudo apt -y install \ + xdg-desktop-portal-wlr \ + mumble \ + swaylock \ + podman ``` From de1189a103b9f2b56ad60c189d60d745599d79d2 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Tue, 31 Mar 2026 20:04:44 +0200 Subject: [PATCH 55/81] Refactor hyprland --- hosts/firefly/home.nix | 58 ++---- modules/home/common/roles.nix | 5 + .../home/desktops/addons/kanshi/default.nix | 62 +++++++ modules/home/desktops/hyprland/default.nix | 170 ++++++++++++++++-- modules/home/desktops/hyprland/hyprland.nix | 75 -------- modules/home/desktops/hyprland/keybinds.nix | 64 +++++++ .../desktops/hyprland/settings/autostart.nix | 17 -- .../home/desktops/hyprland/settings/binds.nix | 28 --- .../home/desktops/hyprland/settings/extra.nix | 42 ----- .../desktops/hyprland/settings/global.nix | 49 ----- .../desktops/hyprland/settings/monitor.nix | 42 ----- .../desktops/hyprland/settings/windows.nix | 45 ----- .../desktops/hyprland/settings/workspaces.nix | 56 ------ 13 files changed, 304 insertions(+), 409 deletions(-) create mode 100644 modules/home/desktops/addons/kanshi/default.nix delete mode 100644 modules/home/desktops/hyprland/hyprland.nix create mode 100644 modules/home/desktops/hyprland/keybinds.nix delete mode 100644 modules/home/desktops/hyprland/settings/autostart.nix delete mode 100644 modules/home/desktops/hyprland/settings/binds.nix delete mode 100644 modules/home/desktops/hyprland/settings/extra.nix delete mode 100644 modules/home/desktops/hyprland/settings/global.nix delete mode 100644 modules/home/desktops/hyprland/settings/monitor.nix delete mode 100644 modules/home/desktops/hyprland/settings/windows.nix delete mode 100644 modules/home/desktops/hyprland/settings/workspaces.nix diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 1d735f9..a3fab46 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -21,54 +21,24 @@ obsidian ]; - desktop.hyprland = { - enable = true; - package = pkgs.hyprland; - - monitors = [ - # Monitor are automatically from left to right - { - name = "Samsung Electric Company LC27G7xT H4ZNC00167"; - width = 2560; - hight = 1440; - hz = "144.0"; - scale = 1.0; - } - { - name = "Dell Inc. AW2725Q G2QC174"; - width = 3840; - hight = 2160; - hz = "143.99"; - scale = 1.5; - } - ]; - - workspaces = [ - "1,monitor:DP-2,default:true" - "2,monitor:DP-2" - "3,monitor:DP-2" - "4,monitor:HDMI-A-1,default:true" - "5,monitor:HDMI-A-1" - "6,monitor:HDMI-A-1" - "7,monitor:eDP-1" - ]; - - extraConfig = '' - monitor=eDP-1,prefer,auto,1 - - bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefer,auto, 1" - bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" - - exec-once = sleep 5 mumble --tray - exec-once = sleep 5 && hyprctl dispatch closewindow class:ZSTray - ''; + desktop = { + monitors = { + main = "Dell Inc. AW2725Q G2QC174"; + left = "Samsung Electric Company LC27G7xT H4ZNC00167"; + }; - hyprlock.enable = false; - hypridle = { + hyprland = { enable = true; - cmd = "${config.home.homeDirectory}/Projects/swaywm/swaylock/build/swaylock"; + package = pkgs.hyprland; + + hyprlock.enable = true; + hypridle = { + enable = true; + cmd = "${config.home.homeDirectory}/Projects/swaywm/swaylock/build/swaylock"; + }; }; }; + cli = { zsh.zshrc = '' [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix index 839b587..b0b355a 100644 --- a/modules/home/common/roles.nix +++ b/modules/home/common/roles.nix @@ -14,6 +14,11 @@ with types; email = mkOpt str "Email address of the user."; apparmor-gen = mkOpt' (listOf package) [ ] "List of packages to create apparmor rule for userns."; + + desktop.monitors = { + main = mkOpt str "Identifier of main monitor."; + left = mkOpt str "Identifier of left monitor."; + }; }; config = diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix new file mode 100644 index 0000000..2447657 --- /dev/null +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -0,0 +1,62 @@ +{ config, ... }: +{ + services.kanshi = { + enable = true; + systemdTarget = "hyprland-session.target"; + + settings = [ + { + profile.name = "undocked"; + profile.outputs = [ + { + criteria = "eDP-1"; + scale = 1.1; + status = "enable"; + } + ]; + } + + { + profile.name = "home-office"; + profile.outputs = with config.roles.desktop.monitors; [ + { + # Main + criteria = main; + position = "2560,0"; + mode = "3840x2160@143.99Hz"; + } + { + # Left + criteria = left; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + } + + { + profile.name = "office"; + profile.outputs = [ + { + criteria = "eDP-1"; + position = "0,0"; + } + { + criteria = "DP-8"; + position = "1536,0"; + } + { + criteria = "DP-9"; + position = "3456,0"; + } + ]; + } + + ]; + }; +} diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 3da6e45..7086bcf 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -1,17 +1,165 @@ { - imports = [ - ./hyprland.nix + pkgs, + lib, + mylib, + config, + ... +}: +with lib; +with mylib; +with pkgs; +let + cfg = config.roles.desktop.hyprland; +in +{ + options.roles.desktop.hyprland = { + enable = mkEnableOption "Enable hyprland"; + + package = mkPackageOption pkgs "hyprland" { + nullable = true; + }; + + hyprlock = { + enable = mkEnableOption "Enable hyprlock"; + }; + hypridle = { + enable = mkEnableOption "Enable hypridle"; + cmd = mkOption { type = types.str; }; + }; + }; + + imports = [ ./addons/hypridle.nix ./addons/hyprlock.nix - ./addons/hyprpaper.nix - - ./settings/global.nix - ./settings/binds.nix - ./settings/extra.nix - ./settings/windows.nix - ./settings/autostart.nix - ./settings/workspaces.nix - ./settings/monitor.nix ]; + + config = lib.mkIf cfg.enable { + + home.packages = [ + hyprland-qtutils + slurp + ]; + + # environment.d defines environment variables for the user session, beyond shell level. + # It is processed by `systemd --user`, basically after login. + xdg.configFile."environment.d/envvars.conf".text = '' + PATH="$HOME/.nix-profile/bin:$PATH" + ''; + + catppuccin.hyprland.enable = true; + wayland.windowManager.hyprland = { + enable = true; + inherit (cfg) package; + + settings = { + general = { + gaps_in = 8; + gaps_out = 10; + border_size = 3; + }; + + # Auto tile new windows + dwindle = { + preserve_split = "yes"; + special_scale_factor = 0.8; + }; + + input = { + kb_layout = "eu,de,de"; + kb_variant = ",neo_qwertz,"; + repeat_rate = 45; + repeat_delay = 150; + accel_profile = "flat"; + sensitivity = 1; # -1.0 - 1.0, 0 means no modification. + }; + + xwayland = { + force_zero_scaling = true; + }; + + decoration = { + blur = { + enabled = true; + size = 3; + passes = 2; + ignore_opacity = true; + new_optimizations = true; + }; + rounding = 5; + active_opacity = 0.98; + inactive_opacity = 0.85; + }; + + # Autostart + exec-once = [ + # TODO: check if needed? + # "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + "[ workspace special:scratchy silent ] alacritty -t scratchy" + ]; + + workspace = with config.roles.desktop.monitors; [ + # Special + "special:scratchy" + "special:aux" + + # Pinning + "1,monitor:, monitor:desc:${main},default:true" + "2,monitor:, monitor:desc:${main}," + "3,monitor:, monitor:desc:${main}," + + "4,monitor:, monitor:desc:${left},default:true" + "5,monitor:, monitor:desc:${left}," + "6,monitor:, monitor:desc:${left}," + + # TODO: Check if this works in office + "1,monitor:, monitor:DP-8,default:true" + "2,monitor:, monitor:DP-8" + "3,monitor:, monitor:DP-8" + + "4,monitor:, monitor:DP-9,default:true" + "5,monitor:, monitor:DP-9" + "6,monitor:, monitor:DP-9" + ]; + + windowrule = [ + "match:class ^(firefox)$, workspace 4" + "match:class ^(chromium-browser)$, workspace 5" + + "match:class ^(.*mumble.*)$, workspace special:aux silent" + "match:class ^(.*keepassxc.*)$, workspace special:aux silent" + + # Force floating + "match:class steam, float yes" + "match:class ^(.*nextcloud.*)$, float yes" + ]; + + bind = import ./keybinds.nix; + + extraConfig = '' + # Resize mouse + bindm = SUPER, mouse:272, movewindow + bindm = SUPER, mouse:273, resizewindow + + # Resize mode + bind = SUPER, R, submap, resize + submap = resize + bind = , H, resizeactive, -60 0 + bind = , J, resizeactive, 0 60 + bind = , K, resizeactive, 0 -60 + bind = , L, resizeactive, 60 0 + + bind = SHIFT, H, resizeactive, -20 0 + bind = SHIFT, J, resizeactive, 0 20 + bind = SHIFT, K, resizeactive, 0 -20 + bind = SHIFT, L, resizeactive, 20 0 + + bind = , return, submap, reset + bind = , escape, submap, reset + submap = reset + ''; + }; + }; + + }; } diff --git a/modules/home/desktops/hyprland/hyprland.nix b/modules/home/desktops/hyprland/hyprland.nix deleted file mode 100644 index 8026353..0000000 --- a/modules/home/desktops/hyprland/hyprland.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ - pkgs, - lib, - mylib, - config, - ... -}: -with lib; -with mylib; -with pkgs; -let - cfg = config.roles.desktop.hyprland; -in -{ - options.roles.desktop.hyprland = { - enable = mkEnableOption "Enable hyprland"; - - package = mkPackageOption pkgs "hyprland" { - nullable = true; - }; - - hyprlock = { - enable = mkEnableOption "Enable hyprlock"; - }; - - hypridle = { - enable = mkEnableOption "Enable hypridle"; - cmd = mkOption { type = types.str; }; - }; - }; - - config = lib.mkIf cfg.enable { - catppuccin.hyprland.enable = true; - - wayland.windowManager.hyprland = { - enable = true; - inherit (cfg) package; - }; - - home.packages = [ - hyprland-qtutils - slurp - ]; - - # systemd.user = { - # enable = true; - # # This could be removed if https://github.com/nix-community/home-manager/pull/8541 gets merged - # # Inside xdg.portal they do exactly the same thing, that is: packages = [ pkgs.xdg-desktop-portal ] ++ config.xdg.portal.extraPortals; - # # and this MR just adds systemd.user.packages = packages; - # packages = [ - # pkgs.xdg-desktop-portal - # pkgs.xdg-desktop-portal-wlr - # ]; - # }; - # # - # xdg.portal = { - # enable = true; - # extraPortals = with pkgs; [ - # xdg-desktop-portal-hyprland - # xdg-desktop-portal-wlr - # ]; - # config.common = { - # default = [ - # "wlr" - # ]; - # }; - # }; - - # environment.d defines environment variables for the user session, beyond shell level. - # It is processed by `systemd --user`, basically after login. - xdg.configFile."environment.d/envvars.conf".text = '' - PATH="$HOME/.nix-profile/bin:$PATH" - ''; - }; -} diff --git a/modules/home/desktops/hyprland/keybinds.nix b/modules/home/desktops/hyprland/keybinds.nix new file mode 100644 index 0000000..ceb4c47 --- /dev/null +++ b/modules/home/desktops/hyprland/keybinds.nix @@ -0,0 +1,64 @@ +[ + # Common + "SUPER,RETURN, exec, alacritty" + "SUPER,E, exec, fuzzel" + "SUPER,P, exec, wlogout" + "SUPER,Q, killactive" + + # Notification center + "SUPER,N, exec, swaync-client -t" + + # Window actions + "SUPER,F, fullscreen, 1" + "SUPER+SHIFT,F, fullscreen" + + # Movement + "SUPER,H, movefocus, l" + "SUPER,J, movefocus, d" + "SUPER,K, movefocus, u" + "SUPER,L, movefocus, r" + + # Window movement + "SUPER+SHIFT,H, movewindow,l" + "SUPER+SHIFT,J, movewindow, d" + "SUPER+SHIFT,K, movewindow, u" + "SUPER+SHIFT,L, movewindow, r" + + # Layout toggle + "SUPER,T, togglesplit," + "SUPER,U, togglefloating," + + # Workspace selection + "SUPER,1, workspace, 1" + "SUPER,2, workspace, 2" + "SUPER,3, workspace, 3" + "SUPER,4, workspace, 4" + "SUPER,5, workspace, 5" + "SUPER,6, workspace, 6" + "SUPER,7, workspace, 7" + "SUPER,8, workspace, 8" + "SUPER,9, workspace, 9" + + # Workspace window movement + "ALT,1, movetoworkspace, 1" + "ALT,2, movetoworkspace, 2" + "ALT,3, movetoworkspace, 3" + "ALT,4, movetoworkspace, 4" + "ALT,5, movetoworkspace, 5" + "ALT,6, movetoworkspace, 6" + "ALT,7, movetoworkspace, 7" + "ALT,8, movetoworkspace, 8" + + # Workpace handling sratchy + "SUPER,O, togglespecialworkspace, scratchy" + "SUPER,M, togglespecialworkspace, aux" + "SUPER SHIFT,O, movetoworkspace, special:scratchy" + "SUPER SHIFT,M, movetoworkspace, special:aux" + + # Special + + # Mumble + "SUPER,Z, exec, mumble rpc togglemute" + "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" + +] diff --git a/modules/home/desktops/hyprland/settings/autostart.nix b/modules/home/desktops/hyprland/settings/autostart.nix deleted file mode 100644 index c72eee2..0000000 --- a/modules/home/desktops/hyprland/settings/autostart.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -let - cfg = config.roles.desktop.hyprland; -in -{ - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - exec-once = [ - "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" - "[ workspace special:scratchy silent ] alacritty -t scratchy" - ]; - }; -} diff --git a/modules/home/desktops/hyprland/settings/binds.nix b/modules/home/desktops/hyprland/settings/binds.nix deleted file mode 100644 index e895a23..0000000 --- a/modules/home/desktops/hyprland/settings/binds.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - lib, - config, - ... -}: -let - cfg = config.roles.desktop.hyprland; -in -{ - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - bind = [ - "SUPER,RETURN, exec, alacritty" - "SUPER,E, exec, fuzzel" - "SUPER,P, exec, wlogout" - "SUPER,Q, killactive" - - # Mumble - "SUPER,Z, exec, mumble rpc togglemute" - "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" - - # Notification center - "SUPER,N, exec, swaync-client -t" - - # Plugins - # "SUPER, g, hyprexpo:expo, toggle" - ]; - }; -} diff --git a/modules/home/desktops/hyprland/settings/extra.nix b/modules/home/desktops/hyprland/settings/extra.nix deleted file mode 100644 index 3958142..0000000 --- a/modules/home/desktops/hyprland/settings/extra.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - lib, - mylib, - ... -}: -with lib; -with mylib; -let - cfg = config.roles.desktop.hyprland; -in -{ - options.roles.desktop.hyprland.extraConfig = with types; mkOpt str "Any hyprland extraConfig."; - - config = { - wayland.windowManager.hyprland = lib.mkIf cfg.enable { - extraConfig = '' - # Resize mouse - bindm = SUPER, mouse:272, movewindow - bindm = SUPER, mouse:273, resizewindow - - # Resize mode - bind = SUPER, R, submap, resize - submap = resize - bind = , H, resizeactive, -60 0 - bind = , J, resizeactive, 0 60 - bind = , K, resizeactive, 0 -60 - bind = , L, resizeactive, 60 0 - - bind = SHIFT, H, resizeactive, -20 0 - bind = SHIFT, J, resizeactive, 0 20 - bind = SHIFT, K, resizeactive, 0 -20 - bind = SHIFT, L, resizeactive, 20 0 - - bind = , return, submap, reset - bind = , escape, submap, reset - submap = reset - '' - + cfg.extraConfig; - }; - }; -} diff --git a/modules/home/desktops/hyprland/settings/global.nix b/modules/home/desktops/hyprland/settings/global.nix deleted file mode 100644 index 2c6fe78..0000000 --- a/modules/home/desktops/hyprland/settings/global.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - config, - ... -}: -let - cfg = config.roles.desktop.hyprland; -in -{ - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - general = { - gaps_in = 8; - gaps_out = 10; - border_size = 3; - }; - - # Auto tile new windows - dwindle = { - preserve_split = "yes"; - special_scale_factor = 0.8; - }; - - input = { - kb_layout = "eu,de,de"; - kb_variant = ",neo_qwertz,"; - repeat_rate = 45; - repeat_delay = 150; - accel_profile = "flat"; - sensitivity = 1; # -1.0 - 1.0, 0 means no modification. - }; - - xwayland = { - force_zero_scaling = true; - }; - - decoration = { - blur = { - enabled = true; - size = 3; - passes = 2; - ignore_opacity = true; - new_optimizations = true; - }; - rounding = 5; - active_opacity = 0.98; - inactive_opacity = 0.85; - }; - }; -} diff --git a/modules/home/desktops/hyprland/settings/monitor.nix b/modules/home/desktops/hyprland/settings/monitor.nix deleted file mode 100644 index 41d0c77..0000000 --- a/modules/home/desktops/hyprland/settings/monitor.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - lib, - mylib, - config, - ... -}: -with lib; -with mylib; -with types; -let - cfg = config.roles.desktop.hyprland; -in -{ - options.roles.desktop.hyprland.monitors = mkOpt (listOf (submodule { - options = { - name = mkOpt str "Monitor identifier"; - width = mkOpt int "Width in pixel"; - hight = mkOpt int "Hight in pixel"; - hz = mkOpt str "Refresh rate"; - scale = mkOpt float "Scaling factor"; - }; - })) "List of Monitors that are configured in order starting from left to right"; - - config = { - wayland.windowManager.hyprland.settings = mkIf cfg.enable { - monitor = - (foldl' - (acc: mon: { - pos = builtins.floor (acc.pos + (mon.width / mon.scale)); - result = acc.result ++ [ - "desc:${mon.name},${toString mon.width}x${toString mon.hight}@${toString mon.hz},${toString acc.pos}x0,${toString mon.scale}" - ]; - }) - { - pos = 0; - result = [ ]; - } - cfg.monitors - ).result; - }; - }; -} diff --git a/modules/home/desktops/hyprland/settings/windows.nix b/modules/home/desktops/hyprland/settings/windows.nix deleted file mode 100644 index 366474d..0000000 --- a/modules/home/desktops/hyprland/settings/windows.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - lib, - config, - ... -}: -let - cfg = config.roles.desktop.hyprland; -in -{ - wayland.windowManager.hyprland.settings = lib.mkIf cfg.enable { - windowrule = [ - "match:class ^(firefox)$, workspace 4" - "match:class ^(chromium-browser)$, workspace 5" - - "match:class ^(.*mumble.*)$, workspace special:aux silent" - "match:class ^(.*keepassxc.*)$, workspace special:aux silent" - - # Force floating - "match:class steam, float yes" - "match:class ^(.*nextcloud.*)$, float yes" - ]; - - bind = [ - # Window actions - "SUPER,F, fullscreen, 1" - "SUPER+SHIFT,F, fullscreen" - - # Movement - "SUPER,H, movefocus, l" - "SUPER,J, movefocus, d" - "SUPER,K, movefocus, u" - "SUPER,L, movefocus, r" - - # Window movement - "SUPER+SHIFT,H, movewindow,l" - "SUPER+SHIFT,J, movewindow, d" - "SUPER+SHIFT,K, movewindow, u" - "SUPER+SHIFT,L, movewindow, r" - - # Layout toggle - "SUPER,T, togglesplit," - "SUPER,U, togglefloating," - ]; - }; -} diff --git a/modules/home/desktops/hyprland/settings/workspaces.nix b/modules/home/desktops/hyprland/settings/workspaces.nix deleted file mode 100644 index a1df66d..0000000 --- a/modules/home/desktops/hyprland/settings/workspaces.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - lib, - mylib, - config, - ... -}: -with lib; -with mylib; -let - cfg = config.roles.desktop.hyprland; -in -{ - options.roles.desktop.hyprland.workspaces = - with types; - mkOpt (listOf str) "Workspace config as list."; - - config = { - wayland.windowManager.hyprland.settings = mkIf cfg.enable { - workspace = [ - # Special - "special:scratchy" - "special:aux" - ] - ++ cfg.workspaces; - - bind = [ - # Workspace selection - "SUPER,1, workspace, 1" - "SUPER,2, workspace, 2" - "SUPER,3, workspace, 3" - "SUPER,4, workspace, 4" - "SUPER,5, workspace, 5" - "SUPER,6, workspace, 6" - "SUPER,7, workspace, 7" - "SUPER,8, workspace, 8" - "SUPER,9, workspace, 9" - - # Workspace window movement - "ALT,1, movetoworkspace, 1" - "ALT,2, movetoworkspace, 2" - "ALT,3, movetoworkspace, 3" - "ALT,4, movetoworkspace, 4" - "ALT,5, movetoworkspace, 5" - "ALT,6, movetoworkspace, 6" - "ALT,7, movetoworkspace, 7" - "ALT,8, movetoworkspace, 8" - - # Special workpace handling - "SUPER,O, togglespecialworkspace, scratchy" - "SUPER,M, togglespecialworkspace, aux" - "SUPER SHIFT,O, movetoworkspace, special:scratchy" - "SUPER SHIFT,M, movetoworkspace, special:aux" - ]; - }; - }; -} From 3f5cf2d43807e978499ec95792624256bef1f617 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 4 Apr 2026 23:17:53 +0200 Subject: [PATCH 56/81] Kanshi config --- hosts/firefly/home.nix | 7 +- .../home/desktops/addons/kanshi/default.nix | 130 +++++++++++------- modules/home/desktops/hyprland/default.nix | 20 +-- 3 files changed, 80 insertions(+), 77 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index a3fab46..a05eaad 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -22,11 +22,6 @@ ]; desktop = { - monitors = { - main = "Dell Inc. AW2725Q G2QC174"; - left = "Samsung Electric Company LC27G7xT H4ZNC00167"; - }; - hyprland = { enable = true; package = pkgs.hyprland; @@ -34,7 +29,7 @@ hyprlock.enable = true; hypridle = { enable = true; - cmd = "${config.home.homeDirectory}/Projects/swaywm/swaylock/build/swaylock"; + cmd = "/usr/bin/swaylock"; }; }; }; diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 2447657..7a9756a 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -1,62 +1,88 @@ -{ config, ... }: { services.kanshi = { enable = true; systemdTarget = "hyprland-session.target"; - settings = [ - { - profile.name = "undocked"; - profile.outputs = [ - { - criteria = "eDP-1"; - scale = 1.1; - status = "enable"; - } - ]; - } + settings = + let + main = "Dell Inc. AW2725Q G2QC174"; + left = "Samsung Electric Company LC27G7xT H4ZNC00167"; + in + [ + { + profile = { + name = "undocked"; + outputs = [ + { + criteria = "eDP-1"; + scale = 1.0; + status = "enable"; + } + ]; + }; + } - { - profile.name = "home-office"; - profile.outputs = with config.roles.desktop.monitors; [ - { - # Main - criteria = main; - position = "2560,0"; - mode = "3840x2160@143.99Hz"; - } - { - # Left - criteria = left; - scale = 1.0; - position = "0,0"; - mode = "2560x1440@144.00Hz"; - } - { - criteria = "eDP-1"; - status = "disable"; - } - ]; - } + { + profile = { + name = "home-office"; + outputs = [ + { + criteria = main; + position = "2560,0"; + mode = "3840x2160@143.99Hz"; + } + { + criteria = left; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + exec = [ + "hyprctl dispatch workspace 6 && hyprctl dispatch moveworkspacetomonitor 6 ${left}" + "hyprctl dispatch workspace 5 && hyprctl dispatch moveworkspacetomonitor 5 ${left}" + "hyprctl dispatch workspace 4 && hyprctl dispatch moveworkspacetomonitor 4 ${left}" - { - profile.name = "office"; - profile.outputs = [ - { - criteria = "eDP-1"; - position = "0,0"; - } - { - criteria = "DP-8"; - position = "1536,0"; - } - { - criteria = "DP-9"; - position = "3456,0"; - } - ]; - } + "hyprctl dispatch workspace 3 && hyprctl dispatch moveworkspacetomonitor 3 ${main}" + "hyprctl dispatch workspace 2 && hyprctl dispatch moveworkspacetomonitor 2 ${main}" + "hyprctl dispatch workspace 1 && hyprctl dispatch moveworkspacetomonitor 1 ${main}" + ]; + }; + } - ]; + { + profile = { + name = "office"; + outputs = [ + { + criteria = "eDP-1"; + status = "disable"; + } + { + criteria = "DP-8"; + position = "0,0"; + } + { + criteria = "DP-9"; + position = "1920,0"; + } + ]; + exec = [ + "hyprctl dispatch workspace 6 && hyprctl dispatch moveworkspacetomonitor 6 DP-9" + "hyprctl dispatch workspace 5 && hyprctl dispatch moveworkspacetomonitor 5 DP-9" + "hyprctl dispatch workspace 4 && hyprctl dispatch moveworkspacetomonitor 4 DP-9" + + "hyprctl dispatch workspace 3 && hyprctl dispatch moveworkspacetomonitor 3 DP-8" + "hyprctl dispatch workspace 2 && hyprctl dispatch moveworkspacetomonitor 2 DP-8" + "hyprctl dispatch workspace 1 && hyprctl dispatch moveworkspacetomonitor 1 DP-8" + + ]; + }; + } + ]; }; } diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 7086bcf..7612d70 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -98,28 +98,10 @@ in "[ workspace special:scratchy silent ] alacritty -t scratchy" ]; - workspace = with config.roles.desktop.monitors; [ + workspace = [ # Special "special:scratchy" "special:aux" - - # Pinning - "1,monitor:, monitor:desc:${main},default:true" - "2,monitor:, monitor:desc:${main}," - "3,monitor:, monitor:desc:${main}," - - "4,monitor:, monitor:desc:${left},default:true" - "5,monitor:, monitor:desc:${left}," - "6,monitor:, monitor:desc:${left}," - - # TODO: Check if this works in office - "1,monitor:, monitor:DP-8,default:true" - "2,monitor:, monitor:DP-8" - "3,monitor:, monitor:DP-8" - - "4,monitor:, monitor:DP-9,default:true" - "5,monitor:, monitor:DP-9" - "6,monitor:, monitor:DP-9" ]; windowrule = [ From d9b8b08beb11da66e7db74221cc84bb29e002bd0 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 5 Apr 2026 01:28:12 +0200 Subject: [PATCH 57/81] Update zion --- hosts/zion/home.nix | 59 ++----- modules/home/cli/tools/core/packages.nix | 3 - .../home/desktops/addons/kanshi/default.nix | 151 +++++++++--------- modules/home/desktops/hyprland/default.nix | 19 +-- modules/nixos/roles/desktop/hyprland.nix | 2 +- 5 files changed, 100 insertions(+), 134 deletions(-) diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index 133fb81..41d1714 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -1,51 +1,30 @@ { lib, pkgs, + config, ... }: { + home = { + username = "rap"; + homeDirectory = lib.mkDefault "/home/${config.home.username}"; + stateVersion = lib.mkDefault "22.05"; + }; + roles = { work = false; email = "mail@rapsn.me"; - desktop.hyprland = { - enable = true; - package = pkgs.hyprland; - - monitors = [ - # Monitor are automatically from left to right - { - name = "Samsung Electric Company LC27G7xT H4ZNC00167"; - width = 2560; - hight = 1440; - hz = "144.0"; - scale = 1.0; - } - { - name = "Dell Inc. AW2725Q G2QC174"; - width = 3840; - hight = 2160; - hz = "143.99"; - scale = 1.5; - } - ]; - - workspaces = [ - "1,monitor:DP-1,default:true" - "2,monitor:DP-1" - "3,monitor:DP-1" - "4,monitor:DP-2,default:true" - "5,monitor:DP-2" - "6,monitor:DP-2" - "7,monitor:eDP-1" - ]; - - extraConfig = ""; - - hyprlock.enable = true; - hypridle = { + desktop = { + hyprland = { enable = true; - cmd = "${pkgs.hyprlock}/bin/hyprlock"; + package = pkgs.hyprland; + + hyprlock.enable = true; + hypridle = { + enable = true; + cmd = "${pkgs.hyprlock}/bin/hyprlock"; + }; }; }; @@ -53,10 +32,4 @@ enable = true; }; }; - - home = { - username = "rap"; - homeDirectory = lib.mkDefault "/home/rap"; - stateVersion = lib.mkDefault "22.05"; - }; } diff --git a/modules/home/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix index cf12e3a..177e037 100644 --- a/modules/home/cli/tools/core/packages.nix +++ b/modules/home/cli/tools/core/packages.nix @@ -49,8 +49,5 @@ # Clipboard wl-clipboard - - # Compilers - gcc ]; } diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 7a9756a..05de93e 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -3,86 +3,81 @@ enable = true; systemdTarget = "hyprland-session.target"; - settings = - let - main = "Dell Inc. AW2725Q G2QC174"; - left = "Samsung Electric Company LC27G7xT H4ZNC00167"; - in - [ - { - profile = { - name = "undocked"; - outputs = [ - { - criteria = "eDP-1"; - scale = 1.0; - status = "enable"; - } - ]; - }; - } + settings = [ + { + profile = { + name = "firefly-undocked"; + outputs = [ + { + criteria = "eDP-1"; + scale = 1.0; + status = "enable"; + } + ]; + }; + } - { - profile = { - name = "home-office"; - outputs = [ - { - criteria = main; - position = "2560,0"; - mode = "3840x2160@143.99Hz"; - } - { - criteria = left; - scale = 1.0; - position = "0,0"; - mode = "2560x1440@144.00Hz"; - } - { - criteria = "eDP-1"; - status = "disable"; - } - ]; - exec = [ - "hyprctl dispatch workspace 6 && hyprctl dispatch moveworkspacetomonitor 6 ${left}" - "hyprctl dispatch workspace 5 && hyprctl dispatch moveworkspacetomonitor 5 ${left}" - "hyprctl dispatch workspace 4 && hyprctl dispatch moveworkspacetomonitor 4 ${left}" + { + profile = { + name = "firefly-home"; + outputs = [ + { + criteria = "DP-1"; + position = "2560,0"; + mode = "3840x2160@143.99Hz"; + } + { + criteria = "HDMI-A-1"; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + }; + } - "hyprctl dispatch workspace 3 && hyprctl dispatch moveworkspacetomonitor 3 ${main}" - "hyprctl dispatch workspace 2 && hyprctl dispatch moveworkspacetomonitor 2 ${main}" - "hyprctl dispatch workspace 1 && hyprctl dispatch moveworkspacetomonitor 1 ${main}" - ]; - }; - } + { + profile = { + name = "zion-home"; + outputs = [ + { + criteria = "DP-1"; + position = "2560,0"; + mode = "3840x2160@239.99Hz"; + } + { + criteria = "DP-2"; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + ]; + }; + } - { - profile = { - name = "office"; - outputs = [ - { - criteria = "eDP-1"; - status = "disable"; - } - { - criteria = "DP-8"; - position = "0,0"; - } - { - criteria = "DP-9"; - position = "1920,0"; - } - ]; - exec = [ - "hyprctl dispatch workspace 6 && hyprctl dispatch moveworkspacetomonitor 6 DP-9" - "hyprctl dispatch workspace 5 && hyprctl dispatch moveworkspacetomonitor 5 DP-9" - "hyprctl dispatch workspace 4 && hyprctl dispatch moveworkspacetomonitor 4 DP-9" - - "hyprctl dispatch workspace 3 && hyprctl dispatch moveworkspacetomonitor 3 DP-8" - "hyprctl dispatch workspace 2 && hyprctl dispatch moveworkspacetomonitor 2 DP-8" - "hyprctl dispatch workspace 1 && hyprctl dispatch moveworkspacetomonitor 1 DP-8" - - ]; - }; - } - ]; + { + profile = { + name = "firefly-office"; + outputs = [ + { + criteria = "eDP-1"; + status = "disable"; + } + { + criteria = "DP-8"; + position = "0,0"; + } + { + criteria = "DP-9"; + position = "1920,0"; + } + ]; + }; + } + ]; }; } diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 7612d70..adcb723 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -93,16 +93,19 @@ in # Autostart exec-once = [ - # TODO: check if needed? - # "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" + # TODO: could be a home.nix setting + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # Needed for thunar "[ workspace special:scratchy silent ] alacritty -t scratchy" ]; - workspace = [ - # Special - "special:scratchy" - "special:aux" - ]; + bind = import ./keybinds.nix; + + # TODO: needed? + # workspace = [ + # # Special + # "special:scratchy" + # "special:aux" + # ]; windowrule = [ "match:class ^(firefox)$, workspace 4" @@ -116,8 +119,6 @@ in "match:class ^(.*nextcloud.*)$, float yes" ]; - bind = import ./keybinds.nix; - extraConfig = '' # Resize mouse bindm = SUPER, mouse:272, movewindow diff --git a/modules/nixos/roles/desktop/hyprland.nix b/modules/nixos/roles/desktop/hyprland.nix index eaa2309..24cdc8d 100644 --- a/modules/nixos/roles/desktop/hyprland.nix +++ b/modules/nixos/roles/desktop/hyprland.nix @@ -25,7 +25,7 @@ in --time \ --remember \ --theme 'border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red' \ - --cmd niri + --cmd start-hyprland ''; }; }; From 8131a7f6b10802adf385e72a88f404514037a679 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 5 Apr 2026 01:37:40 +0200 Subject: [PATCH 58/81] flake update --- flake.lock | 156 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/flake.lock b/flake.lock index bb0022f..e4f7a03 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1772292445, - "narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=", + "lastModified": 1774211390, + "narHash": "sha256-sTtAgCCaX8VNNZlQFACd3i1IQ+DB0Wf3COgiFS152ds=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f", + "rev": "f62a4dbfa4e5584f14ad4c62afedf6e4b433cf70", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1772153824, - "narHash": "sha256-T65qXmlcD9qFpPTi+mOXsn4dIkO2N8Ls67nqmuzepv0=", + "lastModified": 1775213373, + "narHash": "sha256-wJHsijC2l/E+ovmlpPGha8pXA6RHSwHWmBV97gvkmyI=", "owner": "catppuccin", "repo": "nix", - "rev": "4b0f5b7bf7b3eeb484d49524f3c9791864ab9362", + "rev": "ba73719e673e7c2d89ac2f8df0bc0d48983e4907", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1772420042, - "narHash": "sha256-naZz40TUFMa0E0CutvwWsSPhgD5JldyTUDEgP9ADpfU=", + "lastModified": 1773889306, + "narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=", "owner": "nix-community", "repo": "disko", - "rev": "5af7af10f14706e4095bd6bc0d9373eb097283c6", + "rev": "5ad85c82cc52264f4beddc934ba57f3789f28347", "type": "github" }, "original": { @@ -252,11 +252,11 @@ ] }, "locked": { - "lastModified": 1772633327, - "narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=", + "lastModified": 1775320414, + "narHash": "sha256-pIDPHus8udcxO4lT+zUULBfvue2D08E73abzVEJNE+8=", "owner": "nix-community", "repo": "home-manager", - "rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc", + "rev": "5ee3b3ef63e469c84639c2c9e282726352c86069", "type": "github" }, "original": { @@ -281,11 +281,11 @@ ] }, "locked": { - "lastModified": 1753964049, - "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "lastModified": 1772461003, + "narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7", "type": "github" }, "original": { @@ -310,11 +310,11 @@ ] }, "locked": { - "lastModified": 1770511807, - "narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=", + "lastModified": 1772461523, + "narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "7c75487edd43a71b61adb01cae8326d277aab683", + "rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804", "type": "github" }, "original": { @@ -342,11 +342,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1772654524, - "narHash": "sha256-wZ+NFWqNye3FCAEE36dfK60ZrWZCQz2xYiejO/aZ8WQ=", + "lastModified": 1775343634, + "narHash": "sha256-y5X04LWh/RDH7FE3y1xEDD+RP8mkfGGiXXZ9u0hky2g=", "owner": "hyprwm", "repo": "hyprland", - "rev": "34c7cc7d38256f32f30a947f8b459df220149feb", + "rev": "3a7bd8fea2ca9711da5523dc185c05ea30ec0f35", "type": "github" }, "original": { @@ -388,11 +388,11 @@ ] }, "locked": { - "lastModified": 1767023960, - "narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=", + "lastModified": 1772467975, + "narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660", + "rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507", "type": "github" }, "original": { @@ -413,11 +413,11 @@ ] }, "locked": { - "lastModified": 1765214753, - "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", + "lastModified": 1772460177, + "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", + "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", "type": "github" }, "original": { @@ -442,11 +442,11 @@ ] }, "locked": { - "lastModified": 1771866172, - "narHash": "sha256-fYFoXhQLrm1rD8vSFKQBOEX4OGCuJdLt1amKfHd5GAw=", + "lastModified": 1772459629, + "narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0b219224910e7642eb0ed49f0db5ec3d008e3e41", + "rev": "7615ee388de18239a4ab1400946f3d0e498a8186", "type": "github" }, "original": { @@ -494,11 +494,11 @@ ] }, "locked": { - "lastModified": 1764592794, - "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", + "lastModified": 1772462885, + "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", "owner": "hyprwm", "repo": "hyprtoolkit", - "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", + "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", "type": "github" }, "original": { @@ -519,11 +519,11 @@ ] }, "locked": { - "lastModified": 1771271487, - "narHash": "sha256-41gEiUS0Pyw3L/ge1l8MXn61cK14VAhgWB/JV8s/oNI=", + "lastModified": 1774211405, + "narHash": "sha256-6KNwP4ojUzv3YBlZU5BqCpTrWHcix1Jo01BISsTT0xk=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "340a792e3b3d482c4ae5f66d27a9096bdee6d76d", + "rev": "cb4e152dc72095a2af422956c6b689590572231a", "type": "github" }, "original": { @@ -544,11 +544,11 @@ ] }, "locked": { - "lastModified": 1770501770, - "narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=", + "lastModified": 1772459835, + "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40", + "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", "type": "github" }, "original": { @@ -573,11 +573,11 @@ ] }, "locked": { - "lastModified": 1771606233, - "narHash": "sha256-F3PLUqQ/TwgR70U+UeOqJnihJZ2EuunzojYC4g5xHr0=", + "lastModified": 1773074819, + "narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "06c7f1f8c4194786c8400653c4efc49dc14c0f3a", + "rev": "f68afd0e73687598cc2774804fedad76693046f0", "type": "github" }, "original": { @@ -588,11 +588,11 @@ }, "import-tree": { "locked": { - "lastModified": 1772344373, - "narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=", + "lastModified": 1773693634, + "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=", "owner": "vic", "repo": "import-tree", - "rev": "10fda59eee7d7970ec443b925f32a1bc7526648c", + "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1", "type": "github" }, "original": { @@ -694,11 +694,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1772631301, - "narHash": "sha256-wAHeBX+aSiA+cAlWtwe5NisjMfrJq6WxrtT+CE7/tFM=", + "lastModified": 1775089852, + "narHash": "sha256-zcX3hf2cTOQ06kRP+FCYbuaWhy+FLruLFp+D79Enjo4=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "110e61e49828860499ead8bc539470f1261896ae", + "rev": "cfa91d98691d91cc604ab8f4e224819524c496ad", "type": "github" }, "original": { @@ -727,11 +727,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1772207631, - "narHash": "sha256-Jkkg+KqshFO3CbTszVVpkKN2AOObYz+wMsM3ONo1z5g=", + "lastModified": 1774616418, + "narHash": "sha256-z+dLkAS4bqytIlOI4h2MnjBJrSP4d1Awx0n+IV5YA3Y=", "owner": "YaLTeR", "repo": "niri", - "rev": "e708f546153f74acf33eb183b3b2992587a701e5", + "rev": "8f48f56fe19918b5cfa02e5d68a47ebaf7bf3dee", "type": "github" }, "original": { @@ -742,11 +742,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1771969195, - "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", + "lastModified": 1775203647, + "narHash": "sha256-6MWaMLXK9QMndI94CIxeiPafi3wuO+imCtK9tfhsZdw=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", + "rev": "80afbd13eea0b7c4ac188de949e1711b31c2b5f0", "type": "github" }, "original": { @@ -758,11 +758,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1775036866, + "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "type": "github" }, "original": { @@ -774,11 +774,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1772598333, - "narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=", + "lastModified": 1775002709, + "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239", + "rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e", "type": "github" }, "original": { @@ -790,11 +790,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1772542754, - "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", + "lastModified": 1775036866, + "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", + "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "type": "github" }, "original": { @@ -837,11 +837,11 @@ ] }, "locked": { - "lastModified": 1772024342, - "narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=", + "lastModified": 1774104215, + "narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476", + "rev": "f799ae951fde0627157f40aec28dec27b22076d0", "type": "github" }, "original": { @@ -882,11 +882,11 @@ ] }, "locked": { - "lastModified": 1772665116, - "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=", + "lastModified": 1775036584, + "narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198", + "rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735", "type": "github" }, "original": { @@ -919,11 +919,11 @@ ] }, "locked": { - "lastModified": 1772495394, - "narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=", + "lastModified": 1775188331, + "narHash": "sha256-/0BoSi0Dg0ON7IW0oscM12WSPBaMSCn36XTt0lHZoy8=", "owner": "mic92", "repo": "sops-nix", - "rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff", + "rev": "8f093d0d2f08f37317778bd94db5951d6cce6c46", "type": "github" }, "original": { @@ -1020,11 +1020,11 @@ ] }, "locked": { - "lastModified": 1761431178, - "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", + "lastModified": 1773601989, + "narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", + "rev": "a9b862d1aa000a676d310cc62d249f7ad726233d", "type": "github" }, "original": { @@ -1053,11 +1053,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1772429643, - "narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=", + "lastModified": 1773622265, + "narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2", + "rev": "a879e5e0896a326adc79c474bf457b8b99011027", "type": "github" }, "original": { From cbc7175312c1092c2c21af5d9f570fe1fb35979d Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sat, 18 Apr 2026 21:56:25 +0200 Subject: [PATCH 59/81] nvim directly, workspace via home.nix --- docs/misc.md | 13 +++++++++++- flake.lock | 22 +++++++++++++++++---- flake.nix | 1 - hosts/zion/home.nix | 9 +++++++++ modules/home/cli/tools/core/programs.nix | 3 +-- modules/home/desktops/hyprland/default.nix | 19 +++++++++--------- modules/home/desktops/hyprland/keybinds.nix | 4 +++- 7 files changed, 53 insertions(+), 18 deletions(-) diff --git a/docs/misc.md b/docs/misc.md index 3525aba..5c78eae 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -30,6 +30,11 @@ sudo efibootmgr --create \ --loader '\EFI\systemd\systemd-bootx64.efi' \ # Mind the backslashes ``` +## Monitor setup + +All possible monitor configurations are configured via `kanshi`, which maches automatically the correct profile. +`/modules/home/desktops/addons/kanshi` + ## Nix follows ``` @@ -43,5 +48,11 @@ This will follow the actual flakes `nixpkgs`, neonix by itself uses `nixvim` fro of `nixpkgs`. If the flakes `nixpkgs` is to new, plugins and packages from it will be "to new" for the rather outdated `nixvim` from neonix repo. This can lead to problems starting nvim, this can be fixed by update the `neonix` flake accordingly. - > There is also a nix (lix?) bug, which does not update the `flake.lock` when a follows is removed. + +## Neonix + +TODO +`neonix` my own `nvim` distro, needs to have its own `nixpkgs`, so no `nixpkgs.follows` should be configured. +Because `nixvim` should be aligned with the deps. + diff --git a/flake.lock b/flake.lock index e4f7a03..5ac6b94 100644 --- a/flake.lock +++ b/flake.lock @@ -640,9 +640,7 @@ "neonix": { "inputs": { "import-tree": "import-tree_2", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks_2" }, @@ -789,6 +787,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1772542754, + "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1775036866, "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", @@ -907,7 +921,7 @@ "nfsm": "nfsm", "niri": "niri", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks_3", "sops-nix": "sops-nix" } diff --git a/flake.nix b/flake.nix index aeb7ee2..27ab1e1 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,6 @@ }; neonix = { url = "github:rgroemmer/neonix"; - inputs.nixpkgs.follows = "nixpkgs"; }; krewfile = { url = "github:brumhard/krewfile"; diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index 41d1714..e775073 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -25,6 +25,15 @@ enable = true; cmd = "${pkgs.hyprlock}/bin/hyprlock"; }; + + workspaces = '' + workspace=1, monitor:DP-1, default:true + workspace=2, monitor:DP-1 + workspace=3, monitor:DP-1 + workspace=4, monitor:DP-2, default:true + workspace=5, monitor:DP-2 + workspace=6, monitor:DP-2 + ''; }; }; diff --git a/modules/home/cli/tools/core/programs.nix b/modules/home/cli/tools/core/programs.nix index 96eae45..ca28f4f 100644 --- a/modules/home/cli/tools/core/programs.nix +++ b/modules/home/cli/tools/core/programs.nix @@ -3,13 +3,12 @@ bat.enable = true; fzf.enable = true; btop.enable = true; - yazi.enable = true; }; + programs = { bat.enable = true; fzf.enable = true; btop.enable = true; - yazi.enable = true; zoxide.enable = true; neonix.enable = true; diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index adcb723..fd29f88 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -12,7 +12,7 @@ let cfg = config.roles.desktop.hyprland; in { - options.roles.desktop.hyprland = { + options.roles.desktop.hyprland = with types; { enable = mkEnableOption "Enable hyprland"; package = mkPackageOption pkgs "hyprland" { @@ -25,8 +25,10 @@ in hypridle = { enable = mkEnableOption "Enable hypridle"; - cmd = mkOption { type = types.str; }; + cmd = mkOpt str "Path to binary"; }; + + workspaces = mkOpt str "Workspace config"; }; imports = [ @@ -39,6 +41,7 @@ in home.packages = [ hyprland-qtutils slurp + rofimoji ]; # environment.d defines environment variables for the user session, beyond shell level. @@ -47,6 +50,8 @@ in PATH="$HOME/.nix-profile/bin:$PATH" ''; + xdg.configFile."hypr/workspaces.conf".text = cfg.workspaces; + catppuccin.hyprland.enable = true; wayland.windowManager.hyprland = { enable = true; @@ -99,13 +104,9 @@ in ]; bind = import ./keybinds.nix; - - # TODO: needed? - # workspace = [ - # # Special - # "special:scratchy" - # "special:aux" - # ]; + source = [ + "${config.xdg.configHome}/hypr/workspaces.conf" + ]; windowrule = [ "match:class ^(firefox)$, workspace 4" diff --git a/modules/home/desktops/hyprland/keybinds.nix b/modules/home/desktops/hyprland/keybinds.nix index ceb4c47..f9e3a63 100644 --- a/modules/home/desktops/hyprland/keybinds.nix +++ b/modules/home/desktops/hyprland/keybinds.nix @@ -55,10 +55,12 @@ "SUPER SHIFT,O, movetoworkspace, special:scratchy" "SUPER SHIFT,M, movetoworkspace, special:aux" - # Special + # -- Programs # Mumble "SUPER,Z, exec, mumble rpc togglemute" "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" + # Emoji picker + "SUPER,period, exec, rofimoji" ] From a4258a04a501fd589de76ff0bb0c8db572207551 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 19 Apr 2026 02:08:09 +0200 Subject: [PATCH 60/81] minimal changes --- flake.lock | 102 +++++++++---------- modules/home/desktops/addons/gtk/default.nix | 6 +- modules/home/desktops/hyprland/default.nix | 1 + 3 files changed, 57 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index 5ac6b94..7fb1ce4 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1774211390, - "narHash": "sha256-sTtAgCCaX8VNNZlQFACd3i1IQ+DB0Wf3COgiFS152ds=", + "lastModified": 1775558810, + "narHash": "sha256-fy95EdPnqQlpbP8+rk0yWKclWShCUS5VKs6P7/1MF2c=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "f62a4dbfa4e5584f14ad4c62afedf6e4b433cf70", + "rev": "7371b669b22aa2af980f913fc312a786d2f1abb2", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1775213373, - "narHash": "sha256-wJHsijC2l/E+ovmlpPGha8pXA6RHSwHWmBV97gvkmyI=", + "lastModified": 1776420287, + "narHash": "sha256-0P2QyDM8R1FFww//TNDLTRVnVkQxVdbEVQiVuyD1SqY=", "owner": "catppuccin", "repo": "nix", - "rev": "ba73719e673e7c2d89ac2f8df0bc0d48983e4907", + "rev": "bdf0285dc7978ebd78b76054631d7ef05680895e", "type": "github" }, "original": { @@ -252,11 +252,11 @@ ] }, "locked": { - "lastModified": 1775320414, - "narHash": "sha256-pIDPHus8udcxO4lT+zUULBfvue2D08E73abzVEJNE+8=", + "lastModified": 1776454077, + "narHash": "sha256-7zSUFWsU0+jlD7WB3YAxQ84Z/iJurA5hKPm8EfEyGJk=", "owner": "nix-community", "repo": "home-manager", - "rev": "5ee3b3ef63e469c84639c2c9e282726352c86069", + "rev": "565e5349208fe7d0831ef959103c9bafbeac0681", "type": "github" }, "original": { @@ -310,11 +310,11 @@ ] }, "locked": { - "lastModified": 1772461523, - "narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=", + "lastModified": 1775496928, + "narHash": "sha256-Ds759WU03mGWtu3I43J+5GF5Ni8TvF+GYQUFD+fVeMo=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804", + "rev": "cf95d93d17baa18f1d9b016b3afe27f820521a6e", "type": "github" }, "original": { @@ -342,11 +342,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1775343634, - "narHash": "sha256-y5X04LWh/RDH7FE3y1xEDD+RP8mkfGGiXXZ9u0hky2g=", + "lastModified": 1776514109, + "narHash": "sha256-sGZir5sjqKOUv2fywOFXVolUnVJRtI1KvAqt42ql/mI=", "owner": "hyprwm", "repo": "hyprland", - "rev": "3a7bd8fea2ca9711da5523dc185c05ea30ec0f35", + "rev": "889ee4f26d77ff0c36f5c4767ef0629371fd2c18", "type": "github" }, "original": { @@ -388,11 +388,11 @@ ] }, "locked": { - "lastModified": 1772467975, - "narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=", + "lastModified": 1774710575, + "narHash": "sha256-p7Rcw13+gA4Z9EI3oGYe3neQ3FqyOOfZCleBTfhJ95Q=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507", + "rev": "0703df899520001209646246bef63358c9881e36", "type": "github" }, "original": { @@ -519,11 +519,11 @@ ] }, "locked": { - "lastModified": 1774211405, - "narHash": "sha256-6KNwP4ojUzv3YBlZU5BqCpTrWHcix1Jo01BISsTT0xk=", + "lastModified": 1774911391, + "narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "cb4e152dc72095a2af422956c6b689590572231a", + "rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d", "type": "github" }, "original": { @@ -573,11 +573,11 @@ ] }, "locked": { - "lastModified": 1773074819, - "narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=", + "lastModified": 1775414057, + "narHash": "sha256-mDpHnf+MkdOxEqIM1TnckYYh9p1SXR8B3KQfNZ12M8s=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "f68afd0e73687598cc2774804fedad76693046f0", + "rev": "86012ee01b0fdd8bf3101ef38816f2efbee42490", "type": "github" }, "original": { @@ -692,11 +692,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1775089852, - "narHash": "sha256-zcX3hf2cTOQ06kRP+FCYbuaWhy+FLruLFp+D79Enjo4=", + "lastModified": 1776509722, + "narHash": "sha256-oHVMjAMBukYnGeEE0EtCQsx8cNRv8WadHD8ZV3oZFSM=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "cfa91d98691d91cc604ab8f4e224819524c496ad", + "rev": "f8cc32a3aba29fdacd06d80b0986028cfd413a22", "type": "github" }, "original": { @@ -725,11 +725,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1774616418, - "narHash": "sha256-z+dLkAS4bqytIlOI4h2MnjBJrSP4d1Awx0n+IV5YA3Y=", + "lastModified": 1776505268, + "narHash": "sha256-+hK+EgAwuRG+lhqwOkKfXlqMEdELIoTMdjfVosIlLb0=", "owner": "YaLTeR", "repo": "niri", - "rev": "8f48f56fe19918b5cfa02e5d68a47ebaf7bf3dee", + "rev": "9e5716a9dbf7dbf9622a95a5bd23a898867759c6", "type": "github" }, "original": { @@ -740,11 +740,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1775203647, - "narHash": "sha256-6MWaMLXK9QMndI94CIxeiPafi3wuO+imCtK9tfhsZdw=", + "lastModified": 1775490113, + "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "80afbd13eea0b7c4ac188de949e1711b31c2b5f0", + "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7", "type": "github" }, "original": { @@ -756,11 +756,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775036866, - "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", + "lastModified": 1776169885, + "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", + "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", "type": "github" }, "original": { @@ -772,11 +772,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1775002709, - "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", + "lastModified": 1776434932, + "narHash": "sha256-gyqXNMgk3sh+ogY5svd2eNLJ6oEwzbAeaoBrrxD0lKk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bcd464ccd2a1a7cd09aa2f8d4ffba83b761b1d0e", + "rev": "c7f47036d3df2add644c46d712d14262b7d86c0c", "type": "github" }, "original": { @@ -804,11 +804,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1775036866, - "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", + "lastModified": 1776169885, + "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", + "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", "type": "github" }, "original": { @@ -851,11 +851,11 @@ ] }, "locked": { - "lastModified": 1774104215, - "narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=", + "lastModified": 1775036584, + "narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f799ae951fde0627157f40aec28dec27b22076d0", + "rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735", "type": "github" }, "original": { @@ -896,11 +896,11 @@ ] }, "locked": { - "lastModified": 1775036584, - "narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=", + "lastModified": 1775585728, + "narHash": "sha256-8Psjt+TWvE4thRKktJsXfR6PA/fWWsZ04DVaY6PUhr4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735", + "rev": "580633fa3fe5fc0379905986543fd7495481913d", "type": "github" }, "original": { @@ -933,11 +933,11 @@ ] }, "locked": { - "lastModified": 1775188331, - "narHash": "sha256-/0BoSi0Dg0ON7IW0oscM12WSPBaMSCn36XTt0lHZoy8=", + "lastModified": 1776119890, + "narHash": "sha256-Zm6bxLNnEOYuS/SzrAGsYuXSwk3cbkRQZY0fJnk8a5M=", "owner": "mic92", "repo": "sops-nix", - "rev": "8f093d0d2f08f37317778bd94db5951d6cce6c46", + "rev": "d4971dd58c6627bfee52a1ad4237637c0a2fb0cd", "type": "github" }, "original": { diff --git a/modules/home/desktops/addons/gtk/default.nix b/modules/home/desktops/addons/gtk/default.nix index 086a818..722ee32 100644 --- a/modules/home/desktops/addons/gtk/default.nix +++ b/modules/home/desktops/addons/gtk/default.nix @@ -4,7 +4,9 @@ ... }: { - gtk = lib.mkForce { + # TODO: Check if this force is necessary + # gtk = lib.mkForce { + gtk = { enable = true; colorScheme = "dark"; @@ -20,6 +22,8 @@ name = "Papirus-Dark"; package = pkgs.catppuccin-papirus-folders; }; + + gtk4.theme = null; # Legacy default due to stateVersion }; home = diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index fd29f88..4d2460f 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -56,6 +56,7 @@ in wayland.windowManager.hyprland = { enable = true; inherit (cfg) package; + systemd.enable = true; settings = { general = { From ad14c62abf9039e5a88a6f2e8b1651c02c631d50 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 19 Apr 2026 03:31:59 +0200 Subject: [PATCH 61/81] Is this finally a workspace solution? :O --- hosts/zion/home.nix | 9 - .../home/desktops/addons/kanshi/default.nix | 181 ++++++++++-------- modules/home/desktops/hyprland/default.nix | 5 +- 3 files changed, 105 insertions(+), 90 deletions(-) diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index e775073..41d1714 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -25,15 +25,6 @@ enable = true; cmd = "${pkgs.hyprlock}/bin/hyprlock"; }; - - workspaces = '' - workspace=1, monitor:DP-1, default:true - workspace=2, monitor:DP-1 - workspace=3, monitor:DP-1 - workspace=4, monitor:DP-2, default:true - workspace=5, monitor:DP-2 - workspace=6, monitor:DP-2 - ''; }; }; diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 05de93e..64f353d 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -1,83 +1,110 @@ +{ pkgs, lib, ... }: { - services.kanshi = { - enable = true; - systemdTarget = "hyprland-session.target"; + services.kanshi = + let + workspaceSetup = pkgs.writeShellScriptBin "workspaceSetup" '' + primary="$1" + secondary="$2" - settings = [ - { - profile = { - name = "firefly-undocked"; - outputs = [ - { - criteria = "eDP-1"; - scale = 1.0; - status = "enable"; - } - ]; - }; - } + cat < "$HOME/.config/hypr/workspaces.conf" + # Generated by RAPSN workspaceSetup on "$(date +"%d-%m-%Y at %H:%M:%S")". - { - profile = { - name = "firefly-home"; - outputs = [ - { - criteria = "DP-1"; - position = "2560,0"; - mode = "3840x2160@143.99Hz"; - } - { - criteria = "HDMI-A-1"; - scale = 1.0; - position = "0,0"; - mode = "2560x1440@144.00Hz"; - } - { - criteria = "eDP-1"; - status = "disable"; - } - ]; - }; - } + workspace=1,monitor:$primary,default:true + workspace=2,monitor:$primary + workspace=3,monitor:$primary + workspace=4,monitor:$secondary,default:true + workspace=5,monitor:$secondary + workspace=6,monitor:$secondary + EOF - { - profile = { - name = "zion-home"; - outputs = [ - { - criteria = "DP-1"; - position = "2560,0"; - mode = "3840x2160@239.99Hz"; - } - { - criteria = "DP-2"; - scale = 1.0; - position = "0,0"; - mode = "2560x1440@144.00Hz"; - } - ]; - }; - } + ${lib.getExe' pkgs.hyprland "hyprctl"} dispatch workspace 1 + ''; + in + { + enable = true; + systemdTarget = "hyprland-session.target"; - { - profile = { - name = "firefly-office"; - outputs = [ - { - criteria = "eDP-1"; - status = "disable"; - } - { - criteria = "DP-8"; - position = "0,0"; - } - { - criteria = "DP-9"; - position = "1920,0"; - } - ]; - }; - } - ]; - }; + settings = [ + # ----- FIREFLY ----- # + { + profile = { + name = "firefly-undocked"; + outputs = [ + { + criteria = "eDP-1"; + scale = 1.0; + status = "enable"; + } + ]; + }; + } + + { + profile = { + name = "firefly-home"; + outputs = [ + { + criteria = "DP-1"; + position = "2560,0"; + mode = "3840x2160@143.99Hz"; + } + { + criteria = "HDMI-A-1"; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + exec = "${lib.getExe workspaceSetup} DP-1 HDMI-A-1"; + }; + } + + { + profile = { + name = "firefly-office"; + outputs = [ + { + criteria = "DP-8"; + position = "0,0"; + } + { + criteria = "DP-9"; + position = "1920,0"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + exec = "${lib.getExe workspaceSetup} DP-8 DP-9"; + }; + } + + # ----- ZION ----- # + { + profile = { + name = "zion-home"; + outputs = [ + { + criteria = "DP-1"; + scale = 1.5; + position = "2560,0"; + mode = "3840x2160@239.99Hz"; + } + { + criteria = "DP-2"; + scale = 1.0; + position = "0,0"; + mode = "2560x1440@144.00Hz"; + } + ]; + exec = "${lib.getExe workspaceSetup} DP-1 DP-2"; + }; + } + ]; + }; } diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index 4d2460f..72e8ad3 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -27,8 +27,6 @@ in enable = mkEnableOption "Enable hypridle"; cmd = mkOpt str "Path to binary"; }; - - workspaces = mkOpt str "Workspace config"; }; imports = [ @@ -50,8 +48,6 @@ in PATH="$HOME/.nix-profile/bin:$PATH" ''; - xdg.configFile."hypr/workspaces.conf".text = cfg.workspaces; - catppuccin.hyprland.enable = true; wayland.windowManager.hyprland = { enable = true; @@ -106,6 +102,7 @@ in bind = import ./keybinds.nix; source = [ + "${config.xdg.configHome}/hypr/monitors.conf" "${config.xdg.configHome}/hypr/workspaces.conf" ]; From 38d4776e3a25cd096a93009c31d39026488294cc Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Sun, 19 Apr 2026 05:21:44 +0200 Subject: [PATCH 62/81] Improve script --- dev-shells.nix | 15 +++++++++ docs/firefly.md | 32 +++++++++++-------- docs/misc.md | 15 +++++++-- modules/home/cli/tools/git/default.nix | 29 +++++++++++++++-- .../home/desktops/addons/kanshi/default.nix | 18 ++++++++--- 5 files changed, 85 insertions(+), 24 deletions(-) diff --git a/dev-shells.nix b/dev-shells.nix index e96466b..c90f471 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -12,6 +12,16 @@ let deadnix.enable = true; }; }; + + # Makefile like targets + switch-firefly = pkgs.writeShellScriptBin "switch-firefly" '' + NIX_CONFIG="experimental-features = nix-command flakes" \ + nh home switch -c nix@firefly . --show-activation-logs + ''; + + switch-zion = pkgs.writeShellScriptBin "switch-zion" '' + nh os switch && nh home switch + ''; in { default = @@ -21,6 +31,11 @@ in packages = [ nh + switch-firefly + switch-zion + + hello + statix deadnix nixfmt diff --git a/docs/firefly.md b/docs/firefly.md index 0f65850..7b5dfe7 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -3,22 +3,27 @@ 1. Firefox profile ```bash +# TODO: Add this to home.nix rsync -av --update ~/.mozilla/firefox/default ~/Nextcloud/Home/Backups/firefox_profile/ ``` -2. Check atuin `key` -> bitwarden +2. Check atuin `key` match with the key in vault. # Install device -1. Install `lix` or `nix` -2. Clone dotfiles - 1. Change username if needed in `home.nix` -3. Switch config +1. Install `nix` (May disable any VPN) ```bash -nh home switch -c nix@firefly . --show-activation-logs +Verify command on nixos.org/download +sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon +``` + +2. Clone dotfiles + 1. Change username `home.nix`, if necessary. +3. Switch config via `devshells` target. -# TODO: Remove when lix breaking changes are integrated into nixpkgs || move to official nix -nh home switch -c nix@firefly . --show-activation-logs -- --extra-deprecated-features tokens-no-whitespace --extra-deprecated-features rec-set-merges --extra-deprecated-features broken-string-escape +```bash +nix develop +switch-firefly ``` 4. Create `hyprland` desktop file. @@ -34,6 +39,7 @@ Type=Application" | sudo tee /usr/share/wayland-sessions/hyprland.desktop 5. Copy user-certificate to firefox ```bash +# TODO: Add this to home.nix (as activation script for example) ln -sf ~/.pki/nssdb/* ~/.mozilla/firefox/default/ ``` @@ -63,11 +69,9 @@ Comma-separated list of URLs: ### GTK Theme -`nwg-look` can be used to set the theme for multiple setting files simultanouly. -Important is that the exact theme **name** is set via `gsetting`. - -`nwg-look` can be used to see what the actual name is, to persist configure it in home-manager `gtk.theme.name`. -Also `gtk.colorScheme = dark`, should enable most GTK apps to use dark by default. +`nwg-look` is used to configure theme in multiple locations. +Run it, ensure to remove the check of `GTK4` files in preferences. +Set `widgets -> colorScheme -> prefer dark`. ```bash dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name @@ -78,6 +82,8 @@ dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name Those programs are installed via apt, since they do not work within `nix`. ```bash +# TODO: Check why hyprlock not working +sudo add-apt-repository ppa:cppiber/hyprland sudo apt update sudo apt -y install \ xdg-desktop-portal-wlr \ diff --git a/docs/misc.md b/docs/misc.md index 5c78eae..368e967 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -52,7 +52,16 @@ This can lead to problems starting nvim, this can be fixed by update the `neonix ## Neonix -TODO -`neonix` my own `nvim` distro, needs to have its own `nixpkgs`, so no `nixpkgs.follows` should be configured. -Because `nixvim` should be aligned with the deps. +`neonix` needs to have its own `nixpkgs`, so no `nixpkgs.follows` is configured. +Instead this should be updated on its own, because if nixpkgs in dotfiles is to new, all dependencies and plugins of +nvim may not work anymore with the `neonix` upstream configuration. + +## Monitor / Workspace setup + +`kanshi` is used to match all possible desktop / office setups via profiles. +These profiles have the primary and secondary display configured, and will execute a script to adapt the workspace pinning. +This will write its config to `~/.config/hypr/workspaces.conf`, same as `nwg-desktop`. +`nwg-desktop` can still be used for both monitor and workspace dynamic configuration. + +**To actually change the monitor config, the `kanshi` systemd service needs to be stopped.** diff --git a/modules/home/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix index 37adbe4..50bcdc0 100644 --- a/modules/home/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -4,9 +4,32 @@ ... }: { - home.packages = with pkgs; [ - gh - ]; + home.packages = + let + # Search through release notes + ghr-grep = pkgs.writeShellScriptBin "ghr-grep" '' + set -euo pipefail + usage='usage: ghr-grep org/repo "search_term"' + repo="''${1:?$usage}" + count="''${2:?$usage}" + search_term="''${3:?$usage}" + release_tags=$(gh release list -R "$repo" --limit "$count" | awk '{print $1}') + + for tag in $release_tags; do + body="$(gh release view "$tag" -R "$repo" --json body -q .body)" + if grep -qi -- "$search_term" <<<"$body"; then + echo -e "\033[0;32m=== $tag ===\033[0m" + grep -i -- "$search_term" <<<"$body" + echo + fi + done + ''; + in + with pkgs; + [ + gh + ghr-grep + ]; programs = { git = { diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 64f353d..7204381 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -2,11 +2,17 @@ { services.kanshi = let + hyprctl = lib.getExe' pkgs.hyprland "hyprctl"; workspaceSetup = pkgs.writeShellScriptBin "workspaceSetup" '' - primary="$1" - secondary="$2" + primary="''${1:?missing primary monitor name}" + secondary="''${2:?missing secondary monitor name}" - cat < "$HOME/.config/hypr/workspaces.conf" + # Switch away so workspaces to pin, are unfocused before rewriting the config. + ${hyprctl} dispatch focusmonitor $primary && ${hyprctl} dispatch workspace 9 + ${hyprctl} dispatch focusmonitor $secondary && ${hyprctl} dispatch workspace 10 + ${hyprctl} dispatch focusmonitor $primary + + cat > "$HOME/.config/hypr/workspaces.conf" < Date: Sun, 26 Apr 2026 23:24:36 +0200 Subject: [PATCH 63/81] Update hyprland, refactor workspaces --- docs/monitors.md | 22 ++ hosts/zion/default.nix | 3 + hosts/zion/hardware-configuration.nix | 17 +- modules/home/cli/tools/core/packages.nix | 3 + .../home/desktops/addons/kanshi/default.nix | 10 +- .../home/desktops/addons/waybar/waybar.css | 14 +- .../home/desktops/addons/waybar/waybar.json | 20 +- .../home/desktops/addons/wlogout/style.css | 12 +- modules/home/desktops/hyprland/default.nix | 40 +--- modules/home/desktops/hyprland/keybinds.nix | 196 ++++++++++++------ 10 files changed, 213 insertions(+), 124 deletions(-) create mode 100644 docs/monitors.md diff --git a/docs/monitors.md b/docs/monitors.md new file mode 100644 index 0000000..06782fd --- /dev/null +++ b/docs/monitors.md @@ -0,0 +1,22 @@ +# Monitor / Workspace setup + +`kanshi` is used to match all possible desktop / office setups via profiles. +These profiles have the primary and secondary display configured, and will execute a script to adapt the workspace pinning. +This will write its config to `~/.config/hypr/workspaces.conf`, same as `nwg-desktop`. +`nwg-desktop` can still be used for both monitor and workspace dynamic configuration. + +**To actually change the monitor config, the `kanshi` systemd service needs to be stopped.** + + +## Samsungs auto input switch not working +With `ddcutil` it is possible to switch input of a display port monitor. + +``` +ddcutil --display 2 setvcp 60 0x09 # Display port (Zion) +ddcutil --display 2 setvcp 60 0x06 # HDMT (Firefly) +``` + +### TODOs + +- Add this to hyprland autostart, to automatically change input on startup. +- Create keybinding to switch both monitors between inputs. diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index 4a00b30..392246c 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -17,6 +17,7 @@ extraGroups = [ "networkmanager" "wireshark" + "i2c" ]; extraOptions = { initialHashedPassword = "$y$j9T$DZQaaK3xGqarN8KE8qnw..$dvgiS7dso5LboGRRf0dcyct/LQUFp4J0LUo2ZRRdTr8"; @@ -61,6 +62,8 @@ }; }; + hardware.i2c.enable = true; + services.udev.packages = with pkgs; [ qmk-udev-rules ]; diff --git a/hosts/zion/hardware-configuration.nix b/hosts/zion/hardware-configuration.nix index 8417cd3..11d7d9c 100644 --- a/hosts/zion/hardware-configuration.nix +++ b/hosts/zion/hardware-configuration.nix @@ -1,22 +1,23 @@ -# Do not modify this file! It was generated by โ€˜nixos-generate-configโ€™ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, modulesPath, ... -}: { - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; +}: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd.availableKernelModules = [ "nvme" "xhci_pci" # USB-3.0 Controller "usbhid" ]; - initrd.kernelModules = ["amdgpu"]; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; + initrd.kernelModules = [ "amdgpu" ]; + kernelModules = [ + "kvm-amd" + "i2c-dev" + ]; + extraModulePackages = [ ]; }; fileSystems."/" = { diff --git a/modules/home/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix index 177e037..e2fd46f 100644 --- a/modules/home/cli/tools/core/packages.nix +++ b/modules/home/cli/tools/core/packages.nix @@ -49,5 +49,8 @@ # Clipboard wl-clipboard + + # Monitor / I2C com + ddcutil ]; } diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 7204381..96f5643 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -15,12 +15,10 @@ cat > "$HOME/.config/hypr/workspaces.conf" < Date: Sun, 26 Apr 2026 23:50:32 +0200 Subject: [PATCH 64/81] Update docs --- README.md | 38 +++-- docs/hyprland.md | 152 ++++++++++++++++++++ modules/home/desktops/hyprland/keybinds.nix | 2 +- 3 files changed, 181 insertions(+), 11 deletions(-) create mode 100644 docs/hyprland.md diff --git a/README.md b/README.md index d572965..b5bdfb2 100644 --- a/README.md +++ b/README.md @@ -24,29 +24,42 @@ It follows a structure to keep related configurations together, but not too much # On fresh systems nix develop -# NixOS rebuilds (hostname autodetection) +# Dedicated devshell targets +switch-zion +switch-firefly +``` + +
+ ๐Ÿ”ฝ Details +
+ +```bash +# nh switch (hostname autodetection) nh os switch . +nh home switch . -# NixOS build with custom hostname +# nh switch with custom hostname nh os build --hostname kubex . +nh home switch -c nix@firefly . -# NixOS build installer iso image +# nix build installer iso nix build .#nixosConfigurations.vinox.config.system.build.isoImage -# NixOS remote switch +# nh remote switch nh os switch --hostname kubex . -d always --target-host kubex nh os switch --hostname nixberry . -d always --target-host -# Or +# nix remote switch nixos-rebuild switch --flake .#kubex --target-host 192.168.55.10 --sudo -# HomeManager rebuilds (hostname & username autodetection) -nh home switch . - -# HomeManager build with custom hostname -# TODO:! +# enable experimental-features +export NIX_CONFIG="experimental-features = nix-command flakes" +# OR +--extra-experimental-features "nix-command flakes" ``` +
+
๐Ÿ’ฝ Disko
@@ -63,6 +76,11 @@ sudo nixos-install --flake .#zion
+## :open_book: Docs + +- [Hyprland - Keymap](./docs/hyprland.md#keymap) +- [NVIM - Keymap](https://github.com/RAPSNX/neonix/tree/main/docs/keymap.md) + ## Licenses The NixOS logo used in this repository is based on the original design available at [NixOS Artwork Repository](https://github.com/NixOS/nixos-artwork/blob/master/logo/nix-snowflake-colours.svg). diff --git a/docs/hyprland.md b/docs/hyprland.md new file mode 100644 index 0000000..23167d5 --- /dev/null +++ b/docs/hyprland.md @@ -0,0 +1,152 @@ +# Hyprland + +General docs for hyprland. + +## Keymap +# Hyprland + +General docs for hyprland. + +## Keymap + +--- + + + + + + +
+ +### ๐Ÿ–ฅ๏ธ General + +| Keybinding | Action | +| --------------- | --------------------------- | +| `SUPER + ENTER` | Open terminal (*alacritty*) | +| `SUPER + E` | App launcher (*fuzzel*) | +| `SUPER + P` | Logout menu (*wlogout*) | +| `SUPER + Q` | Kill active window | +| `SUPER + N` | Toggle notifications | + +--- + +### ๐ŸชŸ Window Management + +| Keybinding | Action | +| ------------------- | ----------------- | +| `SUPER + F` | Toggle fullscreen | +| `SUPER + SHIFT + F` | Force fullscreen | +| `SUPER + U` | Toggle floating | +| `SUPER + T` | Toggle split | + +--- + +### ๐Ÿงญ Focus Movement + +| Keybinding | Direction | +| ----------- | --------- | +| `SUPER + H` | Left | +| `SUPER + J` | Down | +| `SUPER + K` | Up | +| `SUPER + L` | Right | + +--- + +### ๐Ÿšš Move Windows + +| Keybinding | Action | +| ------------------- | ---------- | +| `SUPER + SHIFT + H` | Move left | +| `SUPER + SHIFT + J` | Move down | +| `SUPER + SHIFT + K` | Move up | +| `SUPER + SHIFT + L` | Move right | + + + +### ๐Ÿ—‚๏ธ Workspaces + +**Switch** + +| Keybinding | Action | +| -------------- | ------------- | +| `SUPER + 1..9` | Workspace 1โ€“9 | + +**Move** + +| Keybinding | Action | +| ------------ | ------------------- | +| `ALT + 1..8` | Move to workspace | + +--- + +### ๐Ÿงช Special Workspaces + +| Keybinding | Action | +| ------------------- | ----------------- | +| `SUPER + O` | Toggle scratchy | +| `SUPER + M` | Toggle aux | +| `SUPER + SHIFT + O` | Move to scratchy | +| `SUPER + SHIFT + M` | Move to aux | + +--- + +### โš™๏ธ Programs + +| Keybinding | Action | +| ------------------- | ------------- | +| `SUPER + Z` | Mute (Mumble) | +| `SUPER + SHIFT + Z` | Deaf (Mumble) | +| `SUPER + .` | Emoji picker | + +--- + +### ๐Ÿ–ฑ๏ธ Mouse + +| Keybinding | Action | +| --------------------- | ------------- | +| `SUPER + Left Click` | Move window | +| `SUPER + Right Click` | Resize window | + +--- + +### ๐Ÿ“ Resize Mode + +`SUPER + R` + +| Keybinding | Action | +| ----------------- | ----------- | +| `H / J / K / L` | Resize big | +| `SHIFT + H/J/K/L` | Resize fine | +| `ENTER / ESC` | Exit | + +--- + +### ๐Ÿงฉ Window Mode + +`SUPER + Z` + +| Key | Action | +| --- | ------ | +| Q | WS 1 | +| W | WS 2 | +| E | WS 3 | +| R | WS 4 | + +**Firefox** + +| Keybinding | Action | +| ----------- | -------------- | +| `B` | Move Firefox | +| `SHIFT + B` | Silent to WS 3 | + +Exit: `ENTER / ESC` + +
+ +--- + +## โ„น๏ธ Notes + +- `SUPER` = Windows key +- Vim-style navigation (`H/J/K/L`) +- Submaps behave like modal layers diff --git a/modules/home/desktops/hyprland/keybinds.nix b/modules/home/desktops/hyprland/keybinds.nix index 429d06c..c25f1b9 100644 --- a/modules/home/desktops/hyprland/keybinds.nix +++ b/modules/home/desktops/hyprland/keybinds.nix @@ -73,7 +73,7 @@ in "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" # Emoji picker - "SUPER,period, exec, rofimoji" + "SUPER,period, exec, rofimoji --action copy --action type" ]; extraConfig = '' From 8c0386e2c6830a713a28a0ef81f59f762ce41734 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 27 Apr 2026 00:05:39 +0200 Subject: [PATCH 65/81] Update docs --- docs/hyprland.md | 182 +++++++++++++++++------------------------------ 1 file changed, 64 insertions(+), 118 deletions(-) diff --git a/docs/hyprland.md b/docs/hyprland.md index 23167d5..5fc4772 100644 --- a/docs/hyprland.md +++ b/docs/hyprland.md @@ -3,150 +3,96 @@ General docs for hyprland. ## Keymap -# Hyprland - -General docs for hyprland. - -## Keymap - ---- -
-### ๐Ÿ–ฅ๏ธ General - -| Keybinding | Action | -| --------------- | --------------------------- | -| `SUPER + ENTER` | Open terminal (*alacritty*) | -| `SUPER + E` | App launcher (*fuzzel*) | -| `SUPER + P` | Logout menu (*wlogout*) | -| `SUPER + Q` | Kill active window | -| `SUPER + N` | Toggle notifications | - ---- +## Common -### ๐ŸชŸ Window Management - -| Keybinding | Action | -| ------------------- | ----------------- | -| `SUPER + F` | Toggle fullscreen | -| `SUPER + SHIFT + F` | Force fullscreen | -| `SUPER + U` | Toggle floating | -| `SUPER + T` | Toggle split | - ---- +| Key | Action | +|---|---| +| `Super+Enter` | Terminal | +| `Super+E` | Launcher | +| `Super+P` | Logout menu | +| `Super+Q` | Kill window | +| `Super+N` | Notifications | +| `Super+.` | Emoji picker | -### ๐Ÿงญ Focus Movement +## Window -| Keybinding | Direction | -| ----------- | --------- | -| `SUPER + H` | Left | -| `SUPER + J` | Down | -| `SUPER + K` | Up | -| `SUPER + L` | Right | +| Key | Action | +|---|---| +| `Super+F` | Fullscreen `1` | +| `Super+Shift+F` | Fullscreen | +| `Super+U` | Floating | +| `Super+T` | Toggle split | +| `Super+Mouse1` | Move | +| `Super+Mouse2` | Resize | ---- +## Focus / Move -### ๐Ÿšš Move Windows +| Key | Action | +|---|---| +| `Super+H` | Focus left | +| `Super+J` | Focus down | +| `Super+K` | Focus up | +| `Super+L` | Focus right | +| `Super+Shift+H` | Move left | +| `Super+Shift+J` | Move down | +| `Super+Shift+K` | Move up | +| `Super+Shift+L` | Move right | + +## Workspaces -| Keybinding | Action | -| ------------------- | ---------- | -| `SUPER + SHIFT + H` | Move left | -| `SUPER + SHIFT + J` | Move down | -| `SUPER + SHIFT + K` | Move up | -| `SUPER + SHIFT + L` | Move right | +| Key | Action | +|---|---| +| `Super+1โ€ฆ9` | Go to `1โ€ฆ9` | +| `Alt+1โ€ฆ8` | Move to `1โ€ฆ8` | -### ๐Ÿ—‚๏ธ Workspaces - -**Switch** - -| Keybinding | Action | -| -------------- | ------------- | -| `SUPER + 1..9` | Workspace 1โ€“9 | - -**Move** +## Special WS -| Keybinding | Action | -| ------------ | ------------------- | -| `ALT + 1..8` | Move to workspace | - ---- - -### ๐Ÿงช Special Workspaces - -| Keybinding | Action | -| ------------------- | ----------------- | -| `SUPER + O` | Toggle scratchy | -| `SUPER + M` | Toggle aux | -| `SUPER + SHIFT + O` | Move to scratchy | -| `SUPER + SHIFT + M` | Move to aux | - ---- - -### โš™๏ธ Programs - -| Keybinding | Action | -| ------------------- | ------------- | -| `SUPER + Z` | Mute (Mumble) | -| `SUPER + SHIFT + Z` | Deaf (Mumble) | -| `SUPER + .` | Emoji picker | - ---- - -### ๐Ÿ–ฑ๏ธ Mouse - -| Keybinding | Action | -| --------------------- | ------------- | -| `SUPER + Left Click` | Move window | -| `SUPER + Right Click` | Resize window | +| Key | Action | +|---|---| +| `Super+O` | Toggle `scratchy` | +| `Super+M` | Toggle `aux` | +| `Super+Shift+O` | Move to `scratchy` | +| `Super+Shift+M` | Move to `aux` | ---- +## Programs -### ๐Ÿ“ Resize Mode +| Key | Action | +|---|---| +| `Super+Z` | Mumble mute | +| `Super+Shift+Z` | Mumble deaf | -`SUPER + R` +## Resize Mode -| Keybinding | Action | -| ----------------- | ----------- | -| `H / J / K / L` | Resize big | -| `SHIFT + H/J/K/L` | Resize fine | -| `ENTER / ESC` | Exit | +Enter: `Super+R` ---- +| Key | Action | +|---|---| +| `H` / `J` | โˆ’/+ width | +| `K` / `L` | โˆ’/+ height | +| `Shift+H/J/K/L` | Small resize | +| `Enter` / `Esc` | Exit | -### ๐Ÿงฉ Window Mode +## Window Mode -`SUPER + Z` +Enter: `Super+Z` | Key | Action | -| --- | ------ | -| Q | WS 1 | -| W | WS 2 | -| E | WS 3 | -| R | WS 4 | - -**Firefox** +|---|---| +| `Q` / `W` | Move to WS `1` / `2` | +| `E` / `R` | Move to WS `3` / `4` | +| `B` | Firefox here | +| `Shift+B` | Firefox โ†’ WS `3` | +| `Enter` / `Esc` | Exit | -| Keybinding | Action | -| ----------- | -------------- | -| `B` | Move Firefox | -| `SHIFT + B` | Silent to WS 3 | - -Exit: `ENTER / ESC` +> `Super+Z` also toggles Mumble mute.
- ---- - -## โ„น๏ธ Notes - -- `SUPER` = Windows key -- Vim-style navigation (`H/J/K/L`) -- Submaps behave like modal layers From 07169f9048a3be639bbc595ef1c67e63460fcdfd Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 27 Apr 2026 00:15:55 +0200 Subject: [PATCH 66/81] Update docs and keybinds --- docs/hyprland.md | 35 ++++++++------------- modules/home/desktops/hyprland/keybinds.nix | 2 +- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/docs/hyprland.md b/docs/hyprland.md index 5fc4772..786eb2a 100644 --- a/docs/hyprland.md +++ b/docs/hyprland.md @@ -3,7 +3,7 @@ General docs for hyprland. ## Keymap - +
@@ -13,7 +13,7 @@ General docs for hyprland. |---|---| | `Super+Enter` | Terminal | | `Super+E` | Launcher | -| `Super+P` | Logout menu | +| `Super+P` | Logout | | `Super+Q` | Kill window | | `Super+N` | Notifications | | `Super+.` | Emoji picker | @@ -33,33 +33,27 @@ General docs for hyprland. | Key | Action | |---|---| -| `Super+H` | Focus left | -| `Super+J` | Focus down | -| `Super+K` | Focus up | -| `Super+L` | Focus right | -| `Super+Shift+H` | Move left | -| `Super+Shift+J` | Move down | -| `Super+Shift+K` | Move up | -| `Super+Shift+L` | Move right | +| `Super+H/J/K/L` | Focus window L/D/U/R | +| `Super+Shift+H/J/K/L` | Move window L/D/U/R | ## Workspaces | Key | Action | |---|---| -| `Super+1โ€ฆ9` | Go to `1โ€ฆ9` | -| `Alt+1โ€ฆ8` | Move to `1โ€ฆ8` | +| `Super+1โ€ฆ9` | Go `1โ€ฆ9` | +| `Alt+1โ€ฆ8` | Move `1โ€ฆ8` | -## Special WS +## Special Workspaces | Key | Action | |---|---| | `Super+O` | Toggle `scratchy` | | `Super+M` | Toggle `aux` | -| `Super+Shift+O` | Move to `scratchy` | -| `Super+Shift+M` | Move to `aux` | +| `Super+Shift+O` | Move `scratchy` | +| `Super+Shift+M` | Move `aux` | ## Programs @@ -67,6 +61,7 @@ General docs for hyprland. |---|---| | `Super+Z` | Mumble mute | | `Super+Shift+Z` | Mumble deaf | +| `Super+.` | Emoji picker | ## Resize Mode @@ -74,25 +69,21 @@ Enter: `Super+R` | Key | Action | |---|---| -| `H` / `J` | โˆ’/+ width | -| `K` / `L` | โˆ’/+ height | +| `H/J/K/L` | Resize | | `Shift+H/J/K/L` | Small resize | | `Enter` / `Esc` | Exit | ## Window Mode -Enter: `Super+Z` +Enter: `Super+W` | Key | Action | |---|---| -| `Q` / `W` | Move to WS `1` / `2` | -| `E` / `R` | Move to WS `3` / `4` | +| `Q/W/E/R` | Move โ†’ WS `1โ€“4` | | `B` | Firefox here | | `Shift+B` | Firefox โ†’ WS `3` | | `Enter` / `Esc` | Exit | -> `Super+Z` also toggles Mumble mute. -
diff --git a/modules/home/desktops/hyprland/keybinds.nix b/modules/home/desktops/hyprland/keybinds.nix index c25f1b9..eeeaffc 100644 --- a/modules/home/desktops/hyprland/keybinds.nix +++ b/modules/home/desktops/hyprland/keybinds.nix @@ -100,7 +100,7 @@ in # Window mode - bind = SUPER, Z, submap, windows + bind = SUPER, W, submap, windows submap = windows bind = , Q, movetoworkspace, 1 From 1a1e2af9391c411439affc32d585d7f97a42f6e4 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 27 Apr 2026 00:24:21 +0200 Subject: [PATCH 67/81] lel --- docs/hyprland.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hyprland.md b/docs/hyprland.md index 786eb2a..c7afc9e 100644 --- a/docs/hyprland.md +++ b/docs/hyprland.md @@ -46,7 +46,7 @@ General docs for hyprland. -## Special Workspaces +## Special Workspaces -#- | Key | Action | |---|---| From 5f267636e2100b35ddab943b48754169d2fef8d5 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 27 Apr 2026 00:26:54 +0200 Subject: [PATCH 68/81] up --- docs/hyprland.md | 24 +++++++++---------- .../home/desktops/addons/waybar/waybar.css | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/hyprland.md b/docs/hyprland.md index c7afc9e..d1c78e3 100644 --- a/docs/hyprland.md +++ b/docs/hyprland.md @@ -13,18 +13,18 @@ General docs for hyprland. |---|---| | `Super+Enter` | Terminal | | `Super+E` | Launcher | -| `Super+P` | Logout | -| `Super+Q` | Kill window | -| `Super+N` | Notifications | +| `Super+P` | Wlogout | +| `Super+Q` | Kill active | +| `Super+N` | Notification Center | | `Super+.` | Emoji picker | ## Window | Key | Action | |---|---| -| `Super+F` | Fullscreen `1` | -| `Super+Shift+F` | Fullscreen | -| `Super+U` | Floating | +| `Super+F` | Fullscreen | +| `Super+Shift+F` | Full-Fullscreen | +| `Super+U` | Toggle floating | | `Super+T` | Toggle split | | `Super+Mouse1` | Move | | `Super+Mouse2` | Resize | @@ -46,14 +46,14 @@ General docs for hyprland. -## Special Workspaces -#- +## Special Workspaces | Key | Action | |---|---| | `Super+O` | Toggle `scratchy` | | `Super+M` | Toggle `aux` | -| `Super+Shift+O` | Move `scratchy` | -| `Super+Shift+M` | Move `aux` | +| `Super+Shift+O` | Move active to `scratchy` | +| `Super+Shift+M` | Move active to `aux` | ## Programs @@ -79,9 +79,9 @@ Enter: `Super+W` | Key | Action | |---|---| -| `Q/W/E/R` | Move โ†’ WS `1โ€“4` | -| `B` | Firefox here | -| `Shift+B` | Firefox โ†’ WS `3` | +| `Q/W/E/R` | Move window to workspace | +| `B` | Get firefox | +| `Shift+B` | Send firefox back to `3` | | `Enter` / `Esc` | Exit | diff --git a/modules/home/desktops/addons/waybar/waybar.css b/modules/home/desktops/addons/waybar/waybar.css index 1869d05..fa98e9c 100644 --- a/modules/home/desktops/addons/waybar/waybar.css +++ b/modules/home/desktops/addons/waybar/waybar.css @@ -40,7 +40,7 @@ window#waybar.hidden { padding: 6px 12px; background-color: #1e1e2e; color: #cdd6f4; - margin-right: 40px; + margin-left: 140px; } #workspaces button:nth-child(1) { From 5a847113bc5c8a9c4cf05d6362bdc31fc0f00ecc Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Mon, 27 Apr 2026 00:58:52 +0200 Subject: [PATCH 69/81] set autostart option --- hosts/firefly/home.nix | 6 ++++++ hosts/zion/home.nix | 5 +++++ modules/home/desktops/hyprland/default.nix | 7 ++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index a05eaad..146841b 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -31,6 +31,12 @@ enable = true; cmd = "/usr/bin/swaylock"; }; + autostart = [ + "mumble" + "firefox" + "chromium" + "ddcutil --display 2 setvcp 60 0x06" # Focus secondary display + ]; }; }; diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix index 41d1714..1912ee8 100644 --- a/hosts/zion/home.nix +++ b/hosts/zion/home.nix @@ -25,6 +25,11 @@ enable = true; cmd = "${pkgs.hyprlock}/bin/hyprlock"; }; + autostart = [ + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # Needed for thunar + "firefox" + "ddcutil --display 2 setvcp 60 0x09" # Focus secondary display + ]; }; }; diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index c5bd97f..b009d77 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -19,6 +19,8 @@ in nullable = true; }; + autostart = mkOpt (listOf str) "autostart"; + hyprlock = { enable = mkEnableOption "Enable hyprlock"; }; @@ -103,10 +105,9 @@ in # Autostart exec-once = [ - # TODO: could be a home.nix setting - "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # Needed for thunar "[ workspace special:scratchy silent ] alacritty -t scratchy" - ]; + ] + ++ cfg.autostart; windowrule = [ "match:class ^(firefox)$, workspace 3" From 78a8b2bf9aed6a6c505cd288958b0a9a9d271c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20Gr=C3=B6mmer?= <38243306+RAPSNX@users.noreply.github.com> Date: Wed, 29 Apr 2026 03:07:28 +0200 Subject: [PATCH 70/81] Apply suggestion from @RAPSNX --- dev-shells.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/dev-shells.nix b/dev-shells.nix index c90f471..dfdfb2e 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -33,9 +33,6 @@ in nh switch-firefly switch-zion - - hello - statix deadnix nixfmt From 83132ed58594d60d9afdff71baa0e4bc93bbcf21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20Gr=C3=B6mmer?= <38243306+RAPSNX@users.noreply.github.com> Date: Wed, 29 Apr 2026 03:20:35 +0200 Subject: [PATCH 71/81] Update modules/home/cli/tools/custom/shell-scripts.nix --- modules/home/cli/tools/custom/shell-scripts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/cli/tools/custom/shell-scripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix index 09b9418..5121259 100644 --- a/modules/home/cli/tools/custom/shell-scripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -14,7 +14,7 @@ let BASE_PATH=$HOME/.config/kubeconfigs YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') KUBECONFIG=$(fzf <<<"$YAMLS") - export KUBECONFIG=$BASE_PATH/$KUBECONFIG + printf 'export KUBECONFIG=%q\n' "$BASE_PATH/$KUBECONFIG" ''; in { From 3e3ec8b6b55ddc6d38526174c2cfab040048f436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raphael=20Gr=C3=B6mmer?= <38243306+RAPSNX@users.noreply.github.com> Date: Wed, 29 Apr 2026 03:24:17 +0200 Subject: [PATCH 72/81] Apply suggestion from @RAPSNX --- hosts/firefly/home.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 146841b..9ea3e74 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -56,8 +56,6 @@ stackit-cli openstackclient-full vault-bin - - # Tools(inputs.import-tree.match ".*/default\\.nix" ./modules/home) brightnessctl ]; From e31764fe5c6b9b72997e4710320e4d755af4e486 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 29 Apr 2026 02:37:40 +0200 Subject: [PATCH 73/81] Add todoist as app --- docs/bootstrap.md | 9 +++++++++ hosts/firefly/home.nix | 3 +-- modules/home/browsers/chromium/default.nix | 1 - modules/home/desktops/hyprland/default.nix | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 docs/bootstrap.md diff --git a/docs/bootstrap.md b/docs/bootstrap.md new file mode 100644 index 0000000..92c716d --- /dev/null +++ b/docs/bootstrap.md @@ -0,0 +1,9 @@ +# Bootstrapping + +## General +### PWAs +Manually installed `PWAs` in `Chromium`: +- todoist + +## Firefly +Look into [./firefly.md](Firefly bootstrap) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 9ea3e74..1845e9f 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -32,10 +32,9 @@ cmd = "/usr/bin/swaylock"; }; autostart = [ - "mumble" + "sleep 3 && mumble" # Need to sleep for tray icon "firefox" "chromium" - "ddcutil --display 2 setvcp 60 0x06" # Focus secondary display ]; }; }; diff --git a/modules/home/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix index e34e706..3c1c5c3 100644 --- a/modules/home/browsers/chromium/default.nix +++ b/modules/home/browsers/chromium/default.nix @@ -12,5 +12,4 @@ "--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo" ]; }; - } diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index b009d77..e3ea91b 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -106,6 +106,8 @@ in # Autostart exec-once = [ "[ workspace special:scratchy silent ] alacritty -t scratchy" + + "[ workspace special:aux silent ] sleep 2 && chromium --profile-directory=Default --app-id=dlgohinmglaoopaiplliaecdpmnepmga" ] ++ cfg.autostart; From 758169a53a3a4e24ca78b2563d7ce1decf2b49c8 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 29 Apr 2026 21:41:50 +0200 Subject: [PATCH 74/81] Add wip for niri --- modules/home/desktops/niri/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/desktops/niri/default.nix b/modules/home/desktops/niri/default.nix index ecc244a..15fa378 100644 --- a/modules/home/desktops/niri/default.nix +++ b/modules/home/desktops/niri/default.nix @@ -17,6 +17,8 @@ in }; config = lib.mkIf cfg.enable { + # TODO: WIP - Niri is currently in a trial phase. + # This config needs to be updated in a seperate PR, when niri got evaluated. programs.niri = { enable = true; @@ -51,8 +53,6 @@ in y = 0; }; }; - "DP-1" = { - }; }; workspaces = { From 109897020da0e5a654a01f51c4afadf70f0c303c Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 29 Apr 2026 21:48:01 +0200 Subject: [PATCH 75/81] Remove sops --- .sops.yaml | 16 ---------------- flake.nix | 6 ------ hosts/kubex/default.nix | 10 ---------- hosts/kubex/secrets.yaml | 25 ------------------------- modules/home/secrets.yaml | 25 ------------------------- modules/home/services/default.nix | 1 - modules/home/services/sops.nix | 7 ------- modules/nixos/services/default.nix | 1 - modules/nixos/services/sops.nix | 19 ------------------- 9 files changed, 110 deletions(-) delete mode 100644 .sops.yaml delete mode 100644 hosts/kubex/secrets.yaml delete mode 100644 modules/home/secrets.yaml delete mode 100644 modules/home/services/sops.nix delete mode 100644 modules/nixos/services/sops.nix diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index 9cd643e..0000000 --- a/.sops.yaml +++ /dev/null @@ -1,16 +0,0 @@ -keys: - users: - - &rap_zion age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf - - &kubex age1qmfyk82lve992tvzw82d4dgr3ek77xx9m7uez3uq55mgqu6r5eys40evkr - - &firefly age13ps3kkzfn3eyaqc50reudytr5ws80ssamzh09kj6878a6lgxususuu58wp -creation_rules: - - path_regex: modules/home/secrets.yaml$ - key_groups: - - age: - - *rap_zion - - *firefly - - path_regex: hosts/kubex/secrets.yaml$ - key_groups: - - age: - - *kubex - - *rap_zion diff --git a/flake.nix b/flake.nix index 27ab1e1..88b6614 100644 --- a/flake.nix +++ b/flake.nix @@ -18,10 +18,6 @@ url = "github:brumhard/krewfile"; inputs.nixpkgs.follows = "nixpkgs"; }; - sops-nix = { - url = "github:mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; @@ -79,7 +75,6 @@ nixosModules = [ inputs.catppuccin.nixosModules.catppuccin - inputs.sops-nix.nixosModules.sops inputs.niri.nixosModules.niri (inputs.import-tree.match ".*/default\\.nix" ./modules/nixos) ./modules/nix.nix @@ -89,7 +84,6 @@ inputs.catppuccin.homeModules.catppuccin inputs.neonix.homeManagerModules.neonix inputs.krewfile.homeManagerModules.krewfile - inputs.sops-nix.homeManagerModules.sops inputs.niri.homeModules.niri (inputs.import-tree.match ".*/default\\.nix" ./modules/home) ./modules/nix.nix diff --git a/hosts/kubex/default.nix b/hosts/kubex/default.nix index 9b27dfc..fc3c4c0 100644 --- a/hosts/kubex/default.nix +++ b/hosts/kubex/default.nix @@ -31,16 +31,6 @@ roles = { k3s = true; }; - services = { - sops = true; - }; - }; - - sops.secrets.ssh_config = { - sopsFile = ./secrets.yaml; - path = "/home/kubex/.ssh/config"; - mode = "600"; - owner = "kubex"; }; networking = { diff --git a/hosts/kubex/secrets.yaml b/hosts/kubex/secrets.yaml deleted file mode 100644 index b5ed1ca..0000000 --- a/hosts/kubex/secrets.yaml +++ /dev/null @@ -1,25 +0,0 @@ -ssh_config: ENC[AES256_GCM,data:64xDEb/HxlPDoStyhWRXB5n3SBT1EgRMJ4nqZcXq2d9sCfkiUA2v0riKHMKLRKyU96rJSTB84LwNMhMRsU1GI784cINReyZfqDVSdum7InSZ1xQjSK32V5qfODU+c2smz0/59ExseDjYv8ccPNfVX5PRyv2ssM8A28Fa/XF13F4aid1hBu82x+RwssG+xISPk9EPsA5L7UvvQJHuT+M8Hq6gby2yi1mL6MTy/HSxGy6jWaYJsZ134yAyyi2xnoYpPrzQyTNkJKDaI1pMnY1Qf3tLT9igcQ7+d5dxM7ffMtVI/XvZxtLQzxTjJcU=,iv:Oo3M9iGmylQ3L5U7ClbDYH8QIVgXfjr7q5iAQ0MAYlg=,tag:Ac/iK+JFMOZaIWiMhQswbw==,type:str] -sops: - age: - - recipient: age1qmfyk82lve992tvzw82d4dgr3ek77xx9m7uez3uq55mgqu6r5eys40evkr - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB1Y3NSbWFHVjMwd3FmVFA2 - OGNzaWZEc3FWdzh5bjJuU1Q4UDhubHB3VGtnCmxMd2lsQkFOM0FsVG5rN3Y4TkM4 - NGZUbndZNldLWGhJcVQ0TGZnejk2cjAKLS0tIGtMMUw5dWdqK29jMXo4bTRzU0lD - ZS92UjhLSGFxTElGN0UvQ3FhSFU4NWcK6oiKj+dXZubGSFoaxTZT1xmgcFbJq0Fi - nSjsj44mPB1TSiPyQmujMdZlT4IBX6lmDXV7KR0zC0E7CprLNxaDRQ== - -----END AGE ENCRYPTED FILE----- - - recipient: age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCZ0wzZmM0ZS9xRTh3NUhK - Wk5FOTlvazd6cUhPSW1EQ05ZSDB3c3g1L2gwCmUrUk5NNmhLazNwSnFUS2VxTUpa - RlE2aFZuMWVqTmZwTkFyVGhqUkZ4SmsKLS0tIHB0Z0lhQTBkdkFKMDhuam1iaWxF - djVYN0ZzOU0vQmg2UDF3MUNHV3pLcUEKrbgYGtMzqWJ5TMyGbiE/VjBx3thLX8j4 - EOgpqO9B9VhvvA7kYxyUAbmNH+QJ0IUWrVPJPQdhMQzwTXifhbLtLg== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-02-05T23:32:13Z" - mac: ENC[AES256_GCM,data:c2g2+Micq8h9nhYuIO7P7c8+Bgu3rU8JyI5CzPUUJZKS6LyvhuL7siaIBLyB2FxcoBP4WDdBBKr9mLUATagAoBVGHGsO9Q1v/ksCei1OoU4zoUBgNKuZEGrlvB7TU4pAM6fv+6OiFbY/Ts4hOj41P+bbBi06ZyW2D6ligCHMIYw=,iv:raR6SbqP2tLKbWUkgqrD5Un7BhuN9jsHMa4OmlMJ1Rg=,tag:CwZytmB85tCMkOats25wEQ==,type:str] - unencrypted_suffix: _unencrypted - version: 3.11.0 diff --git a/modules/home/secrets.yaml b/modules/home/secrets.yaml deleted file mode 100644 index d39b23e..0000000 --- a/modules/home/secrets.yaml +++ /dev/null @@ -1,25 +0,0 @@ -ssh_config: ENC[AES256_GCM,data:FSxU3PQPan52dZuZeWORY8QEZU1uJt8xrua48lu4qNlmRd7j/rJHLeKDPNIgdOPxEGspxn/OVW9pt5N6h1LDe5CAT2fdxB8ij7LK7u8ZEWqCt02bqr/tLFSpxRcGvM0DHsQPozfaldav6UszbARqPCRTAdQSP+2UHVTc3G734SR0xoXv0W5y+iB1b17y8YvkHovNDfFe+I9ctslbJxxp7MllnrAbkvZLxxfna9ZCy+KpHcaDnkQouQZ6GyfNCffEoA0MxaQkOtyA+JUpcFkFuDKARe+w3OTex5LWlieNIDkfSDIGqFqUJDLtg4ldYJgo9x6y2kDYFZjzKNidxZ8RHr70MaZSyghfkYHNsx5sf1zcO6IOIzX/FAsPY4RjrgiUAx8efQ34jxYK7bNkHhKQL+wNUZyuP6c0rYOPZdeHvb2oPHagyxyJ80VsFrZylXH5MzTU/TDfDyTAHw7nwpvXe7465/+E0BadxsEnts/TxmpBnJass6zdOQmt9BJgx4fggFnxhN3J+WRKlUFqILRN4bIf2gWXuL7TtWOi4WTC+bVHtoV6XVfWa1aXKsEhr/Rut37nzsPZJIRQdQl8PTANdH3haVb2Dbr8EBsTLnRzdunG7BSZqrHS3NlgMIvCd5V3tr2i8K4+naQ1Pf6HX5WBA722iVkmFCOH8ylRHosLpZT5WmIAxgIB9nmrmia6kNd+29dGy7P8QAhu7+QFyCsqrwhJuTWNDIzuM3BHle4nJ/si2R+HLKUhU1B74VGR7WTsBZC9NdUMBrstOFnHAMfeobkL1TrZHoU5DaPDu4Q=,iv:gDbgOr7AoJBZnwEk4NUTtBIIfgrccyApY97qUDAbBkU=,tag:dPJQ3MYC9xmvcUxKcqqjRA==,type:str] -sops: - age: - - recipient: age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTcFF4SHFrUHhXS0xNaTJh - TXM3Q01INjF3dXAwT09rTlBFZnFyVHlleUZJCmhaZ1V6UkJvTWVNQVR3WjRoeHRv - KzlsVEo1RzNoUEJ4aWNONmx0SEZFTFUKLS0tIEJXZGNZcnJ2YXl2Q2swK2w1bDhP - Skc2TTZjUExCbVNpTnczbXB2WGxQVnMKaHNV5OjS1ODvot1yG+AY85T61YxnxIMk - FYP+uxfm5mCs0M2hJx3nfMOZA4vH6Q9nGNZSX4q0nWxq88L5KpaAsg== - -----END AGE ENCRYPTED FILE----- - - recipient: age13ps3kkzfn3eyaqc50reudytr5ws80ssamzh09kj6878a6lgxususuu58wp - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGNVdaUXgweDk3YWVnS2xC - L1FVWkVnVjduOU1pWTdzanQvb2dNd3pCeG5jCmh6ZUhRY1hUSmpvdkdGc3JDNC9m - RE5YdS9CaU4vSG82Z052UFBHeEgvVEUKLS0tIERqWG5EMGlVNmZHQm9ncjljekE0 - bURQd1VuZ1VRYnhVNEJGY21BdFNOdncKLArYp3z6H2gu8ZP/+LxXu4bd0wEFQO+6 - m33V0qCP/EDkyXgTj07+8M2B/z75Kx2+b1FFCi/dN0aF/jpVYdwdWQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-02-05T22:54:02Z" - mac: ENC[AES256_GCM,data:8nBJ0RzeKWEOj+b5PKThmkOX9MrGZf91qG8Q3wJTn2UCZwcoVpy5lSwspZqJ2M5I7TwYe62BtQ9R0PMDBLKkyvVt68NDJQS0ky+rUQCXjkRivmgDDOcvppJ/6THQTJWQc+0PbqVY3eNMyNz14oMfc6bPSmjYmqQ7FzWNK+/57JU=,iv:u/kRVihG0L7JV+Iqal6sHd0RtkTBafPFS1cPMgJ8k7A=,tag:TK6J1d++P9iy8BBsdoYq9g==,type:str] - unencrypted_suffix: _unencrypted - version: 3.11.0 diff --git a/modules/home/services/default.nix b/modules/home/services/default.nix index 099be71..a699bd6 100644 --- a/modules/home/services/default.nix +++ b/modules/home/services/default.nix @@ -1,7 +1,6 @@ { imports = [ ./ssh.nix - ./sops.nix ./tray.nix ./keyring.nix ./nextcloud.nix diff --git a/modules/home/services/sops.nix b/modules/home/services/sops.nix deleted file mode 100644 index bab81c7..0000000 --- a/modules/home/services/sops.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, ... }: -{ - sops.age = { - generateKey = true; - keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; - }; -} diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 444551a..3f00e11 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -7,6 +7,5 @@ ./tailscale.nix ./printer.nix ./bluetooth.nix - ./sops.nix ]; } diff --git a/modules/nixos/services/sops.nix b/modules/nixos/services/sops.nix deleted file mode 100644 index bd44b5c..0000000 --- a/modules/nixos/services/sops.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - config, - ... -}: -with lib; -let - cfg = config.hostConfig.services.sops; -in -{ - options.hostConfig.services.sops = mkEnableOption "Enable tailscaled."; - - config = mkIf cfg { - sops.age = { - generateKey = true; - keyFile = "/home/${config.hostConfig.user.name}/.config/sops/age/keys.txt"; - }; - }; -} From a54f4c8f34d1d56e14b95b06f165fb1b02a460b0 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Wed, 29 Apr 2026 21:53:50 +0200 Subject: [PATCH 76/81] Flake lock --- flake.lock | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 7fb1ce4..fc60051 100644 --- a/flake.lock +++ b/flake.lock @@ -922,28 +922,7 @@ "niri": "niri", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", - "pre-commit-hooks": "pre-commit-hooks_3", - "sops-nix": "sops-nix" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1776119890, - "narHash": "sha256-Zm6bxLNnEOYuS/SzrAGsYuXSwk3cbkRQZY0fJnk8a5M=", - "owner": "mic92", - "repo": "sops-nix", - "rev": "d4971dd58c6627bfee52a1ad4237637c0a2fb0cd", - "type": "github" - }, - "original": { - "owner": "mic92", - "repo": "sops-nix", - "type": "github" + "pre-commit-hooks": "pre-commit-hooks_3" } }, "systems": { From 6fd5e11c1d3e480f196fbefa579c175345846fb3 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 30 Apr 2026 00:24:22 +0200 Subject: [PATCH 77/81] remove unneeded option --- modules/home/common/roles.nix | 5 ----- modules/nixos/system/env.nix | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix index b0b355a..839b587 100644 --- a/modules/home/common/roles.nix +++ b/modules/home/common/roles.nix @@ -14,11 +14,6 @@ with types; email = mkOpt str "Email address of the user."; apparmor-gen = mkOpt' (listOf package) [ ] "List of packages to create apparmor rule for userns."; - - desktop.monitors = { - main = mkOpt str "Identifier of main monitor."; - left = mkOpt str "Identifier of left monitor."; - }; }; config = diff --git a/modules/nixos/system/env.nix b/modules/nixos/system/env.nix index 13f48c9..c6cba2f 100644 --- a/modules/nixos/system/env.nix +++ b/modules/nixos/system/env.nix @@ -30,6 +30,7 @@ p7zip gnumake ] + # TODO: wtf? ++ lib.optionals (!config.hostConfig.roles.desktop) [ inputs.neonix.packages.${pkgs.stdenv.hostPlatform.system}.mini jq From ceb88d8e98fefc83a7f629fd06ee3b62406929da Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 30 Apr 2026 00:46:42 +0200 Subject: [PATCH 78/81] WIP: reduce the ammount of with useage --- .gitignore | 1 + dev-shells.nix | 26 +++++++------- flake.nix | 13 ++++--- lib/default.nix | 5 ++- modules/home/cli/shells/zsh/default.nix | 19 +++++------ modules/home/cli/tools/git/default.nix | 3 +- modules/home/common/roles.nix | 15 ++++---- .../desktops/hyprland/addons/hypridle.nix | 3 +- .../desktops/hyprland/addons/hyprlock.nix | 3 +- modules/home/desktops/hyprland/default.nix | 19 +++++------ modules/home/desktops/niri/default.nix | 34 ++++++++----------- modules/nixos/roles/desktop/explorer.nix | 5 ++- modules/nixos/roles/desktop/fonts.nix | 3 +- modules/nixos/roles/desktop/hyprland.nix | 3 +- modules/nixos/roles/desktop/power.nix | 3 +- modules/nixos/roles/gaming/default.nix | 5 ++- modules/nixos/roles/k3s/default.nix | 5 ++- modules/nixos/roles/k3s/network.nix | 3 +- modules/nixos/roles/k3s/service.nix | 3 +- modules/nixos/services/bluetooth.nix | 5 ++- modules/nixos/services/opengl.nix | 5 ++- modules/nixos/services/podman.nix | 5 ++- modules/nixos/services/printer.nix | 5 ++- modules/nixos/services/sound.nix | 5 ++- modules/nixos/services/tailscale.nix | 5 ++- modules/nixos/system/boot.nix | 13 ++++--- modules/nixos/system/user.nix | 16 ++++----- 27 files changed, 98 insertions(+), 132 deletions(-) diff --git a/.gitignore b/.gitignore index a4abc69..5989bf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .direnv result .pre-commit-config.yaml +/.codex diff --git a/dev-shells.nix b/dev-shells.nix index dfdfb2e..a0f1016 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -24,19 +24,17 @@ let ''; in { - default = - with pkgs; - mkShell { - inherit (pre-commit-check) shellHook; + default = pkgs.mkShell { + inherit (pre-commit-check) shellHook; - packages = [ - nh - switch-firefly - switch-zion - statix - deadnix - nixfmt - nix-inspect - ]; - }; + packages = with pkgs; [ + nh + switch-firefly + switch-zion + statix + deadnix + nixfmt + nix-inspect + ]; + }; } diff --git a/flake.nix b/flake.nix index 88b6614..0ebaf25 100644 --- a/flake.nix +++ b/flake.nix @@ -89,7 +89,6 @@ ./modules/nix.nix ]; in - with lib; { inherit lib; @@ -100,25 +99,25 @@ nixosConfigurations = { # Main workstation - zion = nixosSystem { + zion = lib.nixosSystem { modules = nixosModules ++ [ ./hosts/zion ]; specialArgs = { inherit inputs mylib; }; }; # K3S home-lab - kubex = nixosSystem { + kubex = lib.nixosSystem { modules = nixosModules ++ [ ./hosts/kubex ]; specialArgs = { inherit inputs mylib; }; }; # Raspberry-pi 3 - nixberry = nixosSystem { + nixberry = lib.nixosSystem { modules = nixosModules ++ [ ./hosts/nixberry ]; specialArgs = { inherit inputs mylib; }; }; # ISO multi-tool - vinox = nixosSystem { + vinox = lib.nixosSystem { modules = nixosModules ++ [ ./hosts/vinox ]; specialArgs = { inherit inputs mylib; }; }; @@ -126,14 +125,14 @@ homeConfigurations = { # Main workstation - "rap@zion" = homeManagerConfiguration { + "rap@zion" = lib.homeManagerConfiguration { modules = homeModules ++ [ ./hosts/zion/home.nix ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs self mylib; }; }; # Firefly workmachine - "nix@firefly" = homeManagerConfiguration { + "nix@firefly" = lib.homeManagerConfiguration { modules = homeModules ++ [ ./hosts/firefly/home.nix ]; pkgs = pkgsFor.x86_64-linux; extraSpecialArgs = { inherit inputs self mylib; }; diff --git a/lib/default.nix b/lib/default.nix index 728ab97..831c1f5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,10 +1,9 @@ { lib }: -with lib; { - mkOpt = type: description: mkOption { inherit type description; }; + mkOpt = type: description: lib.mkOption { inherit type description; }; mkOpt' = type: default: description: - mkOption { inherit type default description; }; + lib.mkOption { inherit type default description; }; } diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix index 95afb63..452dc24 100644 --- a/modules/home/cli/shells/zsh/default.nix +++ b/modules/home/cli/shells/zsh/default.nix @@ -5,11 +5,8 @@ config, ... }: -with lib; -with mylib; -with types; { - options.roles.cli.zsh.zshrc = mkOpt' str "" "Extra content for zshrc"; + options.roles.cli.zsh.zshrc = mylib.mkOpt' lib.types.str "" "Extra content for zshrc"; config = { home.packages = [ pkgs.zsh-completions ]; @@ -43,13 +40,13 @@ with types; share = true; }; - initContent = mkMerge [ - (mkOrder 500 "") - (mkOrder 1000 '' + initContent = lib.mkMerge [ + (lib.mkOrder 500 "") + (lib.mkOrder 1000 '' export GOPATH=$(go env GOPATH) ${config.roles.cli.zsh.zshrc} '') - (mkOrder 1500 "") + (lib.mkOrder 1500 "") ]; shellAliases = { @@ -86,10 +83,10 @@ with types; ]; }; - plugins = with pkgs; [ + plugins = [ { name = "zsh-autopair"; - src = fetchFromGitHub { + src = pkgs.fetchFromGitHub { owner = "hlissner"; repo = "zsh-autopair"; rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; @@ -100,7 +97,7 @@ with types; { name = "zsh-nix-shell"; file = "nix-shell.plugin.zsh"; - src = "${zsh-nix-shell}/share/zsh-nix-shell"; + src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell"; } ]; }; diff --git a/modules/home/cli/tools/git/default.nix b/modules/home/cli/tools/git/default.nix index 50bcdc0..490ddf4 100644 --- a/modules/home/cli/tools/git/default.nix +++ b/modules/home/cli/tools/git/default.nix @@ -25,9 +25,8 @@ done ''; in - with pkgs; [ - gh + pkgs.gh ghr-grep ]; diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix index 839b587..5bc2e33 100644 --- a/modules/home/common/roles.nix +++ b/modules/home/common/roles.nix @@ -5,15 +5,14 @@ config, ... }: -with lib; -with mylib; -with types; { options.roles = { - work = mkEnableOption "Device is used for work."; - email = mkOpt str "Email address of the user."; + work = lib.mkEnableOption "Device is used for work."; + email = mylib.mkOpt lib.types.str "Email address of the user."; - apparmor-gen = mkOpt' (listOf package) [ ] "List of packages to create apparmor rule for userns."; + apparmor-gen = + mylib.mkOpt' (lib.types.listOf lib.types.package) [ ] + "List of packages to create apparmor rule for userns."; }; config = @@ -30,12 +29,12 @@ with types; EOF ''; - apparmorProfilesGen = strings.concatStrings ( + apparmorProfilesGen = lib.strings.concatStrings ( (map (pkg: apparmorRuleGen pkg.pname (lib.getExe pkg)) config.roles.apparmor-gen) ++ [ "sudo systemctl reload apparmor" ] ); in - mkIf (config.roles.apparmor-gen != [ ]) { + lib.mkIf (config.roles.apparmor-gen != [ ]) { home.activation.apparmor-gen = lib.hm.dag.entryAfter [ "writeBoundary" ] '' run warnEcho "sudo ${pkgs.writeShellScript "apparmor-gen" apparmorProfilesGen}" ''; diff --git a/modules/home/desktops/hyprland/addons/hypridle.nix b/modules/home/desktops/hyprland/addons/hypridle.nix index 64e88e1..16c4cd2 100644 --- a/modules/home/desktops/hyprland/addons/hypridle.nix +++ b/modules/home/desktops/hyprland/addons/hypridle.nix @@ -3,12 +3,11 @@ config, ... }: -with lib; let cfg = config.roles.desktop.hyprland.hypridle; in { - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { services.hypridle = { enable = true; settings = { diff --git a/modules/home/desktops/hyprland/addons/hyprlock.nix b/modules/home/desktops/hyprland/addons/hyprlock.nix index 7936eff..aaefa21 100644 --- a/modules/home/desktops/hyprland/addons/hyprlock.nix +++ b/modules/home/desktops/hyprland/addons/hyprlock.nix @@ -4,12 +4,11 @@ pkgs, ... }: -with lib; let cfg = config.roles.desktop.hyprland.hyprlock; in { - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { programs.hyprlock = { enable = true; package = pkgs.hyprlock; diff --git a/modules/home/desktops/hyprland/default.nix b/modules/home/desktops/hyprland/default.nix index e3ea91b..d50e4f6 100644 --- a/modules/home/desktops/hyprland/default.nix +++ b/modules/home/desktops/hyprland/default.nix @@ -5,29 +5,26 @@ config, ... }: -with lib; -with mylib; -with pkgs; let cfg = config.roles.desktop.hyprland; in { - options.roles.desktop.hyprland = with types; { - enable = mkEnableOption "Enable hyprland"; + options.roles.desktop.hyprland = { + enable = lib.mkEnableOption "Enable hyprland"; - package = mkPackageOption pkgs "hyprland" { + package = lib.mkPackageOption pkgs "hyprland" { nullable = true; }; - autostart = mkOpt (listOf str) "autostart"; + autostart = mylib.mkOpt (lib.types.listOf lib.types.str) "autostart"; hyprlock = { - enable = mkEnableOption "Enable hyprlock"; + enable = lib.mkEnableOption "Enable hyprlock"; }; hypridle = { - enable = mkEnableOption "Enable hypridle"; - cmd = mkOpt str "Path to binary"; + enable = lib.mkEnableOption "Enable hypridle"; + cmd = mylib.mkOpt lib.types.str "Path to binary"; }; }; @@ -40,7 +37,7 @@ in config = lib.mkIf cfg.enable { - home.packages = [ + home.packages = with pkgs; [ hyprland-qtutils slurp rofimoji diff --git a/modules/home/desktops/niri/default.nix b/modules/home/desktops/niri/default.nix index 15fa378..90ad986 100644 --- a/modules/home/desktops/niri/default.nix +++ b/modules/home/desktops/niri/default.nix @@ -1,19 +1,15 @@ { - pkgs, lib, - mylib, config, ... }: -with lib; -with mylib; -with pkgs; let cfg = config.roles.desktop.niri; + actions = config.lib.niri.actions; in { options.roles.desktop.niri = { - enable = mkEnableOption "Enable hyprland"; + enable = lib.mkEnableOption "Enable hyprland"; }; config = lib.mkIf cfg.enable { @@ -106,29 +102,29 @@ in } ]; - binds = with config.lib.niri.actions; { + binds = { "Mod+Return".action.spawn = [ "alacritty" ]; "Mod+E".action.spawn = [ "fuzzel" ]; "Mod+P".action.spawn = [ "wlogout" ]; - "Mod+Q".action = close-window; - "Mod+F".action = fullscreen-window; + "Mod+Q".action = actions."close-window"; + "Mod+F".action = actions."fullscreen-window"; - "Mod+H".action = focus-column-or-monitor-left; - "Mod+L".action = focus-column-or-monitor-right; - "Mod+J".action = focus-window-or-workspace-down; - "Mod+K".action = focus-window-or-workspace-up; + "Mod+H".action = actions."focus-column-or-monitor-left"; + "Mod+L".action = actions."focus-column-or-monitor-right"; + "Mod+J".action = actions."focus-window-or-workspace-down"; + "Mod+K".action = actions."focus-window-or-workspace-up"; # Smart movement: move within monitor, then to adjacent monitor when at edge - "Mod+Shift+H".action = consume-or-expel-window-left; - "Mod+Shift+L".action = consume-or-expel-window-right; + "Mod+Shift+H".action = actions."consume-or-expel-window-left"; + "Mod+Shift+L".action = actions."consume-or-expel-window-right"; # then reorder inside the column (up/down) - "Mod+Shift+K".action = move-window-up; - "Mod+Shift+J".action = move-window-down; + "Mod+Shift+K".action = actions."move-window-up"; + "Mod+Shift+J".action = actions."move-window-down"; - "Mod+R".action = switch-preset-column-width; - "Mod+Shift+R".action = switch-preset-column-width-back; + "Mod+R".action = actions."switch-preset-column-width"; + "Mod+Shift+R".action = actions."switch-preset-column-width-back"; "Mod+1".action.focus-workspace = "term"; "Mod+2".action.focus-workspace = "code"; diff --git a/modules/nixos/roles/desktop/explorer.nix b/modules/nixos/roles/desktop/explorer.nix index 7fa7584..cbe1cab 100644 --- a/modules/nixos/roles/desktop/explorer.nix +++ b/modules/nixos/roles/desktop/explorer.nix @@ -4,14 +4,13 @@ pkgs, ... }: -with lib; let cfg = config.hostConfig.roles.desktop; in { - options.hostConfig.roles.desktop = mkEnableOption "Enable hyprland and desktop features."; + options.hostConfig.roles.desktop = lib.mkEnableOption "Enable hyprland and desktop features."; - config = mkIf cfg { + config = lib.mkIf cfg { programs = { thunar = { enable = true; diff --git a/modules/nixos/roles/desktop/fonts.nix b/modules/nixos/roles/desktop/fonts.nix index f56dad3..b593a33 100644 --- a/modules/nixos/roles/desktop/fonts.nix +++ b/modules/nixos/roles/desktop/fonts.nix @@ -4,12 +4,11 @@ pkgs, ... }: -with lib; let cfg = config.hostConfig.roles.desktop; in { - config = mkIf cfg { + config = lib.mkIf cfg { nixpkgs.config.joypixels.acceptLicense = true; fonts = { enableDefaultPackages = false; diff --git a/modules/nixos/roles/desktop/hyprland.nix b/modules/nixos/roles/desktop/hyprland.nix index 24cdc8d..c9d854f 100644 --- a/modules/nixos/roles/desktop/hyprland.nix +++ b/modules/nixos/roles/desktop/hyprland.nix @@ -4,12 +4,11 @@ pkgs, ... }: -with lib; let cfg = config.hostConfig.roles.desktop; in { - config = mkIf cfg { + config = lib.mkIf cfg { programs.hyprland = { enable = true; withUWSM = false; diff --git a/modules/nixos/roles/desktop/power.nix b/modules/nixos/roles/desktop/power.nix index 5bc26e9..f5712c8 100644 --- a/modules/nixos/roles/desktop/power.nix +++ b/modules/nixos/roles/desktop/power.nix @@ -3,12 +3,11 @@ config, ... }: -with lib; let cfg = config.hostConfig.roles.desktop; in { - config = mkIf cfg { + config = lib.mkIf cfg { powerManagement.enable = false; systemd.targets = { sleep.enable = false; diff --git a/modules/nixos/roles/gaming/default.nix b/modules/nixos/roles/gaming/default.nix index 7ca767f..37d5811 100644 --- a/modules/nixos/roles/gaming/default.nix +++ b/modules/nixos/roles/gaming/default.nix @@ -4,14 +4,13 @@ pkgs, ... }: -with lib; let cfg = config.hostConfig.roles.gaming; in { - options.hostConfig.roles.gaming = mkEnableOption "Enable NixOS gaming environment."; + options.hostConfig.roles.gaming = lib.mkEnableOption "Enable NixOS gaming environment."; - config = mkIf cfg { + config = lib.mkIf cfg { services.ratbagd.enable = true; # Daemon to configure gaming mice, GUI piper comes through HM. programs = { diff --git a/modules/nixos/roles/k3s/default.nix b/modules/nixos/roles/k3s/default.nix index b71a91c..0c9016d 100644 --- a/modules/nixos/roles/k3s/default.nix +++ b/modules/nixos/roles/k3s/default.nix @@ -4,7 +4,6 @@ config, ... }: -with lib; let cfg = config.hostConfig.roles.k3s; getConfig = pkgs.writeShellScriptBin "getConfig" '' @@ -19,9 +18,9 @@ in ./network.nix ]; - options.hostConfig.roles.k3s = mkEnableOption "Enable k3s cluster configuration."; + options.hostConfig.roles.k3s = lib.mkEnableOption "Enable k3s cluster configuration."; - config = mkIf cfg { + config = lib.mkIf cfg { environment = { shellAliases = { k = "kubectl"; diff --git a/modules/nixos/roles/k3s/network.nix b/modules/nixos/roles/k3s/network.nix index 11428e5..08193a6 100644 --- a/modules/nixos/roles/k3s/network.nix +++ b/modules/nixos/roles/k3s/network.nix @@ -3,12 +3,11 @@ lib, ... }: -with lib; let cfg = config.hostConfig.roles.k3s; in { - config = mkIf cfg { + config = lib.mkIf cfg { networking = { firewall.allowedTCPPorts = [ 6443 # k3s: required so that pods can reach the API server (running on port 6443 by default) diff --git a/modules/nixos/roles/k3s/service.nix b/modules/nixos/roles/k3s/service.nix index 0f35fd8..255c839 100644 --- a/modules/nixos/roles/k3s/service.nix +++ b/modules/nixos/roles/k3s/service.nix @@ -4,12 +4,11 @@ lib, ... }: -with lib; let cfg = config.hostConfig.roles.k3s; in { - config = mkIf cfg { + config = lib.mkIf cfg { services.k3s = { enable = true; role = "server"; diff --git a/modules/nixos/services/bluetooth.nix b/modules/nixos/services/bluetooth.nix index c540e21..f1890de 100644 --- a/modules/nixos/services/bluetooth.nix +++ b/modules/nixos/services/bluetooth.nix @@ -3,14 +3,13 @@ config, ... }: -with lib; let cfg = config.hostConfig.services.bluetooth; in { - options.hostConfig.services.bluetooth = mkEnableOption "Enable bluetooth features."; + options.hostConfig.services.bluetooth = lib.mkEnableOption "Enable bluetooth features."; - config = mkIf cfg { + config = lib.mkIf cfg { hardware.bluetooth.enable = true; services.blueman.enable = true; }; diff --git a/modules/nixos/services/opengl.nix b/modules/nixos/services/opengl.nix index 62ef024..76802ba 100644 --- a/modules/nixos/services/opengl.nix +++ b/modules/nixos/services/opengl.nix @@ -4,14 +4,13 @@ pkgs, ... }: -with lib; let cfg = config.hostConfig.services.opengl; in { - options.hostConfig.services.opengl = mkEnableOption "Enable opengl features."; + options.hostConfig.services.opengl = lib.mkEnableOption "Enable opengl features."; - config = mkIf cfg { + config = lib.mkIf cfg { hardware = { graphics = { enable = true; diff --git a/modules/nixos/services/podman.nix b/modules/nixos/services/podman.nix index 7cce22f..bc83557 100644 --- a/modules/nixos/services/podman.nix +++ b/modules/nixos/services/podman.nix @@ -3,14 +3,13 @@ config, ... }: -with lib; let cfg = config.hostConfig.services.podman; in { - options.hostConfig.services.podman = mkEnableOption "Enable podman containerization engine:"; + options.hostConfig.services.podman = lib.mkEnableOption "Enable podman containerization engine:"; - config = mkIf cfg { + config = lib.mkIf cfg { virtualisation.containers.enable = true; virtualisation = { podman = { diff --git a/modules/nixos/services/printer.nix b/modules/nixos/services/printer.nix index 5f0b0cd..deb182b 100644 --- a/modules/nixos/services/printer.nix +++ b/modules/nixos/services/printer.nix @@ -3,14 +3,13 @@ config, ... }: -with lib; let cfg = config.hostConfig.services.printing; in { - options.hostConfig.services.printing = mkEnableOption "Enable printing service."; + options.hostConfig.services.printing = lib.mkEnableOption "Enable printing service."; - config = mkIf cfg { + config = lib.mkIf cfg { services = { printing.enable = true; diff --git a/modules/nixos/services/sound.nix b/modules/nixos/services/sound.nix index 7333f02..ec8318d 100644 --- a/modules/nixos/services/sound.nix +++ b/modules/nixos/services/sound.nix @@ -3,14 +3,13 @@ config, ... }: -with lib; let cfg = config.hostConfig.services.sound; in { - options.hostConfig.services.sound = mkEnableOption "Enable sound."; + options.hostConfig.services.sound = lib.mkEnableOption "Enable sound."; - config = mkIf cfg { + config = lib.mkIf cfg { services = { pulseaudio.enable = false; pipewire = { diff --git a/modules/nixos/services/tailscale.nix b/modules/nixos/services/tailscale.nix index 27cca79..bf45d2a 100644 --- a/modules/nixos/services/tailscale.nix +++ b/modules/nixos/services/tailscale.nix @@ -3,14 +3,13 @@ config, ... }: -with lib; let cfg = config.hostConfig.services.tailscale; in { - options.hostConfig.services.tailscale = mkEnableOption "Enable tailscaled."; + options.hostConfig.services.tailscale = lib.mkEnableOption "Enable tailscaled."; - config = mkIf cfg { + config = lib.mkIf cfg { services.tailscale.enable = true; }; } diff --git a/modules/nixos/system/boot.nix b/modules/nixos/system/boot.nix index 2c35a8b..01e1963 100644 --- a/modules/nixos/system/boot.nix +++ b/modules/nixos/system/boot.nix @@ -3,24 +3,23 @@ config, ... }: -with lib; let cfg = config.hostConfig.boot; in { options.hostConfig.boot = { - enable = mkEnableOption "Enable install / config of bootloader"; - armSupport = mkEnableOption "Enable arm cross-compiler support"; - supportedFilesystems = mkOption { - type = with types; listOf str; + enable = lib.mkEnableOption "Enable install / config of bootloader"; + armSupport = lib.mkEnableOption "Enable arm cross-compiler support"; + supportedFilesystems = lib.mkOption { + type = lib.types.listOf lib.types.str; default = [ ]; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { boot = { inherit (cfg) supportedFilesystems; - binfmt.emulatedSystems = mkIf cfg.armSupport [ "aarch64-linux" ]; + binfmt.emulatedSystems = lib.mkIf cfg.armSupport [ "aarch64-linux" ]; consoleLogLevel = 3; initrd.verbose = false; diff --git a/modules/nixos/system/user.nix b/modules/nixos/system/user.nix index 0937fb6..7fe5728 100644 --- a/modules/nixos/system/user.nix +++ b/modules/nixos/system/user.nix @@ -5,18 +5,16 @@ pkgs, ... }: -with lib; -with mylib; let cfg = config.hostConfig.user; in { - options.hostConfig.user = with types; { - name = mkOpt str "Name of user."; - initialHashedPassword = mkOpt str "Password of user."; - keys = mkOpt (listOf str) "Public SSH keys of user."; - extraGroups = mkOpt' (listOf str) [ ] "Additional groups for the user."; - extraOptions = mkOpt attrs "Additional options for the user."; + options.hostConfig.user = { + name = mylib.mkOpt lib.types.str "Name of user."; + initialHashedPassword = mylib.mkOpt lib.types.str "Password of user."; + keys = mylib.mkOpt (lib.types.listOf lib.types.str) "Public SSH keys of user."; + extraGroups = mylib.mkOpt' (lib.types.listOf lib.types.str) [ ] "Additional groups for the user."; + extraOptions = mylib.mkOpt lib.types.attrs "Additional options for the user."; }; config = { @@ -25,7 +23,7 @@ in shell = pkgs.zsh; - initialHashedPassword = mkForce cfg.initialHashedPassword; + initialHashedPassword = lib.mkForce cfg.initialHashedPassword; openssh.authorizedKeys.keys = cfg.keys; extraGroups = [ From 49cb0c8ee88d9b3c333f5d38b0ba6307b92ad6a6 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 30 Apr 2026 01:22:44 +0200 Subject: [PATCH 79/81] WIP: remove some withs and add docs --- dev-shells.nix | 23 ++++++++++++++--------- docs/nix-lang.md | 19 +++++++++++++++++++ hosts/firefly/home.nix | 28 ++++++++++++++++------------ 3 files changed, 49 insertions(+), 21 deletions(-) diff --git a/dev-shells.nix b/dev-shells.nix index a0f1016..850a268 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -27,14 +27,19 @@ in default = pkgs.mkShell { inherit (pre-commit-check) shellHook; - packages = with pkgs; [ - nh - switch-firefly - switch-zion - statix - deadnix - nixfmt - nix-inspect - ]; + packages = builtins.attrValues { + inherit (pkgs) + nh + statix + deadnix + nixfmt + nix-inspect + ; + + inherit + switch-firefly + switch-zion + ; + }; }; } diff --git a/docs/nix-lang.md b/docs/nix-lang.md index 7546c6a..838bf40 100644 --- a/docs/nix-lang.md +++ b/docs/nix-lang.md @@ -123,6 +123,25 @@ Prev is the package before this overlay, may after some other overlays from upst This overlay function will be executed while instantiating ``, `prev` is the `pkgs` instance with correct `system`, before the overlay is applied. +## Nix `with`, its confusing +For readablity `with` comes handy to reduce repetitive in attribute statements. +But it also has a lot of problems and is confusing, in particular when having multiple `with` globaly. +This is considerd as **bad practice** and entirely avoided. +Even more it should be avoided completely see [best-practices#with-scopes](https://nix.dev/guides/best-practices#with-scopes) + +```nix +packages = builtins.attrValues { + inherit (pkgs) + curl + jq + ; + inherit (something) + anything + ; +}; +``` + + ## Update custom packages (derivation) 1. Bump version, set all `hash`es to empty sting `""`. diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index 1845e9f..a1f210c 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -16,9 +16,9 @@ work = true; email = "raphael.groemmer@digits.schwarz"; - apparmor-gen = with pkgs; [ - config.programs.chromium.finalPackage - obsidian + apparmor-gen = [ + pkgs.config.programs.chromium.finalPackage + pkgs.obsidian ]; desktop = { @@ -48,15 +48,19 @@ }; }; - home.packages = with pkgs; [ - # CLIs - mypkgs.gardenctl - mypkgs.gardenlogin - stackit-cli - openstackclient-full - vault-bin - brightnessctl - ]; + home.packages = builtins.attrValues { + inherit (pkgs) + stackit-cli + openstackclient-full + vault-bin + brightnessctl + ; + + inherit (pkgs.mypkgs) + gardenctl + gardenlogin + ; + }; targets.genericLinux = { enable = true; From 02cb0f9407bea9ab672683ccec71cad5da5d0d14 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 7 May 2026 22:46:04 +0200 Subject: [PATCH 80/81] Update monitors home --- modules/home/desktops/addons/kanshi/default.nix | 4 ++-- modules/home/desktops/niri/default.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 96f5643..0f1897d 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -103,9 +103,9 @@ } { criteria = "DP-2"; - scale = 1.0; + scale = 1.5; position = "0,0"; - mode = "2560x1440@144.00Hz"; + mode = "3840x2160@120.00Hz"; } ]; exec = "${lib.getExe workspaceSetup} DP-1 DP-2"; diff --git a/modules/home/desktops/niri/default.nix b/modules/home/desktops/niri/default.nix index 90ad986..fb06269 100644 --- a/modules/home/desktops/niri/default.nix +++ b/modules/home/desktops/niri/default.nix @@ -5,7 +5,7 @@ }: let cfg = config.roles.desktop.niri; - actions = config.lib.niri.actions; + inherit (config.lib.niri) actions; in { options.roles.desktop.niri = { From 9cf3a0d366b1dfb2345cb78342f930ee34a9b946 Mon Sep 17 00:00:00 2001 From: RAPSNX Date: Thu, 7 May 2026 23:18:49 +0200 Subject: [PATCH 81/81] remap keys --- hosts/firefly/home.nix | 2 +- .../home/desktops/addons/kanshi/default.nix | 24 ++++++++++++++++--- modules/home/desktops/hyprland/keybinds.nix | 5 +++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix index a1f210c..cde409d 100644 --- a/hosts/firefly/home.nix +++ b/hosts/firefly/home.nix @@ -17,7 +17,7 @@ email = "raphael.groemmer@digits.schwarz"; apparmor-gen = [ - pkgs.config.programs.chromium.finalPackage + config.programs.chromium.finalPackage pkgs.obsidian ]; diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix index 0f1897d..231566d 100644 --- a/modules/home/desktops/addons/kanshi/default.nix +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -51,14 +51,15 @@ outputs = [ { criteria = "DP-1"; + scale = 1.5; position = "2560,0"; mode = "3840x2160@143.99Hz"; } { criteria = "HDMI-A-1"; - scale = 1.0; + scale = 1.5; position = "0,0"; - mode = "2560x1440@144.00Hz"; + mode = "3840x2160@120.00Hz"; } { criteria = "eDP-1"; @@ -71,7 +72,7 @@ { profile = { - name = "firefly-office"; + name = "firefly-office-sb"; outputs = [ { criteria = "DP-8"; @@ -90,6 +91,23 @@ }; } + { + profile = { + name = "firefly-office-digits"; + outputs = [ + { + criteria = "DP-2"; + mode = "3440x1440@99.98Hz"; + } + { + criteria = "eDP-1"; + status = "disable"; + } + ]; + exec = "${lib.getExe workspaceSetup} DP-8 DP-9"; + }; + } + # ----- ZION ----- # { profile = { diff --git a/modules/home/desktops/hyprland/keybinds.nix b/modules/home/desktops/hyprland/keybinds.nix index eeeaffc..b78c537 100644 --- a/modules/home/desktops/hyprland/keybinds.nix +++ b/modules/home/desktops/hyprland/keybinds.nix @@ -74,6 +74,9 @@ in # Emoji picker "SUPER,period, exec, rofimoji --action copy --action type" + + # Emoji picker + "SUPER,I, exec, systemctl restart --user kanshi.service" ]; extraConfig = '' @@ -100,7 +103,7 @@ in # Window mode - bind = SUPER, W, submap, windows + bind = SUPER, G, submap, windows submap = windows bind = , Q, movetoworkspace, 1