My default
nix
configuration on NixOS.
This configuration is more for building/debugging stuff and caching with
nix-serve
.
Usually my package version is locked since different
versions of
nix
can have some effects.
{ config, ... }:
{
nix = {
package = (import ../versions.nix).nix_2_17 { inherit config; };
settings = {
log-lines = 25; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-log-lines
fallback = true; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-fallback
tarball-ttl = 0; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-tarball-ttl
show-trace = true; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-show-trace
connect-timeout = 5; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-connect-timeout
auto-optimise-store = true; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-auto-optimise-store
narinfo-cache-negative-ttl = 0; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-narinfo-cache-negative-ttl
narinfo-cache-positive-ttl = 0; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-narinfo-cache-positive-ttl
builders-use-substitutes = true; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-builders-use-substitutes
min-free = 268435456; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-min-free (256 MB in Bytes)
max-free = 1073741824; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-max-free (1 GB in Bytes)
allowed-users = [ "root" "@wheel" ]; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-allowed-users
trusted-users = [ "root" "@wheel" ]; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-trusted-users
experimental-features = "nix-command flakes"; # https://nixos.org/manual/nix/unstable/command-ref/conf-file.html#conf-experimental-features
};
};
}