Add deletion policy for older nix generations

This commit is contained in:
DashieTM 2024-08-05 00:03:25 +02:00
parent c8a6e6b420
commit 494131ece5

View file

@ -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 = [