new wallpaperthingie
This commit is contained in:
@@ -7,20 +7,14 @@
|
||||
}:
|
||||
|
||||
let
|
||||
# Source wallpaperstuff in the flake
|
||||
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
|
||||
|
||||
# Target in the user home
|
||||
wallpaperTarget = "$HOME/.config/wpaperd";
|
||||
|
||||
# Config file inside the flake
|
||||
wallpaperConf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
|
||||
in
|
||||
{
|
||||
# Install the wpaperd package system-wide
|
||||
# Install wpaperd system-wide
|
||||
environment.systemPackages = with pkgs; [ wpaperd ];
|
||||
|
||||
# Activation script: copy wallpapers & config to user home
|
||||
# Activation script: copy wallpapers & config to ~/.config/wpaperd
|
||||
system.activationScripts.copyWpaperdConfig = {
|
||||
text = ''
|
||||
echo "=== Copying wpaperd config to $HOME/.config/wpaperd ==="
|
||||
@@ -31,24 +25,19 @@ in
|
||||
deps = [ ];
|
||||
};
|
||||
|
||||
# Enable linger so user services can run outside login
|
||||
systemd.enableUserServices = true;
|
||||
systemd.user.enableLinger = true;
|
||||
|
||||
# User systemd service
|
||||
# User systemd service (runs on login)
|
||||
systemd.user.services.wpaperd = {
|
||||
description = "wpaperd wallpaper daemon";
|
||||
after = [ "default.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
# Use bash -c to expand HOME properly
|
||||
ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.conf'";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
|
||||
# Enable the service by default
|
||||
wantedBy = [ "default.target" ];
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user