diff options
| author | aristote <quentin.aristote@irif.fr> | 2023-12-18 16:16:28 +0100 |
|---|---|---|
| committer | aristote <quentin.aristote@irif.fr> | 2023-12-18 16:16:28 +0100 |
| commit | 9499aa240e5ad0d040e52bd9732619350fc0b950 (patch) | |
| tree | fa4768ab0e11f00817e11caab9c015577ffc98bf /modules/nixos/personal/gui.nix | |
| parent | a56f275e61dc48ec995da1c456ee66a8f4309de6 (diff) | |
nixos & home: use commmon wallpaper by default
Diffstat (limited to 'modules/nixos/personal/gui.nix')
| -rw-r--r-- | modules/nixos/personal/gui.nix | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/modules/nixos/personal/gui.nix b/modules/nixos/personal/gui.nix index 64c732e..6e2a5d7 100644 --- a/modules/nixos/personal/gui.nix +++ b/modules/nixos/personal/gui.nix @@ -1,6 +1,9 @@ -{ config, lib, pkgs, ... }@extraArgs: - -let +{ + config, + lib, + pkgs, + ... +} @ extraArgs: let cfg = config.personal.gui; wallpaper = pkgs.personal.static.wallpapers.nga-1973-68-1; importedStylix = extraArgs ? 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; + }; }; - }; - })) + })) ]); } |
