Merge remote-tracking branch 'origin/nixos' into nixos

This commit is contained in:
Moritz Böhme 2023-08-16 16:48:03 +02:00
commit d2d898650f
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
5 changed files with 139 additions and 1 deletions

View file

@ -78,6 +78,7 @@ in
};
};
};
timers.enable = true;
wireguard.enable = true;
};
};

View file

@ -0,0 +1,32 @@
{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.services.timers;
in
{
options.my.services.timers.enable = mkEnableOption "timers";
options.my.services.timers.package = mkOption {
type = types.package;
default = pkgs.timers;
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.timers-daemon = {
after = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Restart = "always";
RestartSec = "1s";
ExecStart = "${getExe cfg.package} daemon";
};
};
};
}