Add random wallpaper

This commit is contained in:
muon 2025-12-26 13:21:08 +00:00
parent fc14a394aa
commit b1fdab737c
4 changed files with 46 additions and 23 deletions

View file

@ -14,6 +14,7 @@ in {
./productivity.nix
./media.nix
./zen.nix
./theme.nix
];
mods.hyprland.enable = lib.mkIf cfg.wayland.enable true;

View file

@ -0,0 +1,24 @@
{
lib,
config,
...
}: let
cfg = config.mods.theme.slideshow;
in {
options.mods.theme.slideshow = {
enable = lib.mkEnableOption "enables slideshow wallpaper";
folder = lib.mkOption {
default = "%h/misc/pictures/wallpapers";
description = "slideshow wallpaper folder";
};
};
config = lib.mkIf cfg.enable {
services.random-background = lib.mkIf cfg.enable {
enable = true;
imageDirectory = cfg.folder;
enableXinerama = true;
interval = "1s";
};
};
}