Files
nixos/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix
T
2026-03-17 18:19:01 +00:00

32 lines
716 B
Nix

{
lib,
config,
flakeRoot,
user,
...
}:
let
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
targetDir = "/home/${user.username}/Droidnix/wallpaperstuff";
in
{
config = {
home-manager.users.${user.username}.home.activation.copyWallpapers =
lib.hm.dag.entryAfter [ "writeBoundary" ]
''
echo "Copying wallpapers..."
mkdir -p "${targetDir}"
# Only copy if empty (so user can manage files later)
if [ -z "$(ls -A "${targetDir}" 2>/dev/null)" ]; then
cp -r ${sourceDir}/* "${targetDir}/"
echo "Wallpapers copied."
else
echo "Directory not empty, skipping."
fi
'';
};
}