darwin.builder: Fix supported platforms

See: https://github.com/NixOS/nixpkgs/issues/108984#issuecomment-1364263324

Before this change the supported platforms were unspecified, so
it would default to being only built on `x86_64-linux`.  This
fixes that so that hydra.nixos.org builds and caches the Darwin
build products instead
This commit is contained in:
Gabriella Gonzalez
2022-12-23 13:38:34 -06:00
parent b0632a2de5
commit 0b9b09eee6
+9 -3
View File
@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
keysDirectory = "/var/keys";
@@ -71,8 +71,7 @@ in
hostPkgs = config.virtualisation.host.pkgs;
in
hostPkgs.writeShellScriptBin "create-builder" ''
script = hostPkgs.writeShellScriptBin "create-builder" ''
KEYS="''${KEYS:-./keys}"
${hostPkgs.coreutils}/bin/mkdir --parent "''${KEYS}"
PRIVATE_KEY="''${KEYS}/${user}_${keyType}"
@@ -87,6 +86,13 @@ in
KEYS="$(nix-store --add "$KEYS")" ${config.system.build.vm}/bin/run-nixos-vm
'';
in
script.overrideAttrs (old: {
meta = (old.meta or { }) // {
platforms = lib.platforms.darwin;
};
});
system.stateVersion = "22.05";
users.users."${user}"= {