meta: Move stylix-background to separate package

Long-term this won't be necessary once backgrounds become optional in
stylix.
This commit is contained in:
Donovan Glover 2024-08-29 01:19:22 -04:00
parent d48d286a40
commit 6116425dea
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 21 additions and 15 deletions

View File

@ -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;

View File

@ -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
'';
}