new wallpaperthingie

This commit is contained in:
2026-03-17 21:21:35 +00:00
parent a09ea6f1d1
commit dee79796fd
@@ -7,29 +7,34 @@
}: }:
let let
user = "henrov"; # your username
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff"; wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "$HOME/.config/wpaperd"; wallpaperTarget = "/home/${user}/.config/wpaperd";
in in
{ {
# Install wpaperd system-wide
environment.systemPackages = with pkgs; [ wpaperd ]; environment.systemPackages = with pkgs; [ wpaperd ];
# User systemd service (runs on login)
systemd.user.services.wpaperd = { systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon"; description = "wpaperd wallpaper daemon";
after = [ "default.target" ];
# Will run after graphical login
after = [ "graphical.target" ];
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
# Copy config first, then run wpaperd
# Copy config before starting
ExecStartPre = '' ExecStartPre = ''
mkdir -p "${wallpaperTarget}" mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}" cp -rT "${wallpaperSource}" "${wallpaperTarget}"
rsync -av --no-group --no-owner "${wallpaperSource}/" "$HOME/Droidnix/" rsync -av --no-group --no-owner "${wallpaperSource}/" "/home/${user}/Droidnix/"
''; '';
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml"; ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 1; RestartSec = 1;
User = "${user}"; # Run as your user
WorkingDirectory = "/home/${user}";
}; };
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];