created nix.nix

This commit is contained in:
Richie Cahill 2024-04-10 19:23:26 -04:00
parent b1bebca47b
commit 0f0b3df15f
4 changed files with 32 additions and 88 deletions

32
modules/nix.nix Normal file
View File

@ -0,0 +1,32 @@
{ lib, ... }:
{
nix = {
diffSystem = true;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
keep-outputs = true;
builders-use-substitutes = true;
connect-timeout = 20;
};
# free up to 10 gb when only 1 gb left
extraOptions = ''
min-free = ${toString (1 * 1024 * 1024 * 1024)}
max-free = ${toString (10 * 1024 * 1024 * 1024)}
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = [ "01:00" ];
};
};
}

View File

@ -171,36 +171,6 @@
}; };
}; };
nix = {
diffSystem = true;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
keep-outputs = true;
builders-use-substitutes = true;
connect-timeout = 20;
};
# free up to 10 gb when only 1 gb left
extraOptions = ''
min-free = ${toString (1 * 1024 * 1024 * 1024)}
max-free = ${toString (10 * 1024 * 1024 * 1024)}
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = [ "01:00" ];
};
};
system = { system = {
autoUpgrade = { autoUpgrade = {
enable = true; enable = true;

View File

@ -60,36 +60,6 @@
# }; # };
# }; # };
nix = {
diffSystem = true;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
keep-outputs = true;
builders-use-substitutes = true;
connect-timeout = 20;
};
# free up to 10 gb when only 1 gb left
extraOptions = ''
min-free = ${toString (1 * 1024 * 1024 * 1024)}
max-free = ${toString (10 * 1024 * 1024 * 1024)}
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = [ "01:00" ];
};
};
system = { system = {
autoUpgrade = { autoUpgrade = {
enable = true; enable = true;

View File

@ -57,32 +57,4 @@
async = true; async = true;
}; };
}; };
nix = {
diffSystem = true;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
keep-outputs = true;
builders-use-substitutes = true;
connect-timeout = 20;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
system = {
autoUpgrade = {
enable = true;
randomizedDelaySec = "1h";
persistent = true;
flake = "github:RAD-Development/nix-dotfiles";
};
};
} }