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")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 5;
|
||||||
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
|
|
@ -28,7 +31,15 @@ in
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault config.conf.system;
|
nixpkgs.hostPlatform = lib.mkDefault config.conf.system;
|
||||||
nix = {
|
nix = {
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d --delete-generations +5";
|
||||||
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
trusted-users = [
|
||||||
|
username
|
||||||
|
];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
|
|
@ -53,10 +64,6 @@ in
|
||||||
DIRENV_LOG_FORMAT = "";
|
DIRENV_LOG_FORMAT = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.trusted-users = [
|
|
||||||
username
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelPackages = config.conf.kernel;
|
boot.kernelPackages = config.conf.kernel;
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue