Files
nixy/nixos/nix.nix
T
2026-06-29 17:48:21 +02:00

41 lines
900 B
Nix

# Nix configuration for NixOS
{
config,
inputs,
...
}: let
autoGarbageCollector = config.var.autoGarbageCollector;
in {
nixpkgs.config = {
allowUnfree = true;
allowBroken = false;
};
nix = {
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
channel.enable = false;
extraOptions = ''
warn-dirty = false
'';
settings = {
download-buffer-size = 262144000; # 250 MB (250 * 1024 * 1024)
auto-optimise-store = true;
experimental-features = [
"nix-command"
"flakes"
];
substituters = [
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
gc = {
automatic = autoGarbageCollector;
persistent = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
}