Add weekly-rebuild timer
All checks were successful
Run nix flake check / flake-check (push) Successful in 1m51s

This commit is contained in:
Torjus Håkestad 2024-10-12 21:27:02 +02:00
parent 4678f25670
commit 9a96f04d1b
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4
2 changed files with 19 additions and 1 deletions

View File

@ -1,8 +1,10 @@
{ ... }: { { ... }:
{
imports = [ imports = [
./sops.nix ./sops.nix
./root-user.nix ./root-user.nix
./sshd.nix ./sshd.nix
./monitoring.nix ./monitoring.nix
./weekly-rebuild.nix
]; ];
} }

16
system/weekly-rebuild.nix Normal file
View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
systemd.services."weekly-rebuild" = {
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.nixos-rebuild}/bin/nixos-rebuild boot --flake git+https://git.t-juice.club/torjus/nixos-servers";
};
};
systemd.timers."weekly-rebuild" = {
enable = true;
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "Sun 06:00:00";
};
};
}