mirror of
https://github.com/nix-community/home-manager
synced 2024-08-17 01:26:31 +02:00
Home Manager upgrade service that periodically updates your Nix channels before running `home-manager switch`.
19 lines
401 B
Nix
19 lines
401 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
config = {
|
|
services.home-manager.autoUpgrade = {
|
|
enable = true;
|
|
frequency = "00:00";
|
|
};
|
|
|
|
nmt.script = ''
|
|
serviceFile=home-files/.config/systemd/user/home-manager-auto-upgrade.service
|
|
assertFileExists $serviceFile
|
|
|
|
timerFile=home-files/.config/systemd/user/home-manager-auto-upgrade.timer
|
|
assertFileExists $timerFile
|
|
'';
|
|
};
|
|
}
|