new wallpaperthingie

This commit is contained in:
2026-03-17 18:48:17 +00:00
parent 68305e5b4a
commit bd2824a904
+36 -23
View File
@@ -780,37 +780,50 @@ rotating_wallpaper.nix installs wpaperd and deploys your wallpaper files from th
You can edit assets/copy_2_root/wallpaperstuff/wallpaper.conf to change settings You can edit assets/copy_2_root/wallpaperstuff/wallpaper.conf 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. 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 #+BEGIN_SRC nix :tangle generated/hyprland/decorations/rotating_wallpaper.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, flakeRoot, ... }: {
config,
pkgs,
lib,
flakeRoot,
...
}:
let let
# Define source and destination paths wallpaperSource = "${flakeRoot}/assets/hyprland/wallpaperstuff";
source_path = "${flakeRoot}/assets/hyprland/wallpaperstuff"; wallpaperTarget = "$HOME/.config/wpaperd";
destination_path = "${config.home.homeDirectory}/Droidnix/wallpaperstuff"; in
script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh"; {
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf"; # Install wpaperd system-wide
in { environment.systemPackages = with pkgs; [ wpaperd ];
options = {
wallpaper.enable = lib.mkEnableOption "Wallpaper setup"; # 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 = [ ];
}; };
config = lib.mkIf config.wallpaper.enable { # User systemd service (runs on login)
# Ensure the script is executable systemd.user.services.wpaperd = {
home-manager.users.${config.home.username}.home.file."${script_path}".executable = true; description = "wpaperd wallpaper daemon";
after = [ "default.target" ];
# Run the script on activation serviceConfig = {
home-manager.users.${config.home.username}.home.activation.copy-wallpapers.script = '' Type = "simple";
echo "=== Activation Script Running ===" ExecStart = "bash -c '${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperTarget}/wallpaper.conf'";
cat "${script_path}" Restart = "on-failure";
"${script_path}" RestartSec = 1;
''; };
# Install wpaperd wantedBy = [ "default.target" ];
home-manager.users.${config.home.username}.home.packages = [ pkgs.wpaperd ]; enable = true;
# Configure wpaperd
home-manager.users.${config.home.username}.home.file."${config.home.homeDirectory}/.config/wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
}; };
} }
#+END_SRC #+END_SRC
** =generated/hyprland/notifications/top.nix= ** =generated/hyprland/notifications/top.nix=