diff --git a/homes/x86_64-linux/rafiq/programs/hyprland.nix b/homes/x86_64-linux/rafiq/programs/hyprland.nix index c9861e2..536cbd8 100644 --- a/homes/x86_64-linux/rafiq/programs/hyprland.nix +++ b/homes/x86_64-linux/rafiq/programs/hyprland.nix @@ -1,4 +1,7 @@ {config, lib, osConfig, ...}: +let + mainMonitor = osConfig.desktop.mainMonitor; +in { xdg.configFile."uwsm/env".text = # sh '' @@ -9,6 +12,12 @@ systemd.enable = false; settings = { "$hypr" = "CTRL_SUPER_ALT_SHIFT"; + + monitor = [ + "${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}" + ", preferred, auto, 1" + ]; + bind = [ "$hypr, Q, exec, uwsm stop" "SUPER, W, killactive" diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index a903e7d..2c3327b 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -5,6 +5,12 @@ ]; options.desktop = { + mainMonitor = { + id = lib.pantheon.mkStrOption; + scale = lib.pantheon.mkStrOption; + resolution = lib.pantheon.mkStrOption; + refresh-rate = lib.pantheon.mkStrOption; + }; windowManager = lib.pantheon.mkStrOption; }; } diff --git a/systems/x86_64-linux/nemesis/default.nix b/systems/x86_64-linux/nemesis/default.nix index 22d3ebd..daf5195 100644 --- a/systems/x86_64-linux/nemesis/default.nix +++ b/systems/x86_64-linux/nemesis/default.nix @@ -12,6 +12,12 @@ hardware.gpu = "nvidia"; desktop.windowManager = "hyprland"; + desktop.mainMonitor = { +id = "HDMI-A-1"; +scale = "2"; +resolution = "3840x2160"; +refresh-rate = "60"; + }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }