autoupate

This commit is contained in:
ltadeu6 2026-04-02 11:12:05 -03:00
parent 450907a7f4
commit 5a772d3376

View file

@ -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";