Collect garbage after rebuild
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled

This commit is contained in:
Torjus Håkestad 2024-10-12 21:52:05 +02:00
parent c4e1026d5e
commit 5a5773fc79
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4

View File

@ -1,10 +1,17 @@
{ pkgs, ... }:
{
systemd.services."weekly-rebuild" = {
path = [ pkgs.git ];
path = [
pkgs.git
pkgs.nix
];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.nixos-rebuild}/bin/nixos-rebuild boot --flake git+https://git.t-juice.club/torjus/nixos-servers";
ExecStartPost = [
"${pkgs.nix}/bin/nix-collect-garbage --delete-older-than 30d"
"${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake git+https://git.t-juice.club/torjus/nixos-servers"
];
};
};
systemd.timers."weekly-rebuild" = {