1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

hold overlays correctly

This commit is contained in:
2026-02-10 22:02:34 +01:00
parent 8c6363881d
commit c6a11c1d79
9 changed files with 68 additions and 90 deletions

View File

@@ -20,39 +20,9 @@
nixpkgs.overlays = [
(final: prev: {
niphas-wallpaper =
let
backgroundColor = config.lib.stylix.colors.withHashtag.base06;
foregroundColor = config.lib.stylix.colors.withHashtag.base01;
width = 1920;
height = 1080;
svgUrl = "https://applicative.systems/_astro/logo-full.D8zRvqBZ.svg";
logoSvg = prev.fetchurl {
url = svgUrl;
hash = "sha256-qXDIEZsAPn4eUJ3kb5U6L3PMUCtWGYqhqyIaBt7FntE=";
};
in
prev.runCommand "applicative-wallpaper.png"
{
nativeBuildInputs = [ prev.imagemagick ];
}
''
# 1. We use -background to set the canvas color
# 2. We use -fuzz and -opaque to replace the logo's internal colors
# 3. We use -gravity and -extent to center it on a wallpaper-sized canvas
convert \
-background none \
-density 300 \
"${logoSvg}" \
-fuzz 100% -fill "${foregroundColor}" -opaque black \
-resize 800x800 \
-gravity center \
-background "${backgroundColor}" \
-extent ${toString width}x${toString height} \
$out
'';
niphas-wallpaper = prev.callPackage ../packages/applicative-wallpaper.nix {
inherit (config.lib.stylix) colors;
};
})
];