From dddc63b587306b8dbe6c720b00e0d0bb7a12c3f9 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Tue, 17 Mar 2026 18:14:12 +0000 Subject: [PATCH] new wallpaperthingie --- .../decorations/rotating_wallpaper.nix | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix index ad59d6ede..088c43d9b 100644 --- a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix +++ b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix @@ -11,6 +11,7 @@ let cfg = config.wallpaper; sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff"; + targetDir = "/home/${user.username}/Droidnix/wallpaperstuff"; in { options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup"; @@ -18,22 +19,33 @@ in config = lib.mkIf cfg.enable { home-manager.users.${user.username} = { + # + # ✅ Install wpaperd + # home.packages = with pkgs; [ wpaperd ]; # - # 🔥 Copy entire wallpaper directory into HOME - # - home.file."Droidnix/wallpaperstuff" = { - source = sourceDir; - recursive = true; - }; - - # - # 🔥 wpaperd config + # ✅ Ensure config exists # xdg.configFile."wpaperd/config.toml".source = "${sourceDir}/wallpaper.conf"; + + # + # 🔥 One-time (non-destructive) copy + # + home.activation.setupWallpapers = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + echo "=== Wallpaper setup ===" + + mkdir -p "${targetDir}" + + if [ ! -d "${targetDir}/pictures" ]; then + echo "Initializing wallpaper directory..." + cp -r ${sourceDir}/* "${targetDir}/" + else + echo "Wallpaper directory already exists, skipping copy" + fi + ''; }; }; }