Files
nixos/modules-all/automatic/nix.nix
T
2022-09-23 02:36:13 +00:00

29 lines
576 B
Nix

{ pkgs, ... }:
{
# Enable flakes
nix = {
package = pkgs.nixFlakes;
settings = {
substituters = [
"https://cache.garnix.io"
];
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
# Keep freespace available, at a minimum, and enable Flakes
extraOptions = ''
experimental-features = nix-command flakes
min-free = ${toString (1024 * 1024 * 1024) }
max-free = ${toString (5 * 1024 * 1024 * 1024) }
# Used by direnv
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true;
}