Elias Coppens
e8d8e8ccff
Some checks failed
Check workflows / check_workflows (pull_request) Failing after 0s
Build all the nodes / ap01 (pull_request) Failing after 0s
Build all the nodes / bridge01 (pull_request) Failing after 0s
Build all the nodes / build01 (pull_request) Failing after 0s
Build all the nodes / hypervisor01 (pull_request) Failing after 0s
Build all the nodes / hypervisor02 (pull_request) Failing after 0s
Build all the nodes / hypervisor03 (pull_request) Failing after 0s
Build all the nodes / netcore02 (pull_request) Failing after 0s
Build all the nodes / rescue01 (pull_request) Failing after 0s
Build all the nodes / storage01 (pull_request) Failing after 0s
Build all the nodes / tower01 (pull_request) Failing after 0s
Build all the nodes / vault01 (pull_request) Failing after 0s
Build all the nodes / web01 (pull_request) Failing after 0s
Build all the nodes / web02 (pull_request) Failing after 0s
Build all the nodes / web03 (pull_request) Failing after 0s
Check meta / check_dns (pull_request) Successful in 21s
Run pre-commit on all files / pre-commit (pull_request) Failing after 0s
Check meta / check_meta (pull_request) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 45s
Build all the nodes / compute01 (pull_request) Failing after 54s
Build all the nodes / geo01 (pull_request) Failing after 53s
Build all the nodes / geo02 (pull_request) Failing after 53s
Build the shell / build-shell (pull_request) Successful in 43s
78 lines
1.9 KiB
Nix
78 lines
1.9 KiB
Nix
# SPDX-FileCopyrightText: 2025 Elias Coppens <elias@dgnum.eu>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
{ pkgs, lib, ... }:
|
|
let
|
|
org = import ../../../meta/organization.nix;
|
|
keys = (import ../../../keys/default.nix)._keys;
|
|
in
|
|
{
|
|
config = {
|
|
users.users = builtins.listToAttrs (
|
|
builtins.map (u: {
|
|
name = u;
|
|
value = {
|
|
isNormalUser = true;
|
|
home = "/home/${u}";
|
|
openssh.authorizedKeys.keys = keys.${u};
|
|
};
|
|
}) org.groups.nix-builder
|
|
);
|
|
|
|
security.pam.loginLimits = [
|
|
{
|
|
domain = "*";
|
|
item = "nofile";
|
|
type = "-";
|
|
value = "20480";
|
|
}
|
|
];
|
|
|
|
systemd.services.nix-daemon.serviceConfig = {
|
|
MemoryAccounting = true;
|
|
MemoryMax = "450G";
|
|
MemoryHigh = "440G";
|
|
MemorySwapMax = "2G";
|
|
ManagedOOMSwap = "kill";
|
|
ManagedOOMMemoryPressure = "kill";
|
|
MemoryPressureWatch = "on";
|
|
};
|
|
|
|
nix = {
|
|
gc = {
|
|
automatic = true;
|
|
dates = lib.mkForce "*:45";
|
|
options = lib.mkForce ''--max-freed "$((128 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
|
|
|
|
randomizedDelaySec = "1800";
|
|
};
|
|
|
|
nrBuildUsers = 128;
|
|
|
|
settings = {
|
|
keep-outputs = false;
|
|
keep-derivations = false;
|
|
use-cgroups = true;
|
|
http-connections = 0;
|
|
auto-allocate-uids = true;
|
|
cores = 0;
|
|
max-jobs = 8; # Do not build more than 2 derivations at once in the event, both of them are too big, yes this is stupid, fix it in Nix.
|
|
fsync-metadata = true;
|
|
system-features = [
|
|
"benchmark"
|
|
"big-parallel"
|
|
"kvm"
|
|
"nixos-test"
|
|
];
|
|
experimental-features = [
|
|
"auto-allocate-uids"
|
|
# "ca-derivations" this feature is really extremely broken.
|
|
"cgroups"
|
|
"fetch-closure"
|
|
"impure-derivations"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|