kasei: add arch nspawn container

This commit is contained in:
Oystein Kristoffer Tveit 2024-10-05 12:08:58 +02:00
parent b3e782d716
commit db82ee3419
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 31 additions and 0 deletions

View File

@ -11,6 +11,9 @@
./services/tailscale.nix
./services/keybase.nix
./nspawn-containers/arch.nix
];
system.stateVersion = "22.05";
boot.binfmt.emulatedSystems = [

View File

@ -0,0 +1,28 @@
{ ... }:
{
systemd.targets.machines.enable = true;
systemd.nspawn."arch" = {
enable = true;
execConfig.Boot = true;
filesConfig = {
BindReadOnly = [
"/nix/store"
# "/etc/resolv.conf:/etc/resolv.conf"
];
Bind = [
"/home/h7x4/git"
"/home/h7x4/pico"
"/home/h7x4/Downloads"
];
};
networkConfig.Private = false;
};
systemd.services."systemd-nspawn@arch" = {
enable = true;
requiredBy = [ "machines.target" ];
overrideStrategy = "asDropin";
};
}