Merge pull request #207459 from Gabriella439/gabriella/darwin_builder_platforms

darwin.builder: Fix supported platforms
This commit is contained in:
Domen Kožar 2022-12-23 20:05:43 +00:00 committed by GitHub
commit 2054bb5de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
let let
keysDirectory = "/var/keys"; keysDirectory = "/var/keys";
@ -71,8 +71,7 @@ in
hostPkgs = config.virtualisation.host.pkgs; hostPkgs = config.virtualisation.host.pkgs;
in script = hostPkgs.writeShellScriptBin "create-builder" ''
hostPkgs.writeShellScriptBin "create-builder" ''
KEYS="''${KEYS:-./keys}" KEYS="''${KEYS:-./keys}"
${hostPkgs.coreutils}/bin/mkdir --parent "''${KEYS}" ${hostPkgs.coreutils}/bin/mkdir --parent "''${KEYS}"
PRIVATE_KEY="''${KEYS}/${user}_${keyType}" PRIVATE_KEY="''${KEYS}/${user}_${keyType}"
@ -87,6 +86,13 @@ in
KEYS="$(nix-store --add "$KEYS")" ${config.system.build.vm}/bin/run-nixos-vm 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"; system.stateVersion = "22.05";
users.users."${user}"= { users.users."${user}"= {