Commit 0b9b09ee authored by Gabriella Gonzalez's avatar Gabriella Gonzalez
Browse files

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
parent b0632a2d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
{ 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}"= {