profiles/dev: add timer for profile upgrade service

This commit is contained in:
Gabriel Arazas 2022-10-10 11:41:16 +08:00
parent 267df4029e
commit 6cb95c3a2a

View File

@ -83,14 +83,26 @@ in {
act # Finally, a local environment for testing GitHub workflows.
];
systemd.user.services.upgrade-nix-profile = {
systemd.user.services.nix-upgrade-profile = {
description = ''
Update packages installed through 'nix profile'.
Update service for user-specific Nix profile
'';
documentation = [ "man:nix3-profile(1)" ];
script = "nix profile upgrade '.*'";
path = [ config.nix.package ];
startAt = "weekly";
};
systemd.user.timers.nix-upgrade-profile = {
description = ''
Update service for user-specific Nix profile
'';
wantedBy = [ "default.target" ];
timerConfig = {
Persistent = true;
RandomizedDelaySec = 50;
};
};
})
(lib.mkIf cfg.shell.enable {