Setup regular garbage collection in common.nix

This commit is contained in:
Evie Litherland-Smith 2023-03-28 09:08:20 +01:00
parent 2d6fc9d038
commit d5888fc7d0
2 changed files with 10 additions and 4 deletions

9
nixos/common.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
}

View file

@ -1,7 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
@ -11,6 +7,7 @@ in
{ {
imports = imports =
[ [
./common.nix
./packages.nix ./packages.nix
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
]; ];