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
This commit is contained in:
2026-01-30 14:34:51 +01:00
parent f810afce5f
commit 820f3c1fde
9 changed files with 425 additions and 811 deletions

View File

@@ -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}";

View File

@@ -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}";