new wallpaperthingie

This commit is contained in:
2026-03-17 21:25:50 +00:00
parent dee79796fd
commit 4171c71c87
@@ -1,40 +1,27 @@
{ { pkgs, home, ... }:
config,
pkgs,
lib,
flakeRoot,
...
}:
let let
user = "henrov"; # your username wallpaperSource = "${builtins.getFlake "path:${./assets/hyprland/wallpaperstuff}"}";
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff"; wallpaperTarget = "$HOME/.config/wpaperd";
wallpaperTarget = "/home/${user}/.config/wpaperd";
in in
{ {
environment.systemPackages = with pkgs; [ wpaperd ]; home.packages = [ pkgs.wpaperd ];
systemd.user.services.wpaperd = { home.file.".config/wpaperd/wallpaper.toml".source = "${wallpaperSource}/wallpaper.toml";
home.file.".config/wpaperd/".source = wallpaperSource;
home.sessionVariables.DROIDNIX_PATH = "$HOME/Droidnix";
home.systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon"; description = "wpaperd wallpaper daemon";
# Will run after graphical login
after = [ "graphical.target" ]; after = [ "graphical.target" ];
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
# Copy config before starting
ExecStartPre = ''
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
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" ];