Add deletion policy for older nix generations
This commit is contained in:
parent
c8a6e6b420
commit
494131ece5
1 changed files with 12 additions and 5 deletions
|
|
@ -7,7 +7,10 @@ in
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Enable networking
|
||||
|
|
@ -28,7 +31,15 @@ in
|
|||
|
||||
nixpkgs.hostPlatform = lib.mkDefault config.conf.system;
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d --delete-generations +5";
|
||||
};
|
||||
settings = {
|
||||
trusted-users = [
|
||||
username
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
|
||||
experimental-features = "nix-command flakes";
|
||||
|
|
@ -53,10 +64,6 @@ in
|
|||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [
|
||||
username
|
||||
];
|
||||
|
||||
boot.kernelPackages = config.conf.kernel;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.kernelParams = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue