1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-18 09:19:39 +01:00
nixos/modules/nix.nix
Stefan Ellmauthaler f44fd0664a
Update to 24.11
Signed-off-by: Stefan Ellmauthaler <stefan.ellmauthaler@gmail.com>
2025-02-04 10:08:57 +01:00

35 lines
858 B
Nix

{
pkgs,
config,
...
}: {
config = {
nix = {
settings = {
sandbox = true;
trusted-users = ["root"] ++ config.elss.users.admins;
auto-optimise-store = true;
};
package = pkgs.nixVersions.stable;
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
# Enable flakes
# Free up to 50 GiB whenever there is less than 10 GiB left.
extraOptions = ''
experimental-features = nix-command flakes
min-free = ${toString (10 * 1024 * 1024 * 1024)}
max-free = ${toString (50 * 1024 * 1024 * 1024)}
'';
# Disable automatic (periodic) GC, since it might interfere with benchmarks
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
};
}