nixos/pkgs/wallpapers.nix
2025-11-08 03:55:34 +08:00

20 lines
378 B
Nix

{
srcs,
runCommandLocal,
rootPath,
lib,
}:
let
wallpapers =
with lib;
srcs
|> filterAttrs (name: _value: hasPrefix "wallpaper" name)
|> concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}");
in
runCommandLocal "wallpapers" { } ''
mkdir -p $out
${wallpapers}
ln -s ${rootPath + "/assets/wallpaper/01.png"} $out/01.png
''