feat: support new monitor
This commit is contained in:
parent
b234bdbd06
commit
271cbb359b
6 changed files with 139 additions and 58 deletions
26
modules/services/wallpaper.nix
Normal file
26
modules/services/wallpaper.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.services.wallpaper;
|
||||
in
|
||||
{
|
||||
options.my.services.wallpaper = {
|
||||
enable = mkEnableOption "wallpaper changer";
|
||||
frequency = mkOption {
|
||||
type = types.str;
|
||||
default = "30m";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.wallpaper = {
|
||||
script = "${getExe config.my.programs.wallpaper.package} -r -v";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RuntimeMaxSec = cfg.frequency;
|
||||
ExitType = "cgroup";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue