diff options
Diffstat (limited to 'modules/nixos/personal')
| -rw-r--r-- | modules/nixos/personal/gui.nix | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/modules/nixos/personal/gui.nix b/modules/nixos/personal/gui.nix index 64c732e..88f8fa2 100644 --- a/modules/nixos/personal/gui.nix +++ b/modules/nixos/personal/gui.nix @@ -1,8 +1,11 @@ -{ config, lib, pkgs, ... }@extraArgs: - -let +{ + config, + lib, + pkgs, + ... +} @ extraArgs: let cfg = config.personal.gui; - wallpaper = pkgs.personal.static.wallpapers.nga-1973-68-1; + wallpaper = pkgs.personal.static.wallpapers.nga-1973-68-1.override {gravity = "north";}; importedStylix = extraArgs ? stylix; in { imports = lib.optional importedStylix extraArgs.stylix.nixosModules.stylix; @@ -22,7 +25,7 @@ in { displayManager = { lightdm = { enable = true; - background = lib.mkDefault wallpaper; + background = lib.mkDefault (config.stylix.image or wallpaper); greeters.gtk = { enable = true; extraConfig = '' @@ -56,22 +59,22 @@ in { }; }) (lib.mkIf cfg.stylix.enable ({ - assertions = let - missingArgAssertion = name: { - assertion = lib.hasAttr name extraArgs; - message = - "attribute ${name} missing: add it in lib.nixosSystem's specialArgs, or set config.personal.gui.stylix.enable to false"; - }; - in [ (missingArgAssertion "stylix") ]; - } // lib.optionalAttrs importedStylix { - stylix = { - image = lib.mkDefault wallpaper; - polarity = lib.mkDefault "dark"; - fonts.sizes = { - applications = 10; - desktop = 12; + assertions = let + missingArgAssertion = name: { + assertion = lib.hasAttr name extraArgs; + message = "attribute ${name} missing: add it in lib.nixosSystem's specialArgs, or set config.personal.gui.stylix.enable to false"; + }; + in [(missingArgAssertion "stylix")]; + } + // lib.optionalAttrs importedStylix { + stylix = { + image = lib.mkDefault wallpaper; + polarity = lib.mkDefault "dark"; + fonts.sizes = { + applications = 10; + desktop = 12; + }; }; - }; - })) + })) ]); } |
