# file: wallpaper-copy.nix { lib, config, pkgs, flakeRoot, ... }: let sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff"; targetDir = "${config.home.homeDirectory}/Droidnix/wallpaperstuff"; in { options.wallpaper.enable = lib.mkEnableOption "Copy wallpaperstuff dir"; config = lib.mkIf config.wallpaper.enable { # Home Manager activation home.activation.copyWallpapers = { description = "Copy wallpaperstuff to ~/Droidnix/wallpaperstuff"; script = '' echo "=== Copying wallpaperstuff ===" mkdir -p "${targetDir}" cp -rT "${sourceDir}" "${targetDir}" echo "Done." ''; }; # Optional NixOS system activation (runs on switch) system.activationScripts.copyWallpapers = { text = '' echo "=== Copying wallpaperstuff (system) ===" mkdir -p "${targetDir}" cp -rT "${sourceDir}" "${targetDir}" echo "Done." ''; deps = [ ]; }; }; }