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 = {
description = "Copy wallpapers and set up wpaperd";
script = ''
echo "=== Activation Script Running ===" echo "=== Activation Script Running ==="
echo "Script path: ${script_path}" echo "Script path: ${script_path}"
if [ -f "${script_path}" ]; then if [ -f "${script_path}" ]; then
echo "Script exists, executing..." echo "Script exists, executing..."
chmod +x "${script_path}"
"${script_path}" "${script_path}"
else else
echo "ERROR: Script does not exist at ${script_path}" echo "ERROR: Script does not exist at ${script_path}"
exit 1 exit 1
fi 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}";
}; };
} }