Files
Gabriel Fontes a37004c48e refactor(wallpapers): move collection under pkgs
Import the collection through pkgs/default.nix while preserving the combined Hydra derivation and per-wallpaper attributes.

Assisted-by: pi (openai-codex/gpt-5.6-sol)
2026-07-13 10:26:24 -03:00

21 lines
704 B
Nix

# My wallpaper collection. Each wallpaper is fetched from imgur and carries a
# precomputed `sourceColor` (matugen's extracted seed) in passthru, so the
# colorscheme can be generated purely (no image decoding / IFD at eval time).
# Regenerate seeds with the helper in modules/home-manager/colors.nix notes.
{pkgs}: let
inherit (pkgs) lib;
mk = w:
(pkgs.fetchurl {
inherit (w) sha256;
name = "${w.name}.${w.ext}";
url = "https://i.imgur.com/${w.id}.${w.ext}";
})
.overrideAttrs (old: {
passthru = (old.passthru or {}) // {inherit (w) sourceColor;};
});
in
lib.listToAttrs (map (w: {
inherit (w) name;
value = mk w;
}) (lib.importJSON ./list.json))