Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set gcc.arch, extra-platforms, system-features #1507

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hosts/build01/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
inputs.self.nixosModules.community-builder
];

nixpkgs.hostPlatform.gcc.arch = "znver2";

# Emulate riscv64 until we have proper builders
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];

Expand Down
2 changes: 2 additions & 0 deletions hosts/build02/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
inputs.self.nixosModules.disko-zfs
];

nixpkgs.hostPlatform.gcc.arch = "znver2";

# set in srvos, remove when reinstalling
networking.hostId = "deadbeef";

Expand Down
6 changes: 6 additions & 0 deletions hosts/build03/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
./postgresql.nix
];

nixpkgs.hostPlatform.gcc.arch = "znver4";

nix.settings.extra-platforms = [
"x86_64-v4-linux"
];

systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:2190:2698::2";

system.stateVersion = "23.11";
Expand Down
2 changes: 2 additions & 0 deletions hosts/build04/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
inputs.self.nixosModules.remote-builder
];

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;
Expand Down
20 changes: 20 additions & 0 deletions modules/nixos/builder.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{
nix.gc.automatic = false;

nixpkgs.hostPlatform = {
inherit (pkgs.hostPlatform) system;
};

nix.settings.extra-platforms = lib.mkIf (config.nixpkgs.hostPlatform.system == "x86_64-linux") [
"i686-linux"
"x86_64-v1-linux"
"x86_64-v2-linux"
"x86_64-v3-linux"
];

nix.settings.system-features = [
"benchmark"
"big-parallel"
"gccarch-${config.nixpkgs.hostPlatform.gcc.arch}"
"kvm"
"nixos-test"
];

systemd.services.free-space = {
serviceConfig.Type = "oneshot";
startAt = "hourly";
Expand Down