system: move garbage collector to a separate module

don't use garbage collector on laptop yet
This commit is contained in:
Dmitriy Pleshevskiy 2022-09-27 23:26:20 +03:00
parent 996f83bc87
commit eb38fe9e68
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
3 changed files with 16 additions and 14 deletions

View file

@ -7,6 +7,7 @@ with inputs;
modules = [
dedsec-grub-theme.nixosModule
../system/configuration.nix
../system/garbage-collector.nix
../system/machine/home
];
};

View file

@ -124,23 +124,10 @@ in
};
virtualisation = {
docker = {
enable = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
docker.enable = true;
};
nix = {
# Automate garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
settings = {
auto-optimise-store = true;

View file

@ -0,0 +1,14 @@
{ ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
virtualisation.docker.autoPrune = {
enable = true;
dates = "weekly";
};
}