feat(servers): fix /boot getting filled with kernels.
This commit is contained in:
parent
d8853535a7
commit
3508c28bf1
2 changed files with 20 additions and 0 deletions
|
@ -8,5 +8,6 @@
|
||||||
./additional-pkgs.nix
|
./additional-pkgs.nix
|
||||||
./root.nix
|
./root.nix
|
||||||
./beszel-agent.nix
|
./beszel-agent.nix
|
||||||
|
./optimise-storage.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
19
modules/servers/general/optimise-storage.nix
Normal file
19
modules/servers/general/optimise-storage.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{...}: {
|
||||||
|
nix.optimise = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 10d";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.extraOptions = ''
|
||||||
|
min-free = ${toString (100 * 1024 * 1024)}
|
||||||
|
max-free = ${toString (1024 * 1024 * 1024)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
boot.loader.grub.configurationLimit = 3;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue