autoupate
This commit is contained in:
parent
450907a7f4
commit
5a772d3376
1 changed files with 27 additions and 5 deletions
|
|
@ -433,14 +433,36 @@
|
|||
randomizedDelaySec = "45min";
|
||||
flags = [
|
||||
"--print-build-logs"
|
||||
"--commit-lock-file"
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"--update-input"
|
||||
"home-manager"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services."nix-flake-update" = {
|
||||
description = "Update flake.lock and commit";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
WorkingDirectory = "/home/ltadeu6/nixos-config";
|
||||
Environment = [
|
||||
"GIT_AUTHOR_NAME=auto-upgrade"
|
||||
"GIT_AUTHOR_EMAIL=auto-upgrade@localhost"
|
||||
"GIT_COMMITTER_NAME=auto-upgrade"
|
||||
"GIT_COMMITTER_EMAIL=auto-upgrade@localhost"
|
||||
];
|
||||
};
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
/run/current-system/sw/bin/nix flake update --commit-lock-file
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.timers."nix-flake-update" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "02:00";
|
||||
RandomizedDelaySec = "45min";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue