home: add timer for updating nix channels
This commit is contained in:
parent
5b8500ba96
commit
93e01222a9
@ -24,6 +24,7 @@ in {
|
||||
./programs/zsh
|
||||
|
||||
./services/git-maintenance.nix
|
||||
./services/nix-channel-update.nix
|
||||
|
||||
./modules/colors.nix
|
||||
./modules/shellAliases.nix
|
||||
|
30
home/services/nix-channel-update.nix
Normal file
30
home/services/nix-channel-update.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
# TODO: make these units run per channel
|
||||
systemd.user.timers.update-nix-channels = {
|
||||
Unit = {
|
||||
Description = "Update nix channels";
|
||||
};
|
||||
|
||||
Timer = {
|
||||
Unit = "update-nix-channels.service";
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.update-nix-channels = {
|
||||
Unit = {
|
||||
Description = "Update nix channels";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${config.nix.package}/bin/nix-channel --update --verbose";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user