new wallpaperthingie

This commit is contained in:
2026-03-17 20:38:24 +00:00
parent 676c24daac
commit 1395f17fc2
3 changed files with 28 additions and 7 deletions
+1 -1
View File
@@ -814,7 +814,7 @@ in
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.conf'"; ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml'";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 1; RestartSec = 1;
}; };
@@ -2,21 +2,42 @@
config, config,
pkgs, pkgs,
lib, lib,
user,
flakeRoot, flakeRoot,
... ...
}: }:
let let
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff"; wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "$HOME/.config/wpaperd";
in in
{ {
home-manager.users.${user.username} = { # Install wpaperd system-wide
programs.wpaperd.enable = true; environment.systemPackages = with pkgs; [ wpaperd ];
xdg.configFile."wpaperd/wallpaper.conf".source = "${wallpaperSource}/wpaperd-runtime.toml"; # Activation script: copy wallpapers & config to ~/.config/wpaperd
system.activationScripts.copyWpaperdConfig = {
text = ''
echo "=== Copying wpaperd config to $HOME/.config/wpaperd ==="
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
echo "Done."
'';
deps = [ ];
};
# Copy the rest of the folder (if needed) # User systemd service (runs on login)
home.file.".config/wpaperd/".source = wallpaperSource; systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
after = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.toml'";
Restart = "on-failure";
RestartSec = 1;
};
wantedBy = [ "default.target" ];
enable = true;
}; };
} }