Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/8544cd092047a7e92d0dce011108a563de7fc0f2' (2025-02-01) → 'github:nix-community/home-manager/83bd3a26ac0526ae04fa74df46738bb44b89dcdd' (2025-02-11) • Updated input 'nix-darwin': 'github:LnL7/nix-darwin/49b807fa7c37568d7fbe2aeaafb9255c185412f9' (2025-01-30) → 'github:LnL7/nix-darwin/a6746213b138fe7add88b19bafacd446de574ca7' (2025-02-11) • Updated input 'nix-vscode-extensions': 'github:nix-community/nix-vscode-extensions/e26741603fb047295c7015c93746b75601c8c490' (2025-02-01) → 'github:nix-community/nix-vscode-extensions/00d1dbcc3d422c6eabf9285759a4469a5a5a7542' (2025-02-12) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/9189ac18287c599860e878e905da550aa6dec1cd' (2025-01-31) → 'github:nixos/nixpkgs/b2243f41e860ac85c0b446eadc6930359b294e79' (2025-02-09) • Updated input 'nixpkgs-stable': 'github:nixos/nixpkgs/7dfcd13937964a3592766064a8bed6d2b9666eaa' (2025-01-29) → 'github:nixos/nixpkgs/94792ab2a6beaec81424445bf917ca2556fbeade' (2025-02-10)
87 lines
2.1 KiB
Nix
87 lines
2.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
nixSettings = {
|
|
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 = 5;
|
|
};
|
|
in
|
|
{
|
|
ids.gids.nixbld = 350;
|
|
nix = {
|
|
enable = true;
|
|
package = pkgs.nixVersions.stable;
|
|
extraOptions = ''
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
optimise.automatic = true;
|
|
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"
|
|
"https://cache.lix.systems"
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
|
];
|
|
};
|
|
distributedBuilds = true;
|
|
linux-builder = {
|
|
enable = true;
|
|
package = pkgs.darwin.linux-builder-x86_64;
|
|
systems = [ "x86_64-linux" ];
|
|
ephemeral = true;
|
|
maxJobs = 5;
|
|
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.package = pkgs.lix;
|
|
nix.settings = nixSettings // {
|
|
sandbox = false;
|
|
trusted-users = [ "builder" ];
|
|
};
|
|
nixpkgs.config.allowUnfree = true;
|
|
environment.systemPackages = [ pkgs.htop ];
|
|
}
|
|
);
|
|
};
|
|
};
|
|
nixpkgs = {
|
|
hostPlatform = "aarch64-darwin";
|
|
config.allowUnfree = true;
|
|
};
|
|
}
|