new wallpaperthingie

This commit is contained in:
2026-03-17 18:05:34 +00:00
parent 32eafdb4d8
commit bdc3d72f91
@@ -19,24 +19,31 @@ in
}; };
config = lib.mkIf config.wallpaper.enable { config = lib.mkIf config.wallpaper.enable {
# Ensure the script is executable
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 = {
echo "=== Activation Script Running ===" description = "Copy wallpapers and set up wpaperd";
echo "Script path: ${script_path}" script = ''
if [ -f "${script_path}" ]; then echo "=== Activation Script Running ==="
echo "Script exists, executing..." echo "Script path: ${script_path}"
"${script_path}" if [ -f "${script_path}" ]; then
else echo "Script exists, executing..."
echo "ERROR: Script does not exist at ${script_path}" chmod +x "${script_path}"
exit 1 "${script_path}"
fi else
''; echo "ERROR: Script does not exist at ${script_path}"
exit 1
fi
'';
};
# Install wpaperd # Install wpaperd
home-manager.users.${config.home.username}.home.packages = with pkgs; [ wpaperd ]; home-manager.users.${config.home.username}.home.packages = with pkgs; [ wpaperd ];
# Configure wpaperd using home.file # Create the config directory and file for wpaperd
home-manager.users.${config.home.username}.home.file.".config/wpaperd/config.toml".text = home-manager.users.${config.home.username}.xdg.configFile."wpaperd/config.toml".text =
builtins.readFile "${wallpaper_conf}"; builtins.readFile "${wallpaper_conf}";
}; };
} }