Encode native/qemu emulation support in system features

This commit is contained in:
Mikael 2024-12-11 14:35:06 +01:00
parent a93501e34a
commit 71ca6508a1
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0
2 changed files with 10 additions and 3 deletions

View file

@ -19,7 +19,7 @@
maxJobs = 2; maxJobs = 2;
speedFactor = 24; speedFactor = 24;
systems = [ "aarch64-linux" ]; systems = [ "aarch64-linux" ];
supportedFeatures = base ++ aarch64; supportedFeatures = base ++ aarch64 ++ [ "aarch64-linux-native" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
} }
{ {
@ -28,7 +28,7 @@
maxJobs = 2; maxJobs = 2;
speedFactor = 20; speedFactor = 20;
systems = [ "riscv64-linux" ]; systems = [ "riscv64-linux" ];
supportedFeatures = base ++ riscv64; supportedFeatures = base ++ riscv64 ++ [ "riscv64-linux-native" ];
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
} }
] ++ lib.forEach (lib.range 0 11) (num: { ] ++ lib.forEach (lib.range 0 11) (num: {
@ -39,7 +39,8 @@
systems = [ "i686-linux" "x86_64-linux" ] systems = [ "i686-linux" "x86_64-linux" ]
++ lib.optionals (lib.mod num 5 == 0) [ "aarch64-linux" "riscv64-linux" ]; ++ lib.optionals (lib.mod num 5 == 0) [ "aarch64-linux" "riscv64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" ] ++ x86-64 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" ] ++ x86-64
++ lib.optionals (lib.mod num 5 == 0) (aarch64 ++ riscv64); ++ lib.optionals (lib.mod num 5 == 0) (aarch64 ++ riscv64
++ [ "aarch64-linux-qemu" "riscv64-linux-qemu" "x86_64-linux-native" "i686-linux-native" ]);
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path; sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}); });
nixpkgs.config.allowUnsupportedSystem = true; nixpkgs.config.allowUnsupportedSystem = true;

View file

@ -32,6 +32,7 @@ dockerTools.buildLayeredImage {
"big-parallel" "big-parallel"
"nixos-test" "nixos-test"
"uid-range" "uid-range"
"gccarch-x86-64" "gccarch-x86-64"
"gccarch-x86-64-v2" "gccarch-x86-64-v2"
"gccarch-x86-64-v3" "gccarch-x86-64-v3"
@ -42,6 +43,11 @@ dockerTools.buildLayeredImage {
"gccarch-rv64imac" "gccarch-rv64imac"
"gccarch-rv64imacfd" "gccarch-rv64imacfd"
"gccarch-rv64gc" "gccarch-rv64gc"
"riscv64-linux-qemu"
"aarch64-linux-qemu"
"x86_64-linux-native"
"i686-linux-native"
]; ];
in '' in ''
mkdir -p /root mkdir -p /root