Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/342a1d682386d3a1d74f9555cb327f2f311dda6e' (2024-10-10) → 'github:nix-community/home-manager/e78cbb20276f09c1802e62d2f77fc93ec32da268' (2024-10-17) • Updated input 'nix-darwin': 'github:LnL7/nix-darwin/48b50b3b137be5cfb9f4d006835ce7c3fe558ccc' (2024-10-08) → 'github:LnL7/nix-darwin/a60ac02f9466f85f092e576fd8364dfc4406b5a6' (2024-10-14) • Updated input 'nix-vscode-extensions': 'github:nix-community/nix-vscode-extensions/018196c371073d669510fd69dd2f6dc0ec608c41' (2024-10-06) → 'github:nix-community/nix-vscode-extensions/4dfd7581aaf0f25d3b7695a10dcfb1dfe4ebb953' (2024-10-18) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221' (2024-10-10) → 'github:nixos/nixpkgs/7881fbfd2e3ed1dfa315fca889b2cfd94be39337' (2024-10-15)
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
{ config, pkgs, inputs, ... }:
|
|
let
|
|
nixSettings = {
|
|
auto-optimise-store = true;
|
|
connect-timeout = 60;
|
|
download-attempts = 10;
|
|
cores = 4;
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
fallback = true;
|
|
keep-outputs = true;
|
|
keep-going = true;
|
|
log-lines = 25;
|
|
max-jobs = 3;
|
|
};
|
|
in {
|
|
services.nix-daemon.enable = true;
|
|
nix = {
|
|
package = pkgs.nixFlakes;
|
|
extraOptions = ''
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
gc = {
|
|
automatic = true;
|
|
interval = {
|
|
Hour = 18;
|
|
Minute = 15;
|
|
};
|
|
options = "-d --delete-older-than 7d";
|
|
};
|
|
settings = nixSettings // {
|
|
max-free = 1000000000;
|
|
min-free = 128000000;
|
|
warn-dirty = false;
|
|
trusted-users = [ "@admin" ];
|
|
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="
|
|
];
|
|
};
|
|
distributedBuilds = true;
|
|
linux-builder = {
|
|
enable = true;
|
|
maxJobs = 3;
|
|
config = ({ pkgs, ... }: {
|
|
users.extraGroups.docker.members =
|
|
builtins.map (i: "nixbld" + builtins.toString i)
|
|
(pkgs.lib.genList (i: i + 1) 32);
|
|
virtualisation = {
|
|
docker.enable = true;
|
|
darwin-builder = {
|
|
diskSize = 50 * 1024;
|
|
memorySize = 8 * 1024;
|
|
};
|
|
cores = 8;
|
|
};
|
|
nix.settings = nixSettings // { sandbox = false; };
|
|
});
|
|
};
|
|
};
|
|
nixpkgs = {
|
|
hostPlatform = "x86_64-darwin";
|
|
config.allowUnfree = true;
|
|
};
|
|
}
|