diff --git a/nix/configurations.nix b/nix/configurations.nix index 1d27ceb..a8040c1 100644 --- a/nix/configurations.nix +++ b/nix/configurations.nix @@ -10,13 +10,10 @@ let inherit (lib.attrsets) mapAttrs; inherit (cfg.lib.modules) forAllUsers'; cfg = config.flake; - globalCfg = name: hostConfig: { + globalCfg = name: { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { - inherit hostConfig; - hostName = name; - }; + extraSpecialArgs.hostName = name; sharedModules = [ cfg.modules.homeManager.default ]; users = forAllUsers' (name: _: cfg.modules.homeManager.${name}); }; @@ -31,7 +28,7 @@ let modules = [ cfg.modules.nixos.default inputs.home-manager.nixosModules.home-manager - { home-manager = globalCfg name value; } + { home-manager = globalCfg name; } (value.extraCfg or { }) ] ++ optional value.graphical cfg.modules.nixos.graphical; } diff --git a/nix/homes/rafiq/desktop/default.nix b/nix/homes/rafiq/desktop/default.nix index 9eb1fc4..e3e4ef3 100644 --- a/nix/homes/rafiq/desktop/default.nix +++ b/nix/homes/rafiq/desktop/default.nix @@ -65,7 +65,6 @@ in pkgs, config, hostName, - hostConfig, ... }: let @@ -251,20 +250,17 @@ in # Null the packages since we use them system wide package = null; portalPackage = null; + # settings.monitor = [ + # "${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}" + # ]; + settings = mkMerge [ (import ./_hyprland/decoration.nix) (import ./_hyprland/keybinds.nix { inherit pkgs; }) { ecosystem.no_update_news = true; xwayland.force_zero_scaling = true; - monitor = - let - mainMonitor = hostConfig.machine.monitors.main; - in - [ - "${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}" - ", preferred, auto, 1" - ]; + monitor = [ ", preferred, auto, 1" ]; exec-once = [ "uwsm app -- $LOCKSCREEN" "uwsm app -- $NOTIFICATION_DAEMON" diff --git a/nix/manifest.nix b/nix/manifest.nix index 4479b14..aa91702 100644 --- a/nix/manifest.nix +++ b/nix/manifest.nix @@ -14,12 +14,14 @@ platform = "amd"; gpu = "nvidia"; root.drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434"; - monitors.main = { - id = "desc:OOO AN-270W04K"; - resolution = "3840x2160"; - refresh-rate = "60"; - scale = "2"; - }; + monitors = [ + { + id = "desc:OOO AN-270W04K"; + scale = "2"; + resolution = "3840x2160"; + refresh-rate = "60"; + } + ]; }; extraCfg.server.web-apps = { comfy-ui.enable = true; diff --git a/nix/meta.nix b/nix/meta.nix index 0d95bd7..5fee0c7 100644 --- a/nix/meta.nix +++ b/nix/meta.nix @@ -8,6 +8,7 @@ let inherit (lib.options) mkOption mkEnableOption; inherit (cfg.lib.options) mkStrOption; inherit (lib.types) + listOf path lazyAttrsOf raw @@ -17,14 +18,6 @@ let inherit (inputs.flake-parts.lib) mkSubmoduleOptions; inherit (cfg.lib.attrsets) firstAttrNameMatching; cfg = config.flake; - monitorOpts = submodule { - options = { - id = mkStrOption ""; - resolution = mkStrOption ""; - refresh-rate = mkStrOption ""; - scale = mkStrOption ""; - }; - }; userOpts = submodule { options = { username = mkStrOption ""; @@ -43,8 +36,14 @@ let gpu = mkStrOption ""; root.drive = mkStrOption ""; monitors = mkOption { - type = lazyAttrsOf monitorOpts; - default = { }; + type = listOf submodule { + options = { + id = mkStrOption ""; + scale = mkStrOption ""; + resolution = mkStrOption ""; + refresh-rate = mkStrOption ""; + }; + }; }; }; extraCfg = mkOption {