From 73f5f40871c89f0f9d64074f2f91a8f9d3fbcc5b Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Tue, 17 Mar 2026 18:19:01 +0000 Subject: [PATCH] new wallpaperthingie --- .../decorations/rotating_wallpaper.nix | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix index 56e74404d..b6025133c 100644 --- a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix +++ b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix @@ -7,30 +7,25 @@ }: let - cfg = config.wallpaper; - sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff"; targetDir = "/home/${user.username}/Droidnix/wallpaperstuff"; in { - options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup"; + config = { + home-manager.users.${user.username}.home.activation.copyWallpapers = + lib.hm.dag.entryAfter [ "writeBoundary" ] + '' + echo "Copying wallpapers..." - config = lib.mkIf cfg.enable { - home-manager.users.${user.username} = { + mkdir -p "${targetDir}" - home.activation.copyWallpapers = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - echo "=== Copying wallpapers ===" - - mkdir -p "${targetDir}" - - # Copy ONLY if directory is empty (so user can manage files later) - if [ -z "$(ls -A "${targetDir}" 2>/dev/null)" ]; then - echo "Directory empty → copying initial files" - cp -r ${sourceDir}/* "${targetDir}/" - else - echo "Directory not empty → skipping copy" - fi - ''; - }; + # 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 + ''; }; }