Files
nix-config/modules/nixos/desktop/hyprland/wallpapers/default.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

27 lines
635 B
Nix
Executable File

{
config,
lib,
pkgs,
namespace,
...
}:
let
cfg = config.${namespace}.desktop.hyprland;
in
{
imports = [ ../options.nix ];
# Wire the hyprland wallpaper options through to the shared wallpaper module,
# and provide the hyprctl hot-reload command so hyprpaper picks up the new image.
config = lib.mkIf cfg.enable {
${namespace}.wallpaper = {
inherit (cfg) defaultWallpaper;
enable = true;
source = cfg.wallpaperSource;
path = cfg.wallpaper;
dir = cfg.wallpaperDir;
reloadCommand = "${lib.getExe' pkgs.hyprland "hyprctl"} hyprpaper wallpaper ,${cfg.wallpaper},";
};
};
}