nixos-configuration/modules/programs/hyprpaper.nix
2025-03-21 02:00:29 +01:00

25 lines
505 B
Nix
Executable file

{
lib,
config,
...
}: {
options = {
hyprpaper.wallpaper = lib.mkOption {
description = "Path to the wallpaper that should be used";
default = "";
};
};
config = {
xdg.configFile."hypr/hyprpaper.conf".text =
# if builtins.pathExists config.hyprpaper.wallpaper then
if config.stylix.enable
then "
preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image}
"
else "";
services.hyprpaper.enable = true;
};
}