feat: distributed builder work

This commit is contained in:
Kat Inskip 2023-01-30 08:02:10 -08:00
parent 08fbb97b5a
commit b01c6222f8
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
7 changed files with 63 additions and 79 deletions

View file

@ -1,7 +1,4 @@
{ machine, ... }: {
networking = {
hostName = machine;
nftables.enable = true;
};
_: {
networking.nftables.enable = true;
services.tailscale.enable = true;
}

18
nixos/rosetta.nix Normal file
View file

@ -0,0 +1,18 @@
_: {
boot = {
initrd.availableKernelModules = [ "virtiofs"];
binfmt.registrations."rosetta" = {
interpreter = "/run/rosetta/rosetta";
fixBinary = true;
wrapInterpreterInShell = false;
matchCredentials = true;
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00'';
mask = ''\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'';
};
};
nix.settings = {
extra-platforms = [ "x86_64-linux" ];
extra-sandbox-paths = [ "/run/rosetta" "/run/binfmt" ];
};
}