new wallpaperthingie

This commit is contained in:
2026-03-17 18:58:11 +00:00
parent cd70d828d3
commit af514968de
@@ -2,45 +2,21 @@
config,
pkgs,
lib,
user,
flakeRoot,
...
}:
let
wallpaperSource = "${config.home.homeDirectory}/.config/wpaperd-source"; # or flakeRoot path
wallpaperTarget = "${config.home.homeDirectory}/.config/wpaperd";
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
in
{
home.packages = [ pkgs.wpaperd ];
home-manager.users.${user.username} = {
programs.wpaperd.enable = true;
home.file.".config/wpaperd/wallpaper.conf".source = "${wallpaperSource}/wallpaper.conf";
xdg.configFile."wpaperd/wallpaper.conf".source = "${wallpaperSource}/wallpaper.conf";
home.activation.copyWpaperd = lib.homeManager.activationScript {
name = "copy-wpaperd";
text = ''
echo "=== Copying wpaperd source to ${wallpaperTarget} ==="
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
echo "Done."
'';
# Copy the rest of the folder (if needed)
home.file.".config/wpaperd/".source = wallpaperSource;
};
home.sessionVariables = {
WPAPERD_CONFIG = "${wallpaperTarget}/wallpaper.conf";
};
# User-level service
home.file.".config/systemd/user/wpaperd.service".text = ''
[Unit]
Description=wpaperd wallpaper daemon
After=default.target
[Service]
Type=simple
ExecStart=${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.conf
Restart=on-failure
RestartSec=1
[Install]
WantedBy=default.target
'';
}