new wallpaperthingie

This commit is contained in:
2026-03-17 20:47:33 +00:00
parent 1395f17fc2
commit 2f9e3739f2
2 changed files with 15 additions and 26 deletions
@@ -1,14 +1,8 @@
{
config,
pkgs,
lib,
flakeRoot,
...
}:
{ config, pkgs, lib, flakeRoot, ... }:
let
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "$HOME/.config/wpaperd";
wallpaperTarget = "${config.home.homeDirectory}/.config/wpaperd";
in
{
# Install wpaperd system-wide
@@ -17,27 +11,28 @@ in
# Activation script: copy wallpapers & config to ~/.config/wpaperd
system.activationScripts.copyWpaperdConfig = {
text = ''
echo "=== Copying wpaperd config to $HOME/.config/wpaperd ==="
echo "=== Copying wpaperd config to ${wallpaperTarget} ==="
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
chmod -R 755 "${wallpaperTarget}"
echo "Done."
'';
deps = [ ];
deps = [];
};
# User systemd service (runs on login)
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
wantedBy = [ "default.target" ];
after = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml'";
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
};
wantedBy = [ "default.target" ];
enable = true;
};
}