new wallpaperthingie

This commit is contained in:
2026-03-17 20:56:56 +00:00
parent 2f9e3739f2
commit 9263b36f36
2 changed files with 27 additions and 13 deletions
+14 -7
View File
@@ -776,15 +776,21 @@ This is top file of this level which contains just an import statement for all r
#+END_SRC
** =generated/hyprland/decorations/rotating_wallpaper.nix=
rotating_wallpaper.nix installs wpaperd and deploys your wallpaper files from the repo (./assets/copy_2_root/wallpaperstuff/) into ~/wallpaperstuff/.
rotating_wallpaper.nix installs wpaperd and deploys your wallpaper files from the repo (./assets/hyprland/wallpaperstuff/) into ~/Droidnix/wallpaperstuff/.
You can edit assets/hyprland/wallpaperstuff/wallpaper.toml to change settings
Finally, it creates a systemd user service (wpaperd.service) that automatically starts wpaperd at login and keeps it running, using your override config so wallpapers rotate according to your settings.
#+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
{ config, pkgs, lib, flakeRoot, ... }:
{
config,
pkgs,
lib,
flakeRoot,
...
}:
let
wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
wallpaperTarget = "${config.home.homeDirectory}/.config/wpaperd";
wallpaperTarget = "$HOME/.config/wpaperd";
in
{
# Install wpaperd system-wide
@@ -793,19 +799,19 @@ in
# Activation script: copy wallpapers & config to ~/.config/wpaperd
system.activationScripts.copyWpaperdConfig = {
text = ''
echo "=== Copying wpaperd config to ${wallpaperTarget} ==="
echo "=== Copying wpaperd config to $HOME/.config/wpaperd ==="
mkdir -p "${wallpaperTarget}"
cp -rT "${wallpaperSource}" "${wallpaperTarget}"
chmod -R 755 "${wallpaperTarget}"
rsync -av --no-group --no-owner "${wallpaperSource}/" "$HOME/Droidnix/"
echo "Config files copied from $SOURCE_DIR to $HOME/Droidnix/."
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 = {
@@ -815,6 +821,7 @@ in
RestartSec = 1;
};
wantedBy = [ "default.target" ];
enable = true;
};
}