set gcc.arch, extra-platforms, system-features
This commit is contained in:
parent
25e81d251e
commit
0aa0c25db1
6 changed files with 34 additions and 0 deletions
hosts
modules/nixos
|
@ -6,6 +6,8 @@
|
|||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform.gcc.arch = "znver2";
|
||||
|
||||
# Emulate riscv64 until we have proper builders
|
||||
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
||||
boot.binfmt.preferStaticEmulators = true;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform.gcc.arch = "znver2";
|
||||
|
||||
# set in srvos, remove when reinstalling
|
||||
networking.hostId = "deadbeef";
|
||||
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
inputs.srvos.nixosModules.hardware-hetzner-online-amd
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform.gcc.arch = "znver4";
|
||||
|
||||
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:2190:2698::2";
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
inputs.srvos.nixosModules.hardware-hetzner-online-arm
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform.gcc.arch = "armv8-a";
|
||||
|
||||
# error: failed to start SSH connection
|
||||
# https://github.com/nix-community/infra/issues/1416
|
||||
services.openssh.settings.MaxStartups = 100;
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
"cgroups"
|
||||
];
|
||||
|
||||
system-features = [ "uid-range" ];
|
||||
|
||||
auto-allocate-uids = true;
|
||||
use-cgroups = true;
|
||||
};
|
||||
|
|
|
@ -19,6 +19,30 @@
|
|||
script = builtins.readFile "${inputs.self}/modules/shared/free-space.bash";
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = {
|
||||
inherit (pkgs.hostPlatform) system;
|
||||
};
|
||||
|
||||
nix.settings.extra-platforms = lib.mkIf (config.nixpkgs.hostPlatform.system == "x86_64-linux") [
|
||||
(lib.mkIf (config.boot.binfmt.emulatedSystems == [ ]) "i686-linux")
|
||||
"x86_64-v1-linux"
|
||||
"x86_64-v2-linux"
|
||||
"x86_64-v3-linux"
|
||||
(lib.mkIf (builtins.elem "gccarch-x86-64-v4" config.nix.settings.system-features) "x86_64-v4-linux")
|
||||
];
|
||||
|
||||
nix.settings.system-features =
|
||||
[
|
||||
"benchmark"
|
||||
"big-parallel"
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"gccarch-${config.nixpkgs.hostPlatform.gcc.arch}"
|
||||
]
|
||||
++ map (x: "gccarch-${x}") (
|
||||
lib.systems.architectures.inferiors.${config.nixpkgs.hostPlatform.gcc.arch} or [ ]
|
||||
);
|
||||
|
||||
# Bump the open files limit so that non-root users can run NixOS VM tests
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue