From 820f3c1fdee4dda16d95367729051c7057c11bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 14:34:51 +0100 Subject: [PATCH 01/12] refactor: modularize Hyprland configuration - Create home/hyprland/default.nix module with configurable options - Add support for monitors, extraEnv, streamcontroller, lockhelper, grimblast, wacom - Add workspace strategy (numbered vs named per monitor) - Update magicman config to use new module with minimal config - Update gunter config to use new module with all customizations - Remove deprecated Hyprland config files - Significantly reduce duplication between host configs - Both configurations build successfully --- home/hosts/gunter/default.nix | 44 +++- home/hosts/magicman/default.nix | 3 +- home/hyprland/default.nix | 380 +++++++++++++++++++++++++++ home/hyprland/gunter.nix | 8 - home/hyprland/hyprland_gunter.nix | 384 ---------------------------- home/hyprland/hyprland_magicman.nix | 242 ------------------ home/hyprland/hyprland_prismo.nix | 159 ------------ home/hyprland/magicman.nix | 8 - home/hyprland/prismo.nix | 8 - 9 files changed, 425 insertions(+), 811 deletions(-) create mode 100644 home/hyprland/default.nix delete mode 100644 home/hyprland/gunter.nix delete mode 100644 home/hyprland/hyprland_gunter.nix delete mode 100644 home/hyprland/hyprland_magicman.nix delete mode 100644 home/hyprland/hyprland_prismo.nix delete mode 100644 home/hyprland/magicman.nix delete mode 100644 home/hyprland/prismo.nix diff --git a/home/hosts/gunter/default.nix b/home/hosts/gunter/default.nix index 921f528..463c9b7 100644 --- a/home/hosts/gunter/default.nix +++ b/home/hosts/gunter/default.nix @@ -18,7 +18,7 @@ imports = [ inputs.sops-nix.homeManagerModules.sops ../../editor/neovim - ../../hyprland/gunter.nix + ../../hyprland ../../packages ../../programs/dunst ../../programs/git @@ -36,9 +36,51 @@ ../../ssh ../../zsh ]; + firefox.enable = true; tmux.enable = true; hyprland.enable = true; + + hyprland.monitors = [ + "$mon_top,1920x1080@60,2560x0,1" + "$mon_left,2560x1440@75,0x1080,1" + "$mon_center,2560x1440@120,2560x1080,1" + "$mon_right,2560x1440@75,5120x1080,1" + ]; + + hyprland.extraEnv = [ + "LIBVA_DRIVER_NAME,nvidia" + "GBM_BACKEND,nvidia-drm" + "WLR_NO_HARDWARE_CURSORS,1" + ]; + + hyprland.enableStreamController = true; + hyprland.useLockHelper = true; + hyprland.enableGrimblast = true; + hyprland.enableWacom = true; + hyprland.cursorNoHardware = true; + hyprland.workspaceStrategy = "named"; + + hyprland.monitorVariables = { + "$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000"; + "$mon_left" = "desc:Samsung Electric Company LS27A600U HNMT502389"; + "$mon_center" = "desc:Acer Technologies XB271HU #ASPVEKfgZ8Dd"; + "$mon_right" = "desc:Samsung Electric Company LS27A600U HNMT502390"; + }; + + hyprland.lockMonitorNames = [ + "BNQ G2420HDBL T2B04424SL000" + "Samsung Electric Company LS27A600U HNMT502389" + "Acer Technologies XB271HU #ASPVEKfgZ8Dd" + "Samsung Electric Company LS27A600U HNMT502390" + ]; + + hyprland.extraKeybinds = [ + "$mainMod,Print,exec,grimblast save active ~/tmp/$(date -Iseconds).png" + "$shiftMainMod,Print,exec,grimblast copy area" + ",Print,exec,grimblast copy active" + "$mainMod,v,exec,sleep 0.5s && wl-paste | wtype -" + ]; home = { username = "${user}"; homeDirectory = "/home/${user}"; diff --git a/home/hosts/magicman/default.nix b/home/hosts/magicman/default.nix index e07bae6..acceb97 100644 --- a/home/hosts/magicman/default.nix +++ b/home/hosts/magicman/default.nix @@ -31,12 +31,13 @@ ../../scripts/batlvl.nix ../../zsh ../../packages - ../../hyprland/magicman.nix + ../../hyprland ../../ssh ]; firefox.enable = true; tmux.enable = true; hyprland.enable = true; + hyprland.monitors = [ "eDP-1,1920x1080@60,0x0,1" ]; home = { username = "${user}"; homeDirectory = "/home/${user}"; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix new file mode 100644 index 0000000..ade5124 --- /dev/null +++ b/home/hyprland/default.nix @@ -0,0 +1,380 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; +let + cfg = config.hyprland; +in +{ + options.hyprland = { + enable = mkEnableOption "Hyprland"; + + monitors = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "eDP-1,1920x1080@60,0x0,1" ]; + description = "Hyprland monitor configuration"; + }; + + extraEnv = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "LIBVA_DRIVER_NAME,nvidia" + "GBM_BACKEND,nvidia-drm" + ]; + description = "Extra environment variables for Hyprland"; + }; + + enableStreamController = mkEnableOption "streamcontroller service"; + + useLockHelper = mkEnableOption "use lockhelper script instead of hyprlock directly"; + + enableGrimblast = mkEnableOption "grimblast screenshot keybinds"; + + enableWacom = mkEnableOption "Wacom tablet device configuration"; + + extraKeybinds = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "$mainMod,Print,exec,grimblast save active ~/tmp/screenshot.png" + ]; + description = "Extra keybinds for Hyprland"; + }; + + lockMonitorNames = mkOption { + type = types.listOf (types.nullOr types.str); + default = [ null ]; + example = [ + "desc:BNQ G2420HDBL T2B04424SL000" + "desc:Samsung Electric Company LS27A600U HNMT502389" + ]; + description = "Monitor names for hyprlock backgrounds (null for all monitors)"; + }; + + workspaceStrategy = mkOption { + type = types.enum [ + "numbered" + "named" + ]; + default = "numbered"; + description = "Workspace naming strategy: numbered (1-6) or named per monitor"; + }; + + monitorVariables = mkOption { + type = types.attrsOf types.str; + default = { }; + example = { + "$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000"; + "$mon_left" = "desc:Samsung Electric Company LS27A600U HNMT502389"; + }; + description = "Monitor name variables for workspace configuration"; + }; + + cursorNoHardware = mkEnableOption "disable hardware cursors"; + }; + + config = mkIf cfg.enable { + home.packages = + with pkgs; + [ + dunst + hyprpaper + rofi + slurp + swww + waybar + wl-clipboard + catppuccin-cursors.macchiatoLavender + bibata-cursors + libsForQt5.qt5.qtwayland + libsForQt5.qt5ct + ] + ++ optional cfg.enableGrimblast grimblast; + + services.hyprpaper = { + enable = true; + settings = { + splash = false; + }; + }; + + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = + if cfg.useLockHelper then + "${pkgs.callPackage ../scripts/lockhelper.nix { }}/bin/lockhelper" + else + "${pkgs.hyprlock}/bin/hyprlock"; + ignore_dbus_inhibit = false; + }; + listener = { + timeout = 240; + on-timeout = config.services.hypridle.settings.general.lock_cmd; + before_sleep_cmd = config.services.hypridle.settings.general.lock_cmd; + }; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + background = map (mon: { + monitor = if mon == null then "" else "desc:${mon}"; + path = "screenshot"; + color = "rgba(17, 17, 17, 1.0)"; + blur_passes = 3; + contrast = 0.8916; + brightness = 0.8172; + vibrancy = 0.1696; + vibrancy_darkness = 0.0; + }) cfg.lockMonitorNames; + + general = { + grace = 0; + }; + + input-field = [ + { + size = "250, 60"; + outline_thickness = 2; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + outer_color = "rgba(0, 0, 0, 0)"; + inner_color = "rgba(0, 0, 0, 0.5)"; + font_color = "rgb(200, 200, 200)"; + fade_on_empty = false; + font_family = "JetBrains Mono Nerd Font Mono"; + placeholder_text = "Input Password..."; + hide_input = false; + position = "0, -120"; + halign = "center"; + valign = "center"; + } + ]; + + label = [ + { + text = "cmd[update:2000] echo \"$(date +\"%b %d %H:%M\")\""; + color = "rgba(255, 255, 255, 0.6)"; + font_size = 120; + font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; + position = "0, -300"; + halign = "center"; + valign = "top"; + } + ]; + }; + }; + + systemd.user.services = mkIf cfg.enableStreamController { + streamcontroller = { + Unit = { + Description = "Streamcontroller service"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + Requisite = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b"; + Restart = "on-failure"; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + }; + + wayland.windowManager.hyprland = { + enable = true; + package = pkgs.hyprland; + systemd.enable = false; + settings = { + "$mainMod" = "SUPER"; + "$shiftMainMod" = "SUPER_SHIFT"; + "$term" = "kitty"; + } + // cfg.monitorVariables + // { + monitor = cfg.monitors; + + input = { + kb_layout = "no"; + follow_mouse = 1; + }; + + device = optional cfg.enableWacom { + name = "wacom-one-by-wacom-m-pen"; + }; + + cursor = optionalAttrs cfg.cursorNoHardware { + no_hardware_cursors = true; + }; + + env = [ "XDG_SESSION_TYPE,wayland" ] ++ cfg.extraEnv; + + decoration = { + rounding = 10; + blur = { + enabled = true; + size = 3; + passes = 1; + xray = true; + }; + }; + + general = { + gaps_in = 4; + gaps_out = 10; + border_size = 2; + layout = "dwindle"; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + "specialWorkspace, 1, 4, default, fade" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + special_scale_factor = 0.85; + }; + + master = { + new_status = "master"; + }; + + misc = { + force_default_wallpaper = 0; + disable_hyprland_logo = true; + }; + + ecosystem = { + no_update_news = true; + }; + + windowrule = [ + { + name = "terminal_opacity"; + "match:class" = "kitty"; + opacity = 0.9; + } + ]; + + workspace = + if cfg.workspaceStrategy == "named" then + [ + "name:T1, monitor:$mon_top, persistent:true, default:true" + "name:T2, monitor:$mon_top, persistent:true, default:false" + "name:L1, monitor:$mon_left, persistent:true, default:true" + "name:L2, monitor:$mon_left, persistent:true, default:false" + "name:R1, monitor:$mon_right, persistent:true, default:true" + "name:R2, monitor:$mon_right, persistent:true, default:false" + "name:c1, monitor:$mon_center, persistent:true, default:true" + "name:c2, monitor:$mon_center, persistent:true, default:false" + "name:c3, monitor:$mon_center, persistent:true, default:false" + "name:c4, monitor:$mon_center, persistent:true, default:false" + "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" + ] + else + [ "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" ]; + + bindm = [ + "$mainMod,mouse:272,movewindow" + "$shiftMainMod,mouse:272,resizewindow" + ]; + + bind = [ + # term + "$mainMod,Return,exec,$term" + # rofi + "$mainMod,D,exec,rofi-launcher" + "$mainMod,P,exec,rofi-rbw" + # hyprlock + "$shiftMainMod,l,exec,${ + if cfg.useLockHelper then + "${pkgs.callPackage ../scripts/lockhelper.nix { }}/bin/lockhelper" + else + "${pkgs.hyprlock}/bin/hyprlock" + }" + # hyprland + "$mainMod,Q,killactive," + "CTRLALT,Delete,exit," + "$mainMod,Space,togglefloating," + "$mainMod,F,fullscreen," + # focus + "$mainMod,l,movefocus,l" + "$mainMod,h,movefocus,r" + "$mainMod,k,movefocus,u" + "$mainMod,j,movefocus,d" + # move + "$mainMod,h,movewindow,l" + "$mainMod,l,movewindow,r" + "$mainMod,k,movewindow,u" + "$mainMod,j,movewindow,d" + # Force opacity + "$shiftMainMod,o,exec, hl-no-opacity" + ] + ++ cfg.extraKeybinds + ++ ( + if cfg.workspaceStrategy == "numbered" then + [ + "$mainMod,1,workspace,1" + "$mainMod,2,workspace,2" + "$mainMod,3,workspace,3" + "$mainMod,4,workspace,4" + "$mainMod,5,workspace,5" + "$mainMod,6,workspace,6" + "$shiftMainMod,1,movetoworkspace,1" + "$shiftMainMod,2,movetoworkspace,2" + "$shiftMainMod,3,movetoworkspace,3" + "$shiftMainMod,4,movetoworkspace,4" + "$shiftMainMod,5,movetoworkspace,5" + "$shiftMainMod,5,movetoworkspace,6" + ] + else + [ + "$mainMod,1,workspace,name:c1" + "$mainMod,2,workspace,name:c2" + "$mainMod,3,workspace,name:c3" + "$mainMod,4,workspace,name:c4" + "$mainMod,5,workspace,5" + "$mainMod,6,workspace,6" + "$shiftMainMod,1,movetoworkspace,name:c1" + "$shiftMainMod,2,movetoworkspace,name:c2" + "$shiftMainMod,3,movetoworkspace,name:c3" + "$shiftMainMod,4,movetoworkspace,name:c4" + "$shiftMainMod,5,movetoworkspace,5" + "$shiftMainMod,6,movetoworkspace,6" + ] + ) + ++ [ + # Special workspace + "$mainMod,c,togglespecialworkspace" + "$shiftMainMod,c,movetoworkspace, special" + ]; + + exec-once = [ ]; + }; + }; + }; +} diff --git a/home/hyprland/gunter.nix b/home/hyprland/gunter.nix deleted file mode 100644 index 9d5365b..0000000 --- a/home/hyprland/gunter.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./hyprland_gunter.nix - ./waybar - ./xdg.nix - ./cursor.nix - ]; -} diff --git a/home/hyprland/hyprland_gunter.nix b/home/hyprland/hyprland_gunter.nix deleted file mode 100644 index 07f8e5e..0000000 --- a/home/hyprland/hyprland_gunter.nix +++ /dev/null @@ -1,384 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -let - lockhelper = pkgs.callPackage ../scripts/lockhelper.nix { }; - monitorTopDesc = "BNQ G2420HDBL T2B04424SL000"; - monitorTopName = "desc:${monitorTopDesc}"; - monitorTopHash = builtins.substring 0 8 (builtins.hashString "sha256" monitorTopDesc); - - monitorLeftDesc = "Samsung Electric Company LS27A600U HNMT502389"; - monitorLeftName = "desc:${monitorLeftDesc}"; - monitorLeftHash = builtins.substring 0 8 (builtins.hashString "sha256" monitorLeftDesc); - - monitorCenterDesc = "Acer Technologies XB271HU #ASPVEKfgZ8Dd"; - monitorCenterName = "desc:${monitorCenterDesc}"; - monitorCenterHash = builtins.substring 0 8 (builtins.hashString "sha256" monitorCenterDesc); - - monitorRightDesc = "Samsung Electric Company LS27A600U HNMT502390"; - monitorRightName = "desc:${monitorRightDesc}"; - monitorRightHash = builtins.substring 0 8 (builtins.hashString "sha256" monitorRightDesc); - -in -{ - options.hyprland.enable = lib.mkEnableOption "Hyprland"; - config = { - home.packages = with pkgs; [ - dunst - rofi - slurp - swww - waybar - wl-clipboard - catppuccin-cursors.macchiatoLavender - bibata-cursors - # For potentially fixing some issues - libsForQt5.qt5.qtwayland - libsForQt5.qt5ct - ]; - - services.hyprpaper = { - enable = true; - settings = { - splash = false; - }; - }; - services.hypridle = { - enable = true; - settings = { - general = { - lock_cmd = "${pkgs.hyprlock}/bin/hyprlock"; - before_sleep_cmd = "${lockhelper}/bin/lockhelper"; - ignore_dbus_inhibit = false; - }; - listener = { - timeout = 240; - on-timeout = "${lockhelper}/bin/lockhelper"; - }; - }; - }; - - programs.hyprlock = { - enable = true; - settings = { - background = [ - { - monitor = monitorTopName; - # path = "/tmp/lockscreen/${monitorTopHash}.png"; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - } - { - monitor = monitorLeftName; - # path = "/tmp/lockscreen/${monitorLeftHash}.png"; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - zindex = 1; - } - { - monitor = monitorCenterName; - # path = "/tmp/lockscreen/${monitorCenterHash}.png"; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - } - { - monitor = monitorRightName; - # path = "/tmp/lockscreen/${monitorRightHash}.png"; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - } - ]; - - general = { - grace = 0; - }; - - input-field = [ - { - size = "250, 60"; - outline_thickness = 2; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - outer_color = "rgba(0, 0, 0, 0)"; - inner_color = "rgba(0, 0, 0, 0.5)"; - font_color = "rgb(200, 200, 200)"; - fade_on_empty = false; - font_family = "JetBrains Mono Nerd Font Mono"; - placeholder_text = "Input Password..."; - hide_input = false; - position = "0, -120"; - halign = "center"; - valign = "center"; - } - ]; - - label = [ - { - text = "cmd[update:2000] echo \"$(date +\"%b %d %H:%M\")\""; - color = "rgba(255, 255, 255, 0.6)"; - font_size = 120; - font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; - position = "0, -300"; - halign = "center"; - valign = "top"; - } - ]; - }; - }; - - # streamcontroller service - - systemd.user.services = { - streamcontroller = { - Unit = { - Description = "Streamcontroller service"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - Requisite = [ "graphical-session.target" ]; - }; - - Service = { - ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b"; - Restart = "on-failure"; - }; - - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - }; - }; - - wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - systemd.enable = false; - settings = { - "$mainMod" = "SUPER"; - "$shiftMainMod" = "SUPER_SHIFT"; - "$term" = "kitty"; - - # monitors - "$mon_top" = monitorTopName; - "$mon_left" = monitorLeftName; - "$mon_center" = monitorCenterName; - "$mon_right" = monitorRightName; - - monitor = [ - "$mon_top,1920x1080@60,2560x0,1" # top T2B04424SL000 - # "DP-8,1920x1080@60,2560x0,1" # top T2B04424SL000 60 - "$mon_left,2560x1440@75,0x1080,1" # left - # "DP-6,2560x1440@75,0x1080,1" # left 75hz - "$mon_center,2560x1440@120,2560x1080,1" # main #ASPVEKfgZ8Dd - # "DP-4,2560x1440@144,2560x1080,1" # main #ASPVEKfgZ8Dd 120hz - "$mon_right,2560x1440@75,5120x1080,1" # right - # "DP-7,2560x1440@75,5120x1080,1" # right 75hz - ]; - input = { - kb_layout = "no"; - follow_mouse = 1; - }; - - device = [ - { - name = "wacom-one-by-wacom-m-pen"; - output = "$mon_center"; - } - ]; - - cursor = { - no_hardware_cursors = true; - }; - - env = [ - "LIBVA_DRIVER_NAME,nvidia" - "XDG_SESSION_TYPE,wayland" - "GBM_BACKEND,nvidia-drm" - # "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "WLR_NO_HARDWARE_CURSORS,1" - ]; - - decoration = { - rounding = 10; - blur = { - enabled = true; - size = 3; - passes = 1; - xray = true; - }; - }; - - general = { - gaps_in = 4; - gaps_out = 10; - border_size = 2; - layout = "dwindle"; - }; - - ecosystem = { - no_update_news = true; - }; - - animations = { - enabled = true; - bezier = [ - "myBezier, 0.05, 0.9, 0.1, 1.05" - "easeInB, 0.6, -0.28, 0.735, 0.045" - ]; - - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, easeInB, slidefadevert" - "specialWorkspace, 1, 4, default, fade" - ]; - }; - - dwindle = { - pseudotile = true; - preserve_split = true; - special_scale_factor = 0.85; - }; - - master = { - new_status = "master"; - }; - - misc = { - force_default_wallpaper = 0; - disable_hyprland_logo = true; - }; - - windowrule = [ - { - name = "terminal_opacity"; - "match:class" = "kitty"; - opacity = 0.9; - } - ]; - - workspace = [ - "name:T1, monitor:$mon_top, persistent:true, default:true" - "name:T2, monitor:$mon_top, persistent:true, default:false" - "name:L1, monitor:$mon_left, persistent:true, default:true" - "name:L2, monitor:$mon_left, persistent:true, default:false" - "name:R1, monitor:$mon_right, persistent:true, default:true" - "name:R2, monitor:$mon_right, persistent:true, default:false" - "name:c1, monitor:$mon_center, persistent:true, default:true" - "name:c2, monitor:$mon_center, persistent:true, default:false" - "name:c3, monitor:$mon_center, persistent:true, default:false" - "name:c4, monitor:$mon_center, persistent:true, default:false" - "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" - ]; - - bindm = [ - "$mainMod,mouse:272,movewindow" - "$shiftMainMod,mouse:272,resizewindow" - ]; - - bindr = [ - # mumble ptt release - # ",code:202,exec,mumble rpc stoptalking" - # ",code:202,exec,pamixer --source 63 -m" - # ",code:202,exec,sleep 0.5 && pamixer --default-source -m" - ]; - - bind = [ - # term - "$mainMod,Return,exec,$term" - - # hyprlock - "$shiftMainMod,l,exec,${lockhelper}/bin/lockhelper" - - # rofi - "$mainMod,D,exec,rofi-launcher" - "$mainMod,P,exec,rofi-rbw" - - # hyprland - "$mainMod,Q,killactive," - "CTRLALT,Delete,exit," - "$mainMod,Space,togglefloating," - "$mainMod,F,fullscreen," - - # focus - "$mainMod,l,movefocus,l" - "$mainMod,h,movefocus,r" - "$mainMod,k,movefocus,u" - "$mainMod,j,movefocus,d" - - # move - "$mainMod,h,movewindow,l" - "$mainMod,l,movewindow,r" - "$mainMod,k,movewindow,u" - "$mainMod,j,movewindow,d" - - # Force opacity - "$shiftMainMod,o,exec, hl-no-opacity" - - # grimblast - "$mainMod,Print,exec,grimblast save active ~/tmp/$(date -Iseconds).png" - "$shiftMainMod,Print,exec,grimblast copy area" - ",Print,exec,grimblast copy active" - - # mumble ptt click - # ",code:202,exec,mumble rpc starttalking" - #",code:202,pass,^(info\.mumble\.Mumble)$" - # ",code:202,exec,pamixer --default-source -u" - ",code:202,pass,^discord$" - - # Paste to wtype - "$mainMod,v,exec,sleep 0.5s && wl-paste | wtype -" - - # worspace switching - "$mainMod,1,workspace,name:c1" - "$mainMod,2,workspace,name:c2" - "$mainMod,3,workspace,name:c3" - "$mainMod,4,workspace,name:c4" - "$mainMod,5,workspace,5" - "$mainMod,6,workspace,6" - - # Move window to workspace - "$shiftMainMod,1,movetoworkspace,name:c1" - "$shiftMainMod,2,movetoworkspace,name:c2" - "$shiftMainMod,3,movetoworkspace,name:c3" - "$shiftMainMod,4,movetoworkspace,name:c4" - "$shiftMainMod,5,movetoworkspace,5" - "$shiftMainMod,6,movetoworkspace,6" - - # Special workspace - "$mainMod,c,togglespecialworkspace" - "$shiftMainMod,c,movetoworkspace, special" - ]; - - exec-once = [ - ]; - }; - }; - }; -} diff --git a/home/hyprland/hyprland_magicman.nix b/home/hyprland/hyprland_magicman.nix deleted file mode 100644 index c80a50c..0000000 --- a/home/hyprland/hyprland_magicman.nix +++ /dev/null @@ -1,242 +0,0 @@ -{ - pkgs, - lib, - ... -}: -{ - options.hyprland.enable = lib.mkEnableOption "Hyprland"; - config = { - home.packages = with pkgs; [ - dunst - # hyprlock - hyprpaper - rofi - slurp - swww - waybar - wl-clipboard - catppuccin-cursors.macchiatoLavender - bibata-cursors - # For potentially fixing some issues - libsForQt5.qt5.qtwayland - libsForQt5.qt5ct - ]; - - services.hyprpaper = { - enable = true; - settings = { - splash = false; - }; - }; - - services.hypridle = { - enable = true; - settings = { - general = { - lock_cmd = "${pkgs.hyprlock}/bin/hyprlock"; - before_sleep_cmd = "${pkgs.hyprlock}/bin/hyprlock"; - ignore_dbus_inhibit = false; - }; - listener = { - timeout = 240; - on-timeout = "${pkgs.hyprlock}/bin/hyprlock"; - }; - }; - }; - - programs.hyprlock = { - enable = true; - settings = { - background = [ - { - monitor = ""; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - } - ]; - - general = { - grace = 0; - }; - - input-field = [ - { - size = "250, 60"; - outline_thickness = 2; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - outer_color = "rgba(0, 0, 0, 0)"; - inner_color = "rgba(0, 0, 0, 0.5)"; - font_color = "rgb(200, 200, 200)"; - fade_on_empty = false; - font_family = "JetBrains Mono Nerd Font Mono"; - placeholder_text = "Input Password..."; - hide_input = false; - position = "0, -120"; - halign = "center"; - valign = "center"; - } - ]; - - label = [ - { - text = "cmd[update:2000] echo \"$(date +\"%b %d %H:%M\")\""; - color = "rgba(255, 255, 255, 0.6)"; - font_size = 120; - font_family = "JetBrains Mono Nerd Font Mono ExtraBold"; - position = "0, -300"; - halign = "center"; - valign = "top"; - } - ]; - }; - }; - - wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - settings = { - "$mainMod" = "SUPER"; - "$shiftMainMod" = "SUPER_SHIFT"; - "$term" = "kitty"; - - monitor = [ "eDP-1,1920x1080@60,0x0,1" ]; - input = { - kb_layout = "no"; - follow_mouse = 1; - }; - - env = [ "XDG_SESSION_TYPE,wayland" ]; - - decoration = { - rounding = 10; - blur = { - enabled = true; - size = 3; - passes = 1; - xray = true; - }; - }; - - general = { - gaps_in = 4; - gaps_out = 10; - border_size = 2; - layout = "dwindle"; - }; - - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - "specialWorkspace, 1, 4, default, fade" - ]; - }; - dwindle = { - pseudotile = true; - preserve_split = true; - special_scale_factor = 0.85; - }; - master = { - new_status = "master"; - }; - misc = { - force_default_wallpaper = 0; - disable_hyprland_logo = true; - }; - - ecosystem = { - no_update_news = true; - }; - - windowrule = [ - { - name = "terminal_opacity"; - "match:class" = "kitty"; - opacity = 0.9; - } - ]; - - workspace = [ - "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" - ]; - - bindm = [ - "$mainMod,mouse:272,movewindow" - "$shiftMainMod,mouse:272,resizewindow" - ]; - - bindr = [ - ]; - - bind = [ - # term - "$mainMod,Return,exec,$term" - - # rofi - "$mainMod,D,exec,rofi-launcher" - "$mainMod,P,exec,rofi-rbw" - - # hyprlock - "$shiftMainMod,l,exec,${pkgs.hyprlock}/bin/hyprlock" - - # hyprland - "$mainMod,Q,killactive," - "CTRLALT,Delete,exit," - "$mainMod,Space,togglefloating," - "$mainMod,F,fullscreen," - - # focus - "$mainMod,l,movefocus,l" - "$mainMod,h,movefocus,r" - "$mainMod,k,movefocus,u" - "$mainMod,j,movefocus,d" - - # move - "$mainMod,h,movewindow,l" - "$mainMod,l,movewindow,r" - "$mainMod,k,movewindow,u" - "$mainMod,j,movewindow,d" - - # Force opacity - "$shiftMainMod,o,exec, hl-no-opacity" - - # worspace switching - "$mainMod,1,workspace,1" - "$mainMod,2,workspace,2" - "$mainMod,3,workspace,3" - "$mainMod,4,workspace,4" - "$mainMod,5,workspace,5" - "$mainMod,6,workspace,6" - - # Move window to workspace - "$shiftMainMod,1,movetoworkspace,1" - "$shiftMainMod,2,movetoworkspace,2" - "$shiftMainMod,3,movetoworkspace,3" - "$shiftMainMod,4,movetoworkspace,4" - "$shiftMainMod,5,movetoworkspace,5" - "$shiftMainMod,5,movetoworkspace,6" - - # Special workspace - "$mainMod,c,togglespecialworkspace" - "$shiftMainMod,c,movetoworkspace, special" - ]; - - exec-once = [ - ]; - }; - }; - }; -} diff --git a/home/hyprland/hyprland_prismo.nix b/home/hyprland/hyprland_prismo.nix deleted file mode 100644 index c15c147..0000000 --- a/home/hyprland/hyprland_prismo.nix +++ /dev/null @@ -1,159 +0,0 @@ -{ - inputs, - pkgs, - lib, - config, - ... -}: -{ - options.hyprland.enable = lib.mkEnableOption "Hyprland"; - config = { - home.packages = with pkgs; [ - dunst - # hyprlock - hyprpaper - rofi-wayland - slurp - swww - waybar - wl-clipboard - catppuccin-cursors.macchiatoLavender - bibata-cursors - # For potentially fixing some issues - libsForQt5.qt5.qtwayland - libsForQt5.qt5ct - ]; - - wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - settings = { - "$mainMod" = "SUPER"; - "$shiftMainMod" = "SUPER_SHIFT"; - "$term" = "kitty"; - - monitor = [ ]; - input = { - kb_layout = "no"; - follow_mouse = 1; - }; - - env = [ "XDG_SESSION_TYPE,wayland" ]; - - decoration = { - rounding = 0; - drop_shadow = true; - shadow_range = 4; - shadow_render_power = 3; - blur = { - enabled = true; - size = 3; - passes = 1; - xray = true; - }; - }; - - general = { - gaps_in = 4; - gaps_out = 10; - border_size = 2; - layout = "dwindle"; - }; - - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - dwindle = { - pseudotile = true; - preserve_split = true; - }; - master = { - new_status = "master"; - }; - misc.force_default_wallpaper = -1; - - windowrulev2 = [ - "opacity 0.95 override 0.7 override,class:^(Alacritty)$" - "opacity 0.95 override 0.7 override,class:^(kitty)$" - ]; - - workspace = [ - "name:mumble, monitor:$mon_top, persistent:true, default:true" - "name:left, monitor:$mon_left, persistent:true, default:true" - "name:right, monitor:$mon_right, persistent:true, default:true" - "name:main 1, monitor:$mon_center, persistent:true, default:true" - "name:main 2, monitor:$mon_center, persistent:true, default:true" - ]; - - bindm = [ "ALT,mouse:272,movewindow" ]; - - bindr = [ - # mumble ptt release - # ",code:202,exec,mumble rpc stoptalking" - # ",code:202,exec,pamixer --source 63 -m" - # ",code:202,exec,sleep 0.5 && pamixer --default-source -m" - ]; - - bind = [ - # term - "$mainMod,Return,exec,$term" - - # rofi - "$mainMod,D,exec,rofi-launcher" - "$mainMod,P,exec,rofi-rbw" - - # hyprland - "$mainMod,Q,killactive," - "CTRLALT,Delete,exit," - "$mainMod,Space,togglefloating," - "$mainMod,F,fullscreen," - - # focus - "$mainMod,l,movefocus,l" - "$mainMod,h,movefocus,r" - "$mainMod,k,movefocus,u" - "$mainMod,j,movefocus,d" - - # move - "$mainMod,h,movewindow,l" - "$mainMod,l,movewindow,r" - "$mainMod,k,movewindow,u" - "$mainMod,j,movewindow,d" - - # Force opacity - "$shiftMainMod,o,exec, hl-no-opacity" - - # mumble ptt click - # ",code:202,exec,mumble rpc starttalking" - #",code:202,pass,^(info\.mumble\.Mumble)$" - # ",code:202,exec,pamixer --default-source -u" - ",code:202,pass,^discord$" - - # worspace switching - "$mainMod,1,workspace,name:main 1" - "$mainMod,2,workspace,name:main 2" - "$mainMod,3,workspace,3" - "$mainMod,4,workspace,4" - "$mainMod,5,workspace,5" - "$mainMod,6,workspace,6" - ]; - - exec-once = [ - "waybar" - "hyprpaper & sleep 2 && randomwp" - "easyeffects --gapplication-service" - # "dunst" - ]; - }; - }; - }; -} diff --git a/home/hyprland/magicman.nix b/home/hyprland/magicman.nix deleted file mode 100644 index 5657853..0000000 --- a/home/hyprland/magicman.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./hyprland_magicman.nix - ./waybar - ./xdg.nix - ./cursor.nix - ]; -} diff --git a/home/hyprland/prismo.nix b/home/hyprland/prismo.nix deleted file mode 100644 index 5ecd4ac..0000000 --- a/home/hyprland/prismo.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - ./hyprland_prismo.nix - ./waybar - ./xdg.nix - ./cursor.nix - ]; -} From 185087e479de4c57130ce2820ccd57149d121e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 15:00:10 +0100 Subject: [PATCH 02/12] vibecoding: add AGENTS.md --- AGENTS.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6eba75e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,71 @@ +# AGENTS.md + +## Overview +This repository contains NixOS configurations for multiple machines using flakes, home-manager, and sops-nix for secrets. + +## Working with this Repository + +### DO +- Use `nix fmt` or `nix fmt .` to format files before committing (uses nixfmt-tree) +- Test builds with `nix build .#nixosConfigurations..config.system.build.toplevel` +- Use the included devShell run `nix develop` to get formatting and linting tools +- When adding packages, check both overlays in `flake.nix` and `home/programs/` +- Follow the directory structure: `hosts/` for system configs, `home/` for home-manager configs +- **CRITICAL: When adding NEW files, run `git add ` BEFORE building. Nix flakes ignore untracked files in the build context, so newly added files won't be copied and builds will fail until they're git-tracked** + +### DON'T +- Don't work directly on master branch, always create a new branch if editing something +- Don't run `nix flake update` to update inputs, this should only be done by the user manually +- Don't directly edit files in `secrets/` - they should be manually managed by the user +- Don't add secrets to Git +- Don't format with tools other than `nix fmt` (the formatter is defined in flake.nix) +- Don't modify `.sops.yaml` or any secrets, ask the user to do it manually +- Don't use `nix-shell` directly - use `nix develop` for the devShell environment +- Don't skip builds after configuration changes - test before pushing +- Don't mix stable and unstable packages arbitrarily in the same expression +- Don't commit without running `nix fmt` - formatted Nix is required +- **Don't try to build with newly created but untracked files - `nix build` will fail to find them** + +## Specific Patterns + +### Adding a New Program +- DO add to `home/packages` if no nixos or home-manager options are used. +- DO create a subdirectory in `home/programs/` if nixos or home-manager options are used. +- DO `git add` the new configuration files before attempting to build +- DON'T add programs directly to user configs unless absolutely necessary + +### Modifying System Configuration +- DO check `system/` for shared configs across hosts +- DO check individual `hosts//` for host-specific overrides +- DON'T duplicate configuration - use `system/` modules for shared settings + +### Working with Secrets +- DON'T add unencrypted secrets to the repository +- DON'T commit decrypted secrets +- DON'T add secrets, ask the user do it themselves + +### Testing +- DO run `nix build .#nixosConfigurations..config.system.build.toplevel` to test +- DON'T push untested configuration changes +- DON'T attempt to build configurations with newly added but untracked files + +### Git +If change is small, and can be described sufficiently in the summary, dont add a long +body to the commit, prefer just the summary if sufficient. + +Commits should match the format: +`topic: description of change` + +Some examples: +- hyprland: convert deprecated windowrules +- packages: nixfmt-rfc-style renamed +- gunter: use beta nvidia driver + + +## Repository Structure Guide +- `flake.nix` - Entrypoint, inputs, overlays, and configurations +- `hosts/` - System-level NixOS configs per host +- `home/` - Home-manager configs (programs, editor, window managers) +- `system/` - Shared system modules (fonts, security, services) +- `secrets/` - Encrypted secrets (managed by sops-nix) +- `scripts/` - Utility scripts From 27dd1a5716ba9240a70c505439b92f45737cf535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 17:32:10 +0100 Subject: [PATCH 03/12] hyprland: make workspaces host-defined --- home/hosts/gunter/default.nix | 27 +++++++++++++- home/hosts/magicman/default.nix | 15 ++++++++ home/hyprland/default.nix | 63 +++++---------------------------- home/packages/default.nix | 1 + 4 files changed, 51 insertions(+), 55 deletions(-) diff --git a/home/hosts/gunter/default.nix b/home/hosts/gunter/default.nix index 463c9b7..8da9d85 100644 --- a/home/hosts/gunter/default.nix +++ b/home/hosts/gunter/default.nix @@ -59,7 +59,19 @@ hyprland.enableGrimblast = true; hyprland.enableWacom = true; hyprland.cursorNoHardware = true; - hyprland.workspaceStrategy = "named"; + + hyprland.extraWorkspaces = [ + "name:T1, monitor:$mon_top, persistent:true, default:true" + "name:T2, monitor:$mon_top, persistent:true, default:false" + "name:L1, monitor:$mon_left, persistent:true, default:true" + "name:L2, monitor:$mon_left, persistent:true, default:false" + "name:R1, monitor:$mon_right, persistent:true, default:true" + "name:R2, monitor:$mon_right, persistent:true, default:false" + "name:c1, monitor:$mon_center, persistent:true, default:true" + "name:c2, monitor:$mon_center, persistent:true, default:false" + "name:c3, monitor:$mon_center, persistent:true, default:false" + "name:c4, monitor:$mon_center, persistent:true, default:false" + ]; hyprland.monitorVariables = { "$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000"; @@ -80,6 +92,19 @@ "$shiftMainMod,Print,exec,grimblast copy area" ",Print,exec,grimblast copy active" "$mainMod,v,exec,sleep 0.5s && wl-paste | wtype -" + # Workspace keybinds + "$mainMod,1,workspace,name:c1" + "$mainMod,2,workspace,name:c2" + "$mainMod,3,workspace,name:c3" + "$mainMod,4,workspace,name:c4" + "$mainMod,5,workspace,5" + "$mainMod,6,workspace,6" + "$shiftMainMod,1,movetoworkspace,name:c1" + "$shiftMainMod,2,movetoworkspace,name:c2" + "$shiftMainMod,3,movetoworkspace,name:c3" + "$shiftMainMod,4,movetoworkspace,name:c4" + "$shiftMainMod,5,movetoworkspace,5" + "$shiftMainMod,6,movetoworkspace,6" ]; home = { username = "${user}"; diff --git a/home/hosts/magicman/default.nix b/home/hosts/magicman/default.nix index acceb97..174decc 100644 --- a/home/hosts/magicman/default.nix +++ b/home/hosts/magicman/default.nix @@ -38,6 +38,21 @@ tmux.enable = true; hyprland.enable = true; hyprland.monitors = [ "eDP-1,1920x1080@60,0x0,1" ]; + hyprland.extraKeybinds = [ + # Workspace keybinds + "$mainMod,1,workspace,1" + "$mainMod,2,workspace,2" + "$mainMod,3,workspace,3" + "$mainMod,4,workspace,4" + "$mainMod,5,workspace,5" + "$mainMod,6,workspace,6" + "$shiftMainMod,1,movetoworkspace,1" + "$shiftMainMod,2,movetoworkspace,2" + "$shiftMainMod,3,movetoworkspace,3" + "$shiftMainMod,4,movetoworkspace,4" + "$shiftMainMod,5,movetoworkspace,5" + "$shiftMainMod,6,movetoworkspace,6" + ]; home = { username = "${user}"; homeDirectory = "/home/${user}"; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index ade5124..0d769b9 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -56,13 +56,14 @@ in description = "Monitor names for hyprlock backgrounds (null for all monitors)"; }; - workspaceStrategy = mkOption { - type = types.enum [ - "numbered" - "named" + extraWorkspaces = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ + "1, monitor:eDP-1, persistent:true, default:true" + "2, monitor:eDP-1, persistent:true" ]; - default = "numbered"; - description = "Workspace naming strategy: numbered (1-6) or named per monitor"; + description = "Extra workspace definitions for Hyprland"; }; monitorVariables = mkOption { @@ -281,22 +282,8 @@ in ]; workspace = - if cfg.workspaceStrategy == "named" then - [ - "name:T1, monitor:$mon_top, persistent:true, default:true" - "name:T2, monitor:$mon_top, persistent:true, default:false" - "name:L1, monitor:$mon_left, persistent:true, default:true" - "name:L2, monitor:$mon_left, persistent:true, default:false" - "name:R1, monitor:$mon_right, persistent:true, default:true" - "name:R2, monitor:$mon_right, persistent:true, default:false" - "name:c1, monitor:$mon_center, persistent:true, default:true" - "name:c2, monitor:$mon_center, persistent:true, default:false" - "name:c3, monitor:$mon_center, persistent:true, default:false" - "name:c4, monitor:$mon_center, persistent:true, default:false" - "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" - ] - else - [ "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" ]; + [ "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" ] + ++ cfg.extraWorkspaces; bindm = [ "$mainMod,mouse:272,movewindow" @@ -335,38 +322,6 @@ in "$shiftMainMod,o,exec, hl-no-opacity" ] ++ cfg.extraKeybinds - ++ ( - if cfg.workspaceStrategy == "numbered" then - [ - "$mainMod,1,workspace,1" - "$mainMod,2,workspace,2" - "$mainMod,3,workspace,3" - "$mainMod,4,workspace,4" - "$mainMod,5,workspace,5" - "$mainMod,6,workspace,6" - "$shiftMainMod,1,movetoworkspace,1" - "$shiftMainMod,2,movetoworkspace,2" - "$shiftMainMod,3,movetoworkspace,3" - "$shiftMainMod,4,movetoworkspace,4" - "$shiftMainMod,5,movetoworkspace,5" - "$shiftMainMod,5,movetoworkspace,6" - ] - else - [ - "$mainMod,1,workspace,name:c1" - "$mainMod,2,workspace,name:c2" - "$mainMod,3,workspace,name:c3" - "$mainMod,4,workspace,name:c4" - "$mainMod,5,workspace,5" - "$mainMod,6,workspace,6" - "$shiftMainMod,1,movetoworkspace,name:c1" - "$shiftMainMod,2,movetoworkspace,name:c2" - "$shiftMainMod,3,movetoworkspace,name:c3" - "$shiftMainMod,4,movetoworkspace,name:c4" - "$shiftMainMod,5,movetoworkspace,5" - "$shiftMainMod,6,movetoworkspace,6" - ] - ) ++ [ # Special workspace "$mainMod,c,togglespecialworkspace" diff --git a/home/packages/default.nix b/home/packages/default.nix index 8c0d68a..d9d9cbe 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -13,6 +13,7 @@ in bat bzip2 chromium + claude-code croc devenv distrobox From e8cee85f7cfac5fc5d7d7546bc7d4902354d711c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:41:23 +0100 Subject: [PATCH 04/12] hyprland: remove lockhelper, use hyprlock directly --- home/hosts/gunter/default.nix | 1 - home/hyprland/default.nix | 15 ++------------- home/hyprland/hypridle_gunter.conf | 12 ------------ home/hyprland/hypridle_magicman.conf | 19 ------------------- home/scripts/lockhelper.nix | 21 --------------------- home/scripts/lockhelper.sh | 21 --------------------- 6 files changed, 2 insertions(+), 87 deletions(-) delete mode 100644 home/hyprland/hypridle_gunter.conf delete mode 100644 home/hyprland/hypridle_magicman.conf delete mode 100644 home/scripts/lockhelper.nix delete mode 100644 home/scripts/lockhelper.sh diff --git a/home/hosts/gunter/default.nix b/home/hosts/gunter/default.nix index 8da9d85..4a4402c 100644 --- a/home/hosts/gunter/default.nix +++ b/home/hosts/gunter/default.nix @@ -55,7 +55,6 @@ ]; hyprland.enableStreamController = true; - hyprland.useLockHelper = true; hyprland.enableGrimblast = true; hyprland.enableWacom = true; hyprland.cursorNoHardware = true; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 0d769b9..815c71d 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -31,8 +31,6 @@ in enableStreamController = mkEnableOption "streamcontroller service"; - useLockHelper = mkEnableOption "use lockhelper script instead of hyprlock directly"; - enableGrimblast = mkEnableOption "grimblast screenshot keybinds"; enableWacom = mkEnableOption "Wacom tablet device configuration"; @@ -108,11 +106,7 @@ in enable = true; settings = { general = { - lock_cmd = - if cfg.useLockHelper then - "${pkgs.callPackage ../scripts/lockhelper.nix { }}/bin/lockhelper" - else - "${pkgs.hyprlock}/bin/hyprlock"; + lock_cmd = "${pkgs.hyprlock}/bin/hyprlock"; ignore_dbus_inhibit = false; }; listener = { @@ -297,12 +291,7 @@ in "$mainMod,D,exec,rofi-launcher" "$mainMod,P,exec,rofi-rbw" # hyprlock - "$shiftMainMod,l,exec,${ - if cfg.useLockHelper then - "${pkgs.callPackage ../scripts/lockhelper.nix { }}/bin/lockhelper" - else - "${pkgs.hyprlock}/bin/hyprlock" - }" + "$shiftMainMod,l,exec,${pkgs.hyprlock}/bin/hyprlock" # hyprland "$mainMod,Q,killactive," "CTRLALT,Delete,exit," diff --git a/home/hyprland/hypridle_gunter.conf b/home/hyprland/hypridle_gunter.conf deleted file mode 100644 index 346b64e..0000000 --- a/home/hyprland/hypridle_gunter.conf +++ /dev/null @@ -1,12 +0,0 @@ -general { - lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session) - # unlock_cmd = notify-send "unlock!" # same as above, but unlock - before_sleep_cmd = lockhelper # command ran before sleep - # after_sleep_cmd = # command ran after sleep - ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) -} - -listener { - timeout = 240 # in seconds - on-timeout = lockhelper # command to run when timeout has passed -} diff --git a/home/hyprland/hypridle_magicman.conf b/home/hyprland/hypridle_magicman.conf deleted file mode 100644 index 4fe54f6..0000000 --- a/home/hyprland/hypridle_magicman.conf +++ /dev/null @@ -1,19 +0,0 @@ -general { - lock_cmd = lockhelper # dbus/sysd lock command (loginctl lock-session) - # unlock_cmd = notify-send "unlock!" # same as above, but unlock - before_sleep_cmd = lockhelper # command ran before sleep - # after_sleep_cmd = lockhelper # command ran after sleep - ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) -} - -listener { - timeout = 240 # in seconds - on-timeout = lockhelper # command to run when timeout has passed - # on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired. -} - -listener { - timeout = 900 - on-timeout = systemctl suspend # command to run when timeout has passed - # on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired. -} diff --git a/home/scripts/lockhelper.nix b/home/scripts/lockhelper.nix deleted file mode 100644 index f0c4cf5..0000000 --- a/home/scripts/lockhelper.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - writeShellApplication, - grim, - jq, - gawk, - hyprland, - hyprlock, - procps, -}: -writeShellApplication { - name = "lockhelper"; - runtimeInputs = [ - grim - jq - gawk - hyprland - hyprlock - procps - ]; - text = (builtins.readFile ./lockhelper.sh); -} diff --git a/home/scripts/lockhelper.sh b/home/scripts/lockhelper.sh deleted file mode 100644 index 48573ad..0000000 --- a/home/scripts/lockhelper.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -mkdir -p /tmp/lockscreen || true - -monitor_lines=$(hyprctl monitors -j | jq -r '.[] | select (.name | contains ("DP")) | [.name, .description]| @tsv') - -while IFS= read -r m; do - name=$(echo "$m" | awk -F $'\t' '{print $1}') - sum=$(echo "$m" | awk -F $'\t' '{printf $2}' | sha256sum | awk '{print substr($1,1,8)}') - - grim -o "$name" "/tmp/lockscreen/$sum.png" || true -done <<< "$monitor_lines" - -# Only lock if not already running -if [ -z "$(pgrep hyprlock)" ] -then - exec hyprlock -else - echo "Already locked" -fi From d75a711f9564ed4e6bd89cd58a2c046fa0b21be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:45:39 +0100 Subject: [PATCH 05/12] hyprland: remove lockMonitorNames option --- home/hosts/gunter/default.nix | 7 ------- home/hyprland/default.nix | 32 ++++++++++++-------------------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/home/hosts/gunter/default.nix b/home/hosts/gunter/default.nix index 4a4402c..919fcc4 100644 --- a/home/hosts/gunter/default.nix +++ b/home/hosts/gunter/default.nix @@ -79,13 +79,6 @@ "$mon_right" = "desc:Samsung Electric Company LS27A600U HNMT502390"; }; - hyprland.lockMonitorNames = [ - "BNQ G2420HDBL T2B04424SL000" - "Samsung Electric Company LS27A600U HNMT502389" - "Acer Technologies XB271HU #ASPVEKfgZ8Dd" - "Samsung Electric Company LS27A600U HNMT502390" - ]; - hyprland.extraKeybinds = [ "$mainMod,Print,exec,grimblast save active ~/tmp/$(date -Iseconds).png" "$shiftMainMod,Print,exec,grimblast copy area" diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 815c71d..b6f2f5b 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -44,16 +44,6 @@ in description = "Extra keybinds for Hyprland"; }; - lockMonitorNames = mkOption { - type = types.listOf (types.nullOr types.str); - default = [ null ]; - example = [ - "desc:BNQ G2420HDBL T2B04424SL000" - "desc:Samsung Electric Company LS27A600U HNMT502389" - ]; - description = "Monitor names for hyprlock backgrounds (null for all monitors)"; - }; - extraWorkspaces = mkOption { type = types.listOf types.str; default = [ ]; @@ -120,16 +110,18 @@ in programs.hyprlock = { enable = true; settings = { - background = map (mon: { - monitor = if mon == null then "" else "desc:${mon}"; - path = "screenshot"; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 3; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.0; - }) cfg.lockMonitorNames; + background = [ + { + monitor = ""; + path = "screenshot"; + color = "rgba(17, 17, 17, 1.0)"; + blur_passes = 3; + contrast = 0.8916; + brightness = 0.8172; + vibrancy = 0.1696; + vibrancy_darkness = 0.0; + } + ]; general = { grace = 0; From a0995cb8c0003128440a330f7c8d0c66a1518664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:49:49 +0100 Subject: [PATCH 06/12] streamcontroller: move to own module --- home/hosts/gunter/default.nix | 3 +- home/hyprland/default.nix | 22 -------------- home/programs/streamcontroller/default.nix | 35 ++++++++++++++++++++++ 3 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 home/programs/streamcontroller/default.nix diff --git a/home/hosts/gunter/default.nix b/home/hosts/gunter/default.nix index 919fcc4..c7a0bb1 100644 --- a/home/hosts/gunter/default.nix +++ b/home/hosts/gunter/default.nix @@ -26,6 +26,7 @@ ../../programs/kitty ../../programs/obs-studio ../../programs/rofi + ../../programs/streamcontroller ../../programs/tmux ../../programs/vscode ../../scripts @@ -54,8 +55,8 @@ "WLR_NO_HARDWARE_CURSORS,1" ]; - hyprland.enableStreamController = true; hyprland.enableGrimblast = true; + streamcontroller.enable = true; hyprland.enableWacom = true; hyprland.cursorNoHardware = true; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index b6f2f5b..6736732 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -29,8 +29,6 @@ in description = "Extra environment variables for Hyprland"; }; - enableStreamController = mkEnableOption "streamcontroller service"; - enableGrimblast = mkEnableOption "grimblast screenshot keybinds"; enableWacom = mkEnableOption "Wacom tablet device configuration"; @@ -161,26 +159,6 @@ in }; }; - systemd.user.services = mkIf cfg.enableStreamController { - streamcontroller = { - Unit = { - Description = "Streamcontroller service"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - Requisite = [ "graphical-session.target" ]; - }; - - Service = { - ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b"; - Restart = "on-failure"; - }; - - Install = { - WantedBy = [ "graphical-session.target" ]; - }; - }; - }; - wayland.windowManager.hyprland = { enable = true; package = pkgs.hyprland; diff --git a/home/programs/streamcontroller/default.nix b/home/programs/streamcontroller/default.nix new file mode 100644 index 0000000..2e33d58 --- /dev/null +++ b/home/programs/streamcontroller/default.nix @@ -0,0 +1,35 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; +let + cfg = config.streamcontroller; +in +{ + options.streamcontroller = { + enable = mkEnableOption "streamcontroller service"; + }; + + config = mkIf cfg.enable { + systemd.user.services.streamcontroller = { + Unit = { + Description = "Streamcontroller service"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + Requisite = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b"; + Restart = "on-failure"; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + }; +} From 390e5d8dae1fad898d2c8789c317e6a5f4934b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:52:58 +0100 Subject: [PATCH 07/12] hyprland: remove unused config files --- home/hyprland/hyprlock_gunter.conf | 91 ---------------------------- home/hyprland/hyprlock_magicman.conf | 78 ------------------------ home/hyprland/hyprpaper.conf | 1 - home/hyprland/xdg.nix | 9 --- 4 files changed, 179 deletions(-) delete mode 100644 home/hyprland/hyprlock_gunter.conf delete mode 100644 home/hyprland/hyprlock_magicman.conf delete mode 100644 home/hyprland/hyprpaper.conf delete mode 100644 home/hyprland/xdg.nix diff --git a/home/hyprland/hyprlock_gunter.conf b/home/hyprland/hyprlock_gunter.conf deleted file mode 100644 index 168bdc4..0000000 --- a/home/hyprland/hyprlock_gunter.conf +++ /dev/null @@ -1,91 +0,0 @@ -# BACKGROUND -background { - monitor = DP-5 - path = /tmp/lockscreen/DP-5.png - blur_passes = 3 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 -} - -background { - monitor = DP-6 - path = /tmp/lockscreen/DP-6.png - blur_passes = 3 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 -} -background { - monitor = DP-7 - path = /tmp/lockscreen/DP-7.png - blur_passes = 3 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 -} -background { - monitor = DP-8 - path = /tmp/lockscreen/DP-8.png - blur_passes = 3 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 -} - -# GENERAL -general { - no_fade_in = false - grace = 0 - disable_loading_bar = true -} - -# INPUT FIELD -input-field { - monitor = - size = 250, 60 - outline_thickness = 2 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - outer_color = rgba(0, 0, 0, 0) - inner_color = rgba(0, 0, 0, 0.5) - font_color = rgb(200, 200, 200) - fade_on_empty = false - font_family = JetBrains Mono Nerd Font Mono - placeholder_text = Input Password... - hide_input = false - position = 0, -120 - halign = center - valign = center -} - -# TIME -label { - monitor = - text = cmd[update:2000] echo "$(date +"%b %d %H:%M")" - #color = $foreground - color = rgba(255, 255, 255, 0.6) - font_size = 120 - font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, -300 - halign = center - valign = top -} - -## USER -#label { -# monitor = -# text = Hi there, $USER -# color = $foreground -# #color = rgba(255, 255, 255, 0.6) -# font_size = 25 -# font_family = JetBrains Mono Nerd Font Mono -# position = 0, -40 -# halign = center -# valign = center -#} diff --git a/home/hyprland/hyprlock_magicman.conf b/home/hyprland/hyprlock_magicman.conf deleted file mode 100644 index e78a9d3..0000000 --- a/home/hyprland/hyprlock_magicman.conf +++ /dev/null @@ -1,78 +0,0 @@ -source = ~/.cache/wal/colors-hyprland.conf -# BACKGROUND -background { - monitor = - path = /tmp/lockscreen/eDP-1.png - blur_passes = 3 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 -} - -# GENERAL -general { - no_fade_in = false - grace = 0 - disable_loading_bar = true -} - -# INPUT FIELD -input-field { - monitor = - size = 250, 60 - outline_thickness = 2 - dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = true - outer_color = rgba(0, 0, 0, 0) - inner_color = rgba(0, 0, 0, 0.5) - font_color = rgb(200, 200, 200) - fade_on_empty = false - font_family = JetBrains Mono Nerd Font Mono - placeholder_text = Input Password... - hide_input = false - position = 0, -120 - halign = center - valign = center -} - -# TIME -label { - monitor = - text = cmd[update:1000] echo "$(date +"%b %d %H:%M")" - color = $foreground - #color = rgba(255, 255, 255, 0.6) - font_size = 120 - font_family = JetBrains Mono Nerd Font Mono ExtraBold - position = 0, -300 - halign = center - valign = top -} - -## USER -#label { -# monitor = -# text = Hi there, $USER -# color = $foreground -# #color = rgba(255, 255, 255, 0.6) -# font_size = 25 -# font_family = JetBrains Mono Nerd Font Mono -# position = 0, -40 -# halign = center -# valign = center -#} - -# Battery level -label { - monitor = - text = cmd[update:1000] echo "$(batlvl)" - color = $foreground - #color = rgba(255, 255, 255, 0.6) - font_size = 18 - # font_family = JetBrainsMono, Font Awesome 6 Free Solid - font_family = JetBrains Mono Nerd Font Mono - position = 0, -20 - halign = center - valign = bottom -} diff --git a/home/hyprland/hyprpaper.conf b/home/hyprland/hyprpaper.conf deleted file mode 100644 index 4cf552c..0000000 --- a/home/hyprland/hyprpaper.conf +++ /dev/null @@ -1 +0,0 @@ -splash = false diff --git a/home/hyprland/xdg.nix b/home/hyprland/xdg.nix deleted file mode 100644 index 2b71d6a..0000000 --- a/home/hyprland/xdg.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, ... }: -{ - xdg.configFile = { - "hypr/hyprpaper.conf" = { - source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprpaper.conf"; - target = "hypr/hyprpaper.conf"; - }; - }; -} From 86f56d66669f36608d301f61c2f904665dfea3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:57:03 +0100 Subject: [PATCH 08/12] prismo: remove old host references --- .sops.yaml | 6 ----- README.md | 1 - home/prismo.nix | 48 ------------------------------------- secrets/prismo/secrets.yaml | 21 ---------------- 4 files changed, 76 deletions(-) delete mode 100644 home/prismo.nix delete mode 100644 secrets/prismo/secrets.yaml diff --git a/.sops.yaml b/.sops.yaml index 3815c26..6034950 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -2,7 +2,6 @@ keys: - &admin_torjus age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u - &server_gunter age1whxf34vjdndqzwgm7yyaexdm46gdnv9sf3nal7qqyjr0nyhhndlsrmc0g3 - &server_magicman age1stlqqspmt5fepyz35udrwr5avf9zuju79f787p26pu2d2j08yqps2q2t2c - - &server_prismo age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u creation_rules: - path_regex: secrets/[^/]+\.(yaml|json|env|ini|toml) key_groups: @@ -19,11 +18,6 @@ creation_rules: - age: - *admin_torjus - *server_magicman - - path_regex: secrets/prismo/[^/]+\.(yaml|json|env|ini|toml) - key_groups: - - age: - - *admin_torjus - - *server_prismo - path_regex: secrets/torjus/[^/]+\.(yaml|json|env|ini|toml) key_groups: - age: diff --git a/README.md b/README.md index 3945bf7..1fc7696 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,4 @@ Configurations for: * gunter * magicman -* prismo diff --git a/home/prismo.nix b/home/prismo.nix deleted file mode 100644 index b427efa..0000000 --- a/home/prismo.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - pkgs, - inputs, - user, - ... -}: -{ - imports = [ inputs.home-manager.nixosModules.home-manager ]; - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - extraSpecialArgs = { - inherit pkgs inputs user; - }; - users.${user} = - { pkgs, ... }: - { - imports = [ - inputs.sops-nix.homeManagerModules.sops - ./sops - ./editor/neovim - ./programs/firefox - ./programs/tmux - ./programs/dunst - ./programs/kitty - ./programs/rofi - ./programs/obs-studio - ./programs/vscode - ./scripts - ./zsh - ./packages - ./hyprland/hyprland_prismo.nix - ./ssh - ./services/backup-home.nix - ./services/ghettoptt.nix - ]; - firefox.enable = true; - tmux.enable = true; - hyprland.enable = true; - home = { - username = "${user}"; - homeDirectory = "/home/${user}"; - stateVersion = "23.11"; - }; - programs.home-manager.enable = true; - }; - }; -} diff --git a/secrets/prismo/secrets.yaml b/secrets/prismo/secrets.yaml deleted file mode 100644 index 502375c..0000000 --- a/secrets/prismo/secrets.yaml +++ /dev/null @@ -1,21 +0,0 @@ -test: ENC[AES256_GCM,data:MtSN,iv:ag/LDkk0DgE6QPjB/08RhEw3LzQHDOkRH0/4OBn8KUU=,tag:FeiJfjtbd4MCwNmCezH44A==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: - - recipient: age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhaGtaL0tkVFFuTk9ka0Rz - bHRpN0UyZFQxTG1ZSTRxSmI4eHJhbVM1ZWs0Cmx5UkdrSFNsRGU1eWRyU0hEcElH - WWJLWHdNTVR4RVpGYlcwMlJ4b2J5eHcKLS0tIGkrTWpNdVdERHpvaHZRdGxHN1Mr - WDJGWFA1M2kxQ1hHKzRwRTY4WUZwN2MKQIT//FEdXYWfEkI1knDD3uN+KMaIDtmR - H64031YMvAh67fVGekRv72S5DWzrft/Zr2libKpsN7T4G9fxGihhEw== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-10-02T20:56:45Z" - mac: ENC[AES256_GCM,data:WQKHFMPmEvDTHS4eYYVcpsX7j8Xef9SV0VKNAbQh0hnZPMJEll4jtzR8sub2tUEt9/I1PvngXMWz6pPmINwOKRI+L3+gTSdg9QgPiikjE6wDA2qbpv9pd14uH22ABmCjkTeEZ9R+b9KbBl0GtMQof1sdTL9nUDrr9Fyfrr/UXs4=,iv:4DgDhwb2ksh2THtR/H5PiO57vF4yKSZ6FyCjWBqCQQI=,tag:dczk4ZAI8k6dareobGmt/w==,type:str] - pgp: [] - unencrypted_suffix: _unencrypted - version: 3.9.0 From 676a1a6498cf4cae8a90b8573762bb5c56e4762b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 19:58:54 +0100 Subject: [PATCH 09/12] hyprland: remove unused hypridle.nix --- home/hyprland/hypridle.nix | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 home/hyprland/hypridle.nix diff --git a/home/hyprland/hypridle.nix b/home/hyprland/hypridle.nix deleted file mode 100644 index e745c52..0000000 --- a/home/hyprland/hypridle.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - osConfig, - pkgs, - ... -}: -{ - - home.packages = with pkgs; [ hypridle ]; - xdg.configFile = { - "hypr/hypridle.conf" = { - source = config.lib.file.mkOutOfStoreSymlink ./. + "/hypridle_${osConfig.system.name}.conf"; - target = "hypr/hypridle.conf"; - }; - }; -} From 74a585b190d08edc41340fd3432c9bfff876dfba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 20:00:50 +0100 Subject: [PATCH 10/12] i3: remove unused config --- home/i3/default.nix | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 home/i3/default.nix diff --git a/home/i3/default.nix b/home/i3/default.nix deleted file mode 100644 index c035be2..0000000 --- a/home/i3/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - mod = "Mod4"; -in -{ - xsession.windowManager.i3 = { - enable = true; - config = { - modifier = mod; - - keybindings = lib.mkOptionDefault { - "${mod}+Enter" = "exec kitty"; - - # Focus - "${mod}+j" = "focus left"; - "${mod}+k" = "focus down"; - "${mod}+l" = "focus up"; - "${mod}+semicolon" = "focus right"; - - # Move - "${mod}+Shift+j" = "move left"; - "${mod}+Shift+k" = "move down"; - "${mod}+Shift+l" = "move up"; - "${mod}+Shift+semicolon" = "move right"; - - # My multi monitor setup - "${mod}+m" = "move workspace to output DP-2"; - "${mod}+Shift+m" = "move workspace to output DP-5"; - }; - }; - }; -} From 3dc092d22a120ac390a0df5ee79d07b12f590b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 20:04:24 +0100 Subject: [PATCH 11/12] docs: remove stray unicode character --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 6eba75e..5e8df63 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,7 +29,7 @@ This repository contains NixOS configurations for multiple machines using flakes ## Specific Patterns ### Adding a New Program -- DO add to `home/packages` if no nixos or home-manager options are used. +- DO add to `home/packages` if no nixos or home-manager options are used. - DO create a subdirectory in `home/programs/` if nixos or home-manager options are used. - DO `git add` the new configuration files before attempting to build - DON'T add programs directly to user configs unless absolutely necessary From aefa414bf4ea36ca2621160e2bfb139aeb50b541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Fri, 30 Jan 2026 20:13:03 +0100 Subject: [PATCH 12/12] hyprland: import waybar module --- home/hyprland/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 6736732..005a9c4 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -9,6 +9,8 @@ let cfg = config.hyprland; in { + imports = [ ./waybar ]; + options.hyprland = { enable = mkEnableOption "Hyprland";