From 28996d91daf63199e0acc1607d9811da78188fa6 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Tue, 17 Mar 2026 17:21:09 +0000 Subject: [PATCH] new wallpaperthingie --- Droidnix/README.org | 28 +++++++++++++++++-- .../decorations/rotating_wallpaper.nix | 28 +++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/Droidnix/README.org b/Droidnix/README.org index 6f0c4072a..fd8b952fe 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -792,10 +792,28 @@ let # Define the script in the let block copy_wallpapers_script = '' #!${pkgs.bash}/bin/bash - echo hoi + set -euo pipefail + # Source and destination directories + SOURCE_DIR="${source_path}" + DEST_DIR="${destination_path}" + # Check if source directory exists + if [ ! -d "$SOURCE_DIR" ]; then + echo "Error: Source directory $SOURCE_DIR does not exist." + exit 1 + fi + # Create destination directory if it doesn't exist + mkdir -p "$DEST_DIR" + # Use rsync to copy files, overwriting symlinks and existing files + rsync -av --no-group --no-owner "$SOURCE_DIR/" "$DEST_DIR/" + echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files." ''; - + # Print the script contents during the build + traceScript = builtins.trace (lib.concatStringsSep "\n" [ + "=== Contents of copy-wallpapers.sh ===" + copy_wallpapers_script + "=== End of copy-wallpapers.sh ===" + ]); in { options = { wallpaper.enable = lib.mkEnableOption "Wallpaper setup"; @@ -803,7 +821,11 @@ in { config = lib.mkIf config.wallpaper.enable { # Print the script contents again in the config block to ensure it's visible - + traceScript2 = builtins.trace (lib.concatStringsSep "\n" [ + "=== Contents of copy-wallpapers.sh (in config block) ===" + copy_wallpapers_script + "=== End of copy-wallpapers.sh (in config block) ===" + ]); # Use a script to copy all files from source to destination home-manager.users.${config.home.username}.home.file."${script_path}".text = copy_wallpapers_script; diff --git a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix index 9061aee33..5592f4687 100644 --- a/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix +++ b/Droidnix/generated/hyprland/decorations/rotating_wallpaper.nix @@ -10,10 +10,28 @@ let # Define the script in the let block copy_wallpapers_script = '' #!${pkgs.bash}/bin/bash - echo hoi + set -euo pipefail + # Source and destination directories + SOURCE_DIR="${source_path}" + DEST_DIR="${destination_path}" + # Check if source directory exists + if [ ! -d "$SOURCE_DIR" ]; then + echo "Error: Source directory $SOURCE_DIR does not exist." + exit 1 + fi + # Create destination directory if it doesn't exist + mkdir -p "$DEST_DIR" + # Use rsync to copy files, overwriting symlinks and existing files + rsync -av --no-group --no-owner "$SOURCE_DIR/" "$DEST_DIR/" + echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files." ''; - + # Print the script contents during the build + traceScript = builtins.trace (lib.concatStringsSep "\n" [ + "=== Contents of copy-wallpapers.sh ===" + copy_wallpapers_script + "=== End of copy-wallpapers.sh ===" + ]); in { options = { wallpaper.enable = lib.mkEnableOption "Wallpaper setup"; @@ -21,7 +39,11 @@ in { config = lib.mkIf config.wallpaper.enable { # Print the script contents again in the config block to ensure it's visible - + traceScript2 = builtins.trace (lib.concatStringsSep "\n" [ + "=== Contents of copy-wallpapers.sh (in config block) ===" + copy_wallpapers_script + "=== End of copy-wallpapers.sh (in config block) ===" + ]); # Use a script to copy all files from source to destination home-manager.users.${config.home.username}.home.file."${script_path}".text = copy_wallpapers_script;