summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-03-10 12:37:18 +0100
committerAlan Pearce2024-03-10 12:37:18 +0100
commite8463e792a824fd220b66339e381e4843a692344 (patch)
treef03160f0d053d900b15455217e0278f696fb2e52
parent64cf82a5dacb4b3e298172c05d8561c1289c3281 (diff)
downloadnixfiles-e8463e792a824fd220b66339e381e4843a692344.tar.lz
nixfiles-e8463e792a824fd220b66339e381e4843a692344.tar.zst
nixfiles-e8463e792a824fd220b66339e381e4843a692344.zip
mba: use linux-builder in place of custom lima setup
-rw-r--r--system/mba.nix25
-rw-r--r--system/settings/darwin.nix3
2 files changed, 15 insertions, 13 deletions
diff --git a/system/mba.nix b/system/mba.nix
index 6ab2300e..4989c3b5 100644
--- a/system/mba.nix
+++ b/system/mba.nix
@@ -26,19 +26,18 @@
     auto-optimise-store = false; # https://github.com/NixOS/nix/issues/7273
   };
 
-  nix.buildMachines = [
-    {
-      hostName = "lima-nixos";
-      system = "aarch64-linux";
-      sshUser = "nix-remote";
-      sshKey = "/var/root/.ssh/nix-remote";
-      protocol = "ssh-ng";
-      maxJobs = 4;
-      supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
-      mandatoryFeatures = [ ];
-    }
-  ];
-  nix.distributedBuilds = true;
+  nix.linux-builder = {
+    maxJobs = 4;
+    config = {
+      virtualisation = {
+        darwin-builder = {
+          diskSize = 60 * 1024;
+          memorySize = 8 * 1024;
+        };
+        cores = 4;
+      };
+    };
+  };
 }
 # vim: sw=2 sts=2 expandtab autoindent smarttab
 
diff --git a/system/settings/darwin.nix b/system/settings/darwin.nix
index 14a2b83b..ae537d78 100644
--- a/system/settings/darwin.nix
+++ b/system/settings/darwin.nix
@@ -20,6 +20,9 @@
     settings.warn-dirty = false;
     settings.keep-outputs = true;
     settings.keep-derivations = true;
+
+    linux-builder.enable = true;
+    settings.trusted-users = [ "@admin" ];
   };
 
   nixpkgs.config = {