.github
.vscode
docs
hydra
keys
lib
modules
autopull.nix
base.nix
boot.nix
docker.nix
endlessh.nix
fail2ban.nix
generators.nix
kub_net.nix
libs.nix
locale.nix
nix.nix
openssh.nix
pam-fingerprint-swap.nix
plocate.nix
programs.nix
update.nix
yubikey.nix
pkgs
systems
users
utils
.envrc
.gitconfig
.gitignore
.sops.yaml
CONTRIBUTING.md
README.md
checks.nix
flake.lock
flake.nix
shell.nix
sops-mergetool.sh
statix.toml
treefmt.toml
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib, pkgs, ... }:
|
|
{
|
|
nix = {
|
|
package = pkgs.nixVersions.latest;
|
|
diffSystem = true;
|
|
settings = {
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
keep-outputs = true;
|
|
builders-use-substitutes = true;
|
|
connect-timeout = 20;
|
|
substituters = [
|
|
"https://cache.nixos.org/?priority=1&want-mass-query=true"
|
|
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
|
|
];
|
|
trusted-substituters = [
|
|
"https://cache.nixos.org"
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
trusted-users = [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
};
|
|
|
|
# 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 = lib.mkDefault {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
|
|
optimise = {
|
|
automatic = true;
|
|
dates = [ "01:00" ];
|
|
};
|
|
};
|
|
}
|