{ lib, config, flakeRoot, pkgs, ... }: let sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff"; targetDir = "${config.home.homeDirectory}/Droidnix/wallpaperstuff"; in { options = { wallpaper.enable = lib.mkEnableOption "Copy wallpaper stuff"; }; config = lib.mkIf config.wallpaper.enable { home-manager.users.${config.home.username}.home.activation.copyWallpapers = { description = "Copy wallpaperstuff to ~/Droidnix/wallpaperstuff"; script = '' 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 ''; }; }; }