diff --git a/modules/desktop.nix b/modules/desktop.nix index fa0f1b4a..c674fedd 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -9,7 +9,6 @@ let inherit (lib.types) float int; inherit (config.modules.system) username; - inherit (config.lib.stylix.colors.withHashtag) base00; inherit (nix-config.packages.${pkgs.system}) aleo-fonts; inherit (builtins) attrValues; @@ -34,22 +33,10 @@ let noto-fonts-cjk-sans maple-mono noto-fonts-emoji - stdenvNoCC - imagemagick ; - stylix-background = stdenvNoCC.mkDerivation { - pname = "stylix-background"; - version = base00; - - dontUnpack = true; - - nativeBuildInputs = [ imagemagick ]; - - postInstall = '' - mkdir -p $out - magick -size 1x1 xc:${base00} $out/wallpaper.png - ''; + stylix-background = pkgs.callPackage ../packages/stylix-background.nix { + color = config.lib.stylix.colors.base00; }; cfg = config.modules.desktop; diff --git a/packages/stylix-background.nix b/packages/stylix-background.nix new file mode 100644 index 00000000..c21249a5 --- /dev/null +++ b/packages/stylix-background.nix @@ -0,0 +1,19 @@ +{ + stdenvNoCC, + imagemagick, + color ? "181818", +}: + +stdenvNoCC.mkDerivation { + pname = "stylix-background"; + version = "1.0.0-${color}"; + + dontUnpack = true; + + nativeBuildInputs = [ imagemagick ]; + + postInstall = '' + mkdir -p $out + magick -size 1x1 xc:#${color} $out/wallpaper.png + ''; +}