about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2022-12-23 20:05:43 +0000
committerGitHub <noreply@github.com>2022-12-23 20:05:43 +0000
commit2054bb5de5d9cb6da9253b8716066d0f272c5ef2 (patch)
treed0558ab13144848908dd716da23285957abfb93b /nixos
parentcb8e7a05f2568b363bb067e73a09c8ffabace6cf (diff)
parent0b9b09eee60cd63b3be6b859efae4a41670a18b8 (diff)
Merge pull request #207459 from Gabriella439/gabriella/darwin_builder_platforms
darwin.builder: Fix supported platforms
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/profiles/macos-builder.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixos/modules/profiles/macos-builder.nix b/nixos/modules/profiles/macos-builder.nix
index 895dd04cb4852..77f3224a72941 100644
--- a/nixos/modules/profiles/macos-builder.nix
+++ b/nixos/modules/profiles/macos-builder.nix
@@ -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}"= {