{ config, pkgs, lib, flakeRoot, ... }: let repoWallpaperDir = flakeRoot + "/assets/conf/desktop/wallpaper"; userRelRoot = "nixos_conf/wallpaperstuff"; userAbsRoot = "${config.home.homeDirectory}/${userRelRoot}"; in { ################################# # Install wallpaper daemon ################################# home.packages = [ pkgs.wpaperd ]; ################################# # Copy wallpapers from repo ################################# home.file."${userRelRoot}" = { source = repoWallpaperDir; recursive = true; }; ################################# # Start wpaperd (no config file) ################################# systemd.user.services.wpaperd = { Unit = { Description = "wpaperd wallpaper daemon"; After = [ "graphical-session.target" ]; }; Service = { ExecStart = "${pkgs.wpaperd}/bin/wpaperd"; Restart = "on-failure"; }; Install.WantedBy = [ "default.target" ]; }; ################################# # Hyprland workspace → wallpaper ################################# wayland.windowManager.hyprland = { enable = true; extraConfig = '' # Workspace wallpaper bindings # bind = $mainMod, 1, exec, hyprctl dispatch workspace 1 && wpaperctl set ${userAbsRoot}/wallpaper1.jpg # bind = $mainMod, 2, exec, hyprctl dispatch workspace 2 && wpaperctl set ${userAbsRoot}/wallpaper2.jpg # bind = $mainMod, 3, exec, hyprctl dispatch workspace 3 && wpaperctl set ${userAbsRoot}/wallpaper3.jpg # bind = $mainMod, 4, exec, hyprctl dispatch workspace 4 && wpaperctl set ${userAbsRoot}/wallpaper4.jpg # bind = $mainMod, 5, exec, hyprctl dispatch workspace 5 && wpaperctl set ${userAbsRoot}/wallpaper5.jpg # bind = $mainMod, 6, exec, hyprctl dispatch workspace 6 && wpaperctl set ${userAbsRoot}/wallpaper6.jpg # bind = $mainMod, 7, exec, hyprctl dispatch workspace 7 && wpaperctl set ${userAbsRoot}/wallpaper7.jpg # bind = $mainMod, 8, exec, hyprctl dispatch workspace 8 && wpaperctl set ${userAbsRoot}/wallpaper8.jpg # bind = $mainMod, 9, exec, hyprctl dispatch workspace 9 && wpaperctl set ${userAbsRoot}/wallpaper9.jpg ''; }; }