nixos/pkgs/wallpapers.nix

22 lines
393 B
Nix
Raw Normal View History

{
srcs,
runCommandLocal,
rootPath,
2025-07-11 04:21:18 +08:00
lib,
2025-07-13 06:04:55 +08:00
}:
let
wallpapers =
with lib;
2025-11-07 23:54:49 +08:00
pipe srcs [
(filterAttrs (name: _value: hasPrefix "wallpaper" name))
(concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}"))
];
2025-07-11 04:21:18 +08:00
in
runCommandLocal "wallpapers" { } ''
2025-07-13 06:04:55 +08:00
mkdir -p $out
2025-07-13 06:04:55 +08:00
${wallpapers}
2025-07-11 04:21:18 +08:00
2025-07-13 06:04:55 +08:00
ln -s ${rootPath + "/assets/wallpaper/01.png"} $out/01.png
''