Files
nixos/Droidnix/generated/modules/desktop/rotating_wallpaper.nix
T
2026-03-19 06:52:10 +00:00

39 lines
984 B
Nix

{ lib, ... }:
{
flake.nixosModules.rotating-wallpaper = { config, pkgs, lib, ... }:
let
wallpaperConf = ../../../assets/hyprland/wallpaperstuff/wallpaper.toml;
in
{
options.mySystem.desktop.wallpaper.enable =
lib.mkEnableOption "Enable rotating wallpaper via wpaperd";
config = lib.mkIf (config.mySystem.desktop.wallpaper.enable or false) {
# Home Manager context
home-manager.users.henrov = {
home.packages = [ pkgs.wpaperd ];
home.file.".config/wpaperd/wallpaper.toml".source =
wallpaperConf;
systemd.user.services.wpaperd = {
description = "wpaperd wallpaper daemon";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart =
"${pkgs.wpaperd}/bin/wpaperd --config ~/.config/wpaperd/wallpaper.toml";
Restart = "on-failure";
RestartSec = 1;
};
};
};
};
};
}