Skip to content

Commit

Permalink
opt in nix gc
Browse files Browse the repository at this point in the history
  • Loading branch information
esselius committed Oct 23, 2024
1 parent f1f7234 commit ace8576
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
12 changes: 6 additions & 6 deletions home-configurations/peteresselius.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ in
programs.fish.shellInit = ''
set -x EMAIL (sh -c 'cat ${config.age.secrets.email.path}')
'';

home = {
stateVersion = "24.05";
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/peteresselius" else "/home/peteresselius";
username = "peteresselius";
};
}

(mkIf (config.context == "home") { })
Expand All @@ -36,10 +42,4 @@ in
'';
})
];

home = {
stateVersion = "24.05";
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/peteresselius" else "/home/peteresselius";
username = "peteresselius";
};
}
1 change: 1 addition & 0 deletions nixos-configurations/adama.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ezModules.ca
ezModules.nginx
ezModules.prometheus-mqtt-exporter
ezModules.nix-gc
];

nixpkgs.hostPlatform = "aarch64-linux";
Expand Down
1 change: 1 addition & 0 deletions nixos-configurations/cain.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
imports = [
ezModules.user-peteresselius
ezModules.sshd
ezModules.nix-gc
];

nixpkgs.hostPlatform = "x86_64-linux";
Expand Down
1 change: 1 addition & 0 deletions nixos-configurations/starbuck.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ezModules.hardware-rpi5
ezModules.sshd
ezModules.user-peteresselius
ezModules.nix-gc
];

nixpkgs.hostPlatform = "aarch64-linux";
Expand Down
9 changes: 9 additions & 0 deletions nixos-modules/nix-gc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
};
}
6 changes: 0 additions & 6 deletions nixos-modules/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@

settings.trusted-users = [ "root" "@wheel" ];

gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};

registry.nixpkgs.flake = inputs.nixpkgs;

nixPath = [
Expand Down

0 comments on commit ace8576

Please sign in to comment.