new wallpaperthingie
This commit is contained in:
+20
-13
@@ -782,16 +782,11 @@ Finally, it creates a systemd user service (wpaperd.service) that automatically
|
|||||||
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, config, pkgs, flakeRoot, ... }:
|
{ lib, config, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
builtins.trace (lib.concatStringsSep "\n" [
|
|
||||||
"=== Wallpaper Module Loaded ==="
|
|
||||||
"Module path: ${toString __curFile}"
|
|
||||||
"=== End of Module Load Trace ==="
|
|
||||||
]);
|
|
||||||
|
|
||||||
let
|
let
|
||||||
# Define source and destination paths
|
# Define source and destination paths
|
||||||
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||||
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
||||||
|
script_path = "${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh";
|
||||||
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
||||||
|
|
||||||
# Define the script in the let block
|
# Define the script in the let block
|
||||||
@@ -812,25 +807,36 @@ let
|
|||||||
rsync -av --no-group --no-owner "$SOURCE_DIR/" "$DEST_DIR/"
|
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."
|
echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files."
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Print the script contents during the build
|
||||||
|
_ = builtins.trace (lib.concatStringsSep "\n" [
|
||||||
|
"=== Contents of copy-wallpapers.sh ==="
|
||||||
|
copy_wallpapers_script
|
||||||
|
"=== End of copy-wallpapers.sh ==="
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.wallpaper.enable {
|
config = lib.mkIf config.wallpaper.enable {
|
||||||
# Write the script to a file for inspection
|
# Print the script contents again in the config block to ensure it's visible
|
||||||
home-manager.users.${config.home.username}.home.file."~/copy-wallpapers_debug.sh".text = copy_wallpapers_script;
|
_ = builtins.trace (lib.concatStringsSep "\n" [
|
||||||
home-manager.users.${config.home.username}.home.file."~/copy-wallpapers_debug.sh".executable = true;
|
"=== 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
|
# Use a script to copy all files from source to destination
|
||||||
home-manager.users.${config.home.username}.home.file."${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh".text = copy_wallpapers_script;
|
home-manager.users.${config.home.username}.home.file."${script_path}".text = copy_wallpapers_script;
|
||||||
home-manager.users.${config.home.username}.home.file."${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh".executable = true;
|
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true;
|
||||||
|
|
||||||
# Run the script on activation
|
# Run the script on activation
|
||||||
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
||||||
"${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh"
|
echo "=== Activation Script Running ==="
|
||||||
|
cat "${script_path}"
|
||||||
|
"${script_path}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Install wpaperd
|
# Install wpaperd
|
||||||
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
||||||
|
|
||||||
@@ -838,6 +844,7 @@ in {
|
|||||||
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =generated/hyprland/notifications/top.nix=
|
** =generated/hyprland/notifications/top.nix=
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
{ lib, config, pkgs, flakeRoot, ... }:
|
{ lib, config, pkgs, flakeRoot, ... }:
|
||||||
|
|
||||||
builtins.trace (lib.concatStringsSep "\n" [
|
|
||||||
"=== Wallpaper Module Loaded ==="
|
|
||||||
"Module path: ${toString __curFile}"
|
|
||||||
"=== End of Module Load Trace ==="
|
|
||||||
]);
|
|
||||||
|
|
||||||
let
|
let
|
||||||
# Define source and destination paths
|
# Define source and destination paths
|
||||||
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||||
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
|
||||||
|
script_path = "${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh";
|
||||||
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
||||||
|
|
||||||
# Define the script in the let block
|
# Define the script in the let block
|
||||||
@@ -30,25 +25,36 @@ let
|
|||||||
rsync -av --no-group --no-owner "$SOURCE_DIR/" "$DEST_DIR/"
|
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."
|
echo "Config files copied from $SOURCE_DIR to $DEST_DIR. Symlinks replaced with editable files."
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Print the script contents during the build
|
||||||
|
_ = builtins.trace (lib.concatStringsSep "\n" [
|
||||||
|
"=== Contents of copy-wallpapers.sh ==="
|
||||||
|
copy_wallpapers_script
|
||||||
|
"=== End of copy-wallpapers.sh ==="
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.wallpaper.enable {
|
config = lib.mkIf config.wallpaper.enable {
|
||||||
# Write the script to a file for inspection
|
# Print the script contents again in the config block to ensure it's visible
|
||||||
home-manager.users.${config.home.username}.home.file."~/copy-wallpapers_debug.sh".text = copy_wallpapers_script;
|
_ = builtins.trace (lib.concatStringsSep "\n" [
|
||||||
home-manager.users.${config.home.username}.home.file."~/copy-wallpapers_debug.sh".executable = true;
|
"=== 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
|
# Use a script to copy all files from source to destination
|
||||||
home-manager.users.${config.home.username}.home.file."${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh".text = copy_wallpapers_script;
|
home-manager.users.${config.home.username}.home.file."${script_path}".text = copy_wallpapers_script;
|
||||||
home-manager.users.${config.home.username}.home.file."${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh".executable = true;
|
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true;
|
||||||
|
|
||||||
# Run the script on activation
|
# Run the script on activation
|
||||||
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = ''
|
||||||
"${flakeRoot}/assets/hyprland/scripts/copy-wallpapers.sh"
|
echo "=== Activation Script Running ==="
|
||||||
|
cat "${script_path}"
|
||||||
|
"${script_path}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Install wpaperd
|
# Install wpaperd
|
||||||
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user