system: move garbage collector to a separate module
don't use garbage collector on laptop yet
This commit is contained in:
parent
996f83bc87
commit
eb38fe9e68
3 changed files with 16 additions and 14 deletions
|
@ -7,6 +7,7 @@ with inputs;
|
|||
modules = [
|
||||
dedsec-grub-theme.nixosModule
|
||||
../system/configuration.nix
|
||||
../system/garbage-collector.nix
|
||||
../system/machine/home
|
||||
];
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
14
system/garbage-collector.nix
Normal file
14
system/garbage-collector.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
virtualisation.docker.autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue