Compare commits

..

No commits in common. "782bbcbaa3958a828997e8c16120585ad62bcf9b" and "2710c71820f4cee99731d8c2c9c5e5d30b69d197" have entirely different histories.

4 changed files with 25 additions and 31 deletions

View file

@ -10,13 +10,10 @@ let
inherit (lib.attrsets) mapAttrs; inherit (lib.attrsets) mapAttrs;
inherit (cfg.lib.modules) forAllUsers'; inherit (cfg.lib.modules) forAllUsers';
cfg = config.flake; cfg = config.flake;
globalCfg = name: hostConfig: { globalCfg = name: {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = { extraSpecialArgs.hostName = name;
inherit hostConfig;
hostName = name;
};
sharedModules = [ cfg.modules.homeManager.default ]; sharedModules = [ cfg.modules.homeManager.default ];
users = forAllUsers' (name: _: cfg.modules.homeManager.${name}); users = forAllUsers' (name: _: cfg.modules.homeManager.${name});
}; };
@ -31,7 +28,7 @@ let
modules = [ modules = [
cfg.modules.nixos.default cfg.modules.nixos.default
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
{ home-manager = globalCfg name value; } { home-manager = globalCfg name; }
(value.extraCfg or { }) (value.extraCfg or { })
] ++ optional value.graphical cfg.modules.nixos.graphical; ] ++ optional value.graphical cfg.modules.nixos.graphical;
} }

View file

@ -65,7 +65,6 @@ in
pkgs, pkgs,
config, config,
hostName, hostName,
hostConfig,
... ...
}: }:
let let
@ -251,20 +250,17 @@ in
# Null the packages since we use them system wide # Null the packages since we use them system wide
package = null; package = null;
portalPackage = null; portalPackage = null;
# settings.monitor = [
# "${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
# ];
settings = mkMerge [ settings = mkMerge [
(import ./_hyprland/decoration.nix) (import ./_hyprland/decoration.nix)
(import ./_hyprland/keybinds.nix { inherit pkgs; }) (import ./_hyprland/keybinds.nix { inherit pkgs; })
{ {
ecosystem.no_update_news = true; ecosystem.no_update_news = true;
xwayland.force_zero_scaling = true; xwayland.force_zero_scaling = true;
monitor = monitor = [ ", preferred, auto, 1" ];
let
mainMonitor = hostConfig.machine.monitors.main;
in
[
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
", preferred, auto, 1"
];
exec-once = [ exec-once = [
"uwsm app -- $LOCKSCREEN" "uwsm app -- $LOCKSCREEN"
"uwsm app -- $NOTIFICATION_DAEMON" "uwsm app -- $NOTIFICATION_DAEMON"

View file

@ -14,12 +14,14 @@
platform = "amd"; platform = "amd";
gpu = "nvidia"; gpu = "nvidia";
root.drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434"; root.drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434";
monitors.main = { monitors = [
{
id = "desc:OOO AN-270W04K"; id = "desc:OOO AN-270W04K";
scale = "2";
resolution = "3840x2160"; resolution = "3840x2160";
refresh-rate = "60"; refresh-rate = "60";
scale = "2"; }
}; ];
}; };
extraCfg.server.web-apps = { extraCfg.server.web-apps = {
comfy-ui.enable = true; comfy-ui.enable = true;

View file

@ -8,6 +8,7 @@ let
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (cfg.lib.options) mkStrOption; inherit (cfg.lib.options) mkStrOption;
inherit (lib.types) inherit (lib.types)
listOf
path path
lazyAttrsOf lazyAttrsOf
raw raw
@ -17,14 +18,6 @@ let
inherit (inputs.flake-parts.lib) mkSubmoduleOptions; inherit (inputs.flake-parts.lib) mkSubmoduleOptions;
inherit (cfg.lib.attrsets) firstAttrNameMatching; inherit (cfg.lib.attrsets) firstAttrNameMatching;
cfg = config.flake; cfg = config.flake;
monitorOpts = submodule {
options = {
id = mkStrOption "";
resolution = mkStrOption "";
refresh-rate = mkStrOption "";
scale = mkStrOption "";
};
};
userOpts = submodule { userOpts = submodule {
options = { options = {
username = mkStrOption ""; username = mkStrOption "";
@ -43,8 +36,14 @@ let
gpu = mkStrOption ""; gpu = mkStrOption "";
root.drive = mkStrOption ""; root.drive = mkStrOption "";
monitors = mkOption { monitors = mkOption {
type = lazyAttrsOf monitorOpts; type = listOf submodule {
default = { }; options = {
id = mkStrOption "";
scale = mkStrOption "";
resolution = mkStrOption "";
refresh-rate = mkStrOption "";
};
};
}; };
}; };
extraCfg = mkOption { extraCfg = mkOption {