diff options
author | Linnnus <[email protected]> | 2024-12-06 12:28:30 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-12-06 12:28:36 +0100 |
commit | a4502806bf966d427af33094eb6950a145241009 (patch) | |
tree | 1725cf10cd36c473dbc7ca5ec051074e3632d64c /hosts/muhammed/remote-builders/local-linux-builder.nix | |
parent | 31ee8cdae15e12ed65add3211fd8a2d8cfa12442 (diff) |
muhammed: Add ahmed as remote x86_64-linux builder
Diffstat (limited to 'hosts/muhammed/remote-builders/local-linux-builder.nix')
-rw-r--r-- | hosts/muhammed/remote-builders/local-linux-builder.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/hosts/muhammed/remote-builders/local-linux-builder.nix b/hosts/muhammed/remote-builders/local-linux-builder.nix new file mode 100644 index 0000000..dba2297 --- /dev/null +++ b/hosts/muhammed/remote-builders/local-linux-builder.nix @@ -0,0 +1,36 @@ +# Create a local Linux builder. This will allow us to build aarch64-linux +# targets directly on this machine. +{...}: { + # XXX: Why is this necessary? + nix.settings.trusted-users = ["linus"]; + + nix.linux-builder = { + enable = true; + + # Clearing the VM state upon startup should improve reliability at the cost + # of some startup speed. Will have to re-evaluate if this trade off is + # worth it at some point. + ephemeral = true; + + 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 + ]; + + # 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"; + services.openssh.permitRootLogin = "yes"; + }; + }; + + # Add system-features to the nix daemon that are needed for NixOS tests + # Starting with Nix 2.19, this will be automatic + nix.settings.system-features = [ + "nixos-test" + "apple-virt" + ]; +} |