2024-10-22 18:53:09 +05:30
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-07 18:27:38 +05:30
|
|
|
let
|
|
|
|
nixSettings = {
|
|
|
|
connect-timeout = 60;
|
|
|
|
download-attempts = 10;
|
2024-09-13 10:42:38 +05:30
|
|
|
cores = 4;
|
2024-10-22 18:53:09 +05:30
|
|
|
experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
2024-09-07 18:27:38 +05:30
|
|
|
fallback = true;
|
|
|
|
keep-outputs = true;
|
|
|
|
keep-going = true;
|
|
|
|
log-lines = 25;
|
2024-09-13 10:42:38 +05:30
|
|
|
max-jobs = 3;
|
2024-09-07 18:27:38 +05:30
|
|
|
};
|
2024-10-22 18:53:09 +05:30
|
|
|
in
|
|
|
|
{
|
2023-11-25 16:13:20 +05:30
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
nix = {
|
2024-10-27 12:19:43 +05:30
|
|
|
package = pkgs.nixVersions.stable;
|
2023-11-25 16:13:20 +05:30
|
|
|
extraOptions = ''
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
'';
|
2024-11-10 19:49:22 +05:30
|
|
|
optimise.automatic = true;
|
2024-09-07 18:27:38 +05:30
|
|
|
settings = nixSettings // {
|
2023-11-25 16:13:20 +05:30
|
|
|
max-free = 1000000000;
|
|
|
|
min-free = 128000000;
|
|
|
|
warn-dirty = false;
|
2024-01-31 19:23:23 +05:30
|
|
|
trusted-users = [ "@admin" ];
|
2024-10-22 18:53:09 +05:30
|
|
|
trusted-substituters = [
|
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://nix-community.cachix.org"
|
2024-11-10 19:45:40 +05:30
|
|
|
"https://cache.lix.systems"
|
2024-10-22 18:53:09 +05:30
|
|
|
];
|
2024-09-14 09:23:05 +05:30
|
|
|
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2024-11-10 19:45:40 +05:30
|
|
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
2024-09-14 09:23:05 +05:30
|
|
|
];
|
2023-11-25 16:13:20 +05:30
|
|
|
};
|
2024-09-07 18:27:38 +05:30
|
|
|
distributedBuilds = true;
|
|
|
|
linux-builder = {
|
|
|
|
enable = true;
|
2024-09-13 10:42:38 +05:30
|
|
|
maxJobs = 3;
|
2024-10-22 18:53:09 +05:30
|
|
|
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;
|
|
|
|
};
|
2024-11-10 19:49:22 +05:30
|
|
|
nix.package = pkgs.lix;
|
2024-10-22 18:53:09 +05:30
|
|
|
nix.settings = nixSettings // {
|
|
|
|
sandbox = false;
|
2024-09-07 18:27:38 +05:30
|
|
|
};
|
2024-11-10 19:49:22 +05:30
|
|
|
environment.systemPackages = [ pkgs.htop ];
|
2024-10-22 18:53:09 +05:30
|
|
|
}
|
|
|
|
);
|
2024-09-07 18:27:38 +05:30
|
|
|
};
|
2023-11-25 16:13:20 +05:30
|
|
|
};
|
|
|
|
nixpkgs = {
|
|
|
|
hostPlatform = "x86_64-darwin";
|
|
|
|
config.allowUnfree = true;
|
2022-09-27 13:08:52 +05:30
|
|
|
};
|
|
|
|
}
|