summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-12-06 21:50:11 +0100
committerLinnnus <[email protected]>2024-12-06 21:50:11 +0100
commite18423ddfa5705bf2d26d38884fbc1a6e4e9b6fa (patch)
treed621b5bbfa90d78a6f807b9c739c7c850fc17fc0
parenta4502806bf966d427af33094eb6950a145241009 (diff)
muhammed: Clean up linux builder configuration
-rw-r--r--hosts/muhammed/remote-builders/local-linux-builder.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/hosts/muhammed/remote-builders/local-linux-builder.nix b/hosts/muhammed/remote-builders/local-linux-builder.nix
index dba2297..13067db 100644
--- a/hosts/muhammed/remote-builders/local-linux-builder.nix
+++ b/hosts/muhammed/remote-builders/local-linux-builder.nix
@@ -1,7 +1,15 @@
# Create a local Linux builder. This will allow us to build aarch64-linux
# targets directly on this machine.
+#
+# Note that building the linux-builder requires having access to a linux
+# builder already. To break this cycle, a version of the linux builder with
+# `nix.linux-builder.config = {}` is cached on the official binary cache.
+#
+# If you do not have a linux builder available when switching to this
+# configuration, you should start by commenting out all custom configuration of
+# the VM and building that first.
{...}: {
- # XXX: Why is this necessary?
+ # User must be trusted in order to use the Linux builder.
nix.settings.trusted-users = ["linus"];
nix.linux-builder = {
@@ -15,15 +23,16 @@
config = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
# cntr is used to jump into the sandbox of packages that use breakpointHook.
- pkgs.cntr
-
- # Nix is used to debug and fetch other tools as needed.
- pkgs.nix
+ cntr
];
+ nix.enable = true;
+
# Allow root login. This would normally be horrible but it's a local VM so who cares.
- users.users.root.hashedPassword = "$y$j9T$TosKLKCZ.g9be.Wz5/qVJ.$YWvn4nAp8tn.xhHGBMOz748PHma6QGhN/WShilEbz8A";
+ users.users.root.password = "root";
services.openssh.permitRootLogin = "yes";
+
+ nixpkgs.hostPlatform = {system = "x86_64-linux";};
};
};