oui
This commit is contained in:
+39
-3
@@ -14,16 +14,40 @@
|
||||
in {
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
experimental-features = "nix-command flakes ca-derivations";
|
||||
|
||||
# Binary caches
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://cache.iog.io"
|
||||
"https://haskell-language-server.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||
"haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
|
||||
# Trusted users (useful for remote builds)
|
||||
# trusted-users = [ "root" "@wheel" ];
|
||||
# Trusted users
|
||||
trusted-users = ["root" "@admin" "@wheel"];
|
||||
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
|
||||
# Keep build dependencies for development
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
|
||||
# Performance tuning
|
||||
max-jobs = 32;
|
||||
cores = 0; # Use all cores
|
||||
http-connections = 64;
|
||||
download-buffer-size = 134217728; # 128 MB
|
||||
};
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
@@ -37,6 +61,18 @@
|
||||
automatic = true;
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Extra options
|
||||
extraOptions =
|
||||
''
|
||||
accept-flake-config = true
|
||||
''
|
||||
+ lib.optionalString (pkgs.system == "aarch64-darwin") ''
|
||||
extra-platforms = x86_64-darwin aarch64-darwin
|
||||
'';
|
||||
|
||||
# Use latest nix version
|
||||
package = pkgs.nixVersions.latest;
|
||||
};
|
||||
|
||||
# Shared nixpkgs configuration
|
||||
|
||||
Reference in New Issue
Block a user