From 9499aa240e5ad0d040e52bd9732619350fc0b950 Mon Sep 17 00:00:00 2001 From: aristote Date: Mon, 18 Dec 2023 16:16:28 +0100 Subject: nixos & home: use commmon wallpaper by default --- modules/nixos/personal/gui.nix | 43 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'modules/nixos/personal') 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; + }; }; - }; - })) + })) ]); } -- cgit v1.2.3 From 29f64105bca9f528d2b9812cb7d490a27c6a2633 Mon Sep 17 00:00:00 2001 From: aristote Date: Mon, 18 Dec 2023 17:04:26 +0100 Subject: pkgs: wallpapers: change options --- modules/nixos/personal/gui.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/nixos/personal') diff --git a/modules/nixos/personal/gui.nix b/modules/nixos/personal/gui.nix index 6e2a5d7..88f8fa2 100644 --- a/modules/nixos/personal/gui.nix +++ b/modules/nixos/personal/gui.nix @@ -5,7 +5,7 @@ ... } @ 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; -- cgit v1.2.3