nix_optimize: Add optimization of store and automatic GC call
All checks were successful
check / check (push) Successful in 29s
All checks were successful
check / check (push) Successful in 29s
This commit is contained in:
parent
2e0519fb94
commit
bb5e2ceb90
4 changed files with 26 additions and 0 deletions
|
@ -23,6 +23,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Limit the number of generations to keep
|
||||
# boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.grub.configurationLimit = 10;
|
||||
|
||||
networking.hostName = "nixos-vm"; # Define your hostname.
|
||||
users.users.florian.initialPassword = "test";
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Limit the number of generations to keep
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
# boot.loader.grub.configurationLimit = 10;
|
||||
|
||||
networking.hostName = "nixos-desktop-perso"; # Define your hostname.
|
||||
|
||||
modules.system = {
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Limit the number of generations to keep
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
# boot.loader.grub.configurationLimit = 10;
|
||||
|
||||
networking.hostName = "nixos-laptop-perso"; # Define your hostname.
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
|
|
|
@ -23,6 +23,20 @@
|
|||
LC_TIME = "fr_FR.UTF-8";
|
||||
};
|
||||
|
||||
# Perform garbage collection weekly to maintain low disk usage
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "*-*-* 20:00:00";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
|
||||
# Optimize storage
|
||||
# You can also manually optimize the store via:
|
||||
# nix-store --optimise
|
||||
# Refer to the following link for more details:
|
||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
|
Loading…
Add table
Reference in a new issue