nixos/pkgs/wallpapers.nix

21 lines
378 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;
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
''