new wallpaperthingie

This commit is contained in:
2026-03-17 17:56:04 +00:00
parent 16cf8aaeea
commit ecd264ac03
@@ -6,18 +6,9 @@ let
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff"; destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh"; script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh";
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf"; wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
in
{
options = {
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
};
config = lib.mkIf config.wallpaper.enable {
# Debug: Print activation message
builtins.trace "=== Wallpaper module is enabled ===";
# Debug: Print paths to verify they're correct # Debug: Print paths to verify they're correct
builtins.trace ( tracePaths = builtins.trace (
lib.concatStringsSep "\n" [ lib.concatStringsSep "\n" [
"=== Wallpaper Module Debug ===" "=== Wallpaper Module Debug ==="
"Source path: ${source_path}" "Source path: ${source_path}"
@@ -27,12 +18,21 @@ in
"=== End of Debug ===" "=== End of Debug ==="
] ]
); );
in
{
options = {
wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
};
config = lib.mkIf config.wallpaper.enable {
# Debug: Print activation message
_ = builtins.trace "=== Wallpaper module is enabled ===";
# Ensure the script is executable # Ensure the script is executable
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true; home-manager.users.${config.home.username}.home.file."${script_path}".executable = true;
# Debug: Print script path # Debug: Print script path
builtins.trace "Script path: ${script_path}"; _ = builtins.trace "Script path: ${script_path}";
# Run the script on activation # Run the script on activation
home-manager.users.${config.home.username}.home.activation.copy-wallpapers = lib.mkMerge [ home-manager.users.${config.home.username}.home.activation.copy-wallpapers = lib.mkMerge [
@@ -55,13 +55,14 @@ in
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ]; home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ];
# Debug: Print wpaperd installation # Debug: Print wpaperd installation
builtins.trace "Installing wpaperd..."; _ = builtins.trace "Installing wpaperd...";
# Configure wpaperd # Configure wpaperd
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = home-manager.users.${config.home.homeDirectory}/.config/wpaperd/config.toml = {
builtins.readFile "${wallpaper_conf}"; text = builtins.readFile "${wallpaper_conf}";
};
# Debug: Print config file path # Debug: Print config file path
builtins.trace "Config file path: ${config.home.homeDirectory}/.config/wpaperd/config.toml"; _ = builtins.trace "Config file path: ${config.home.homeDirectory}/.config/wpaperd/config.toml";
}; };
} }