2024-06-23 12:13:53 +00:00
|
|
|
# Stateful/mutable container used for Bagel (tm) related infra (mostly
|
|
|
|
# rebuilding nixpkgs a lot).
|
|
|
|
#
|
|
|
|
# System image is stored at /var/lib/machines/bagel.
|
|
|
|
{
|
|
|
|
systemd.nspawn.bagel = {
|
|
|
|
execConfig = {
|
|
|
|
Boot = true;
|
|
|
|
Ephemeral = false;
|
|
|
|
PrivateUsers = true;
|
|
|
|
NotifyReady = true;
|
|
|
|
LinkJournal = "try-guest";
|
|
|
|
};
|
|
|
|
|
|
|
|
networkConfig = {
|
|
|
|
Bridge = "wan-br";
|
2024-06-23 18:24:46 +00:00
|
|
|
VirtualEthernetExtra = "vb-bagel-v4:host1";
|
2024-06-23 12:13:53 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services."systemd-nspawn@bagel" = {
|
|
|
|
wantedBy = [ "machines.target" ];
|
|
|
|
wants = [ "network.target" ];
|
|
|
|
after = [ "network.target" ];
|
|
|
|
overrideStrategy = "asDropin";
|
|
|
|
};
|
2024-06-23 18:24:46 +00:00
|
|
|
|
|
|
|
systemd.network.networks."20-vb-bagel-v4" = {
|
|
|
|
matchConfig.Name = "vb-bagel-v4";
|
|
|
|
networkConfig.Address = [ "172.16.100.1/24" ];
|
|
|
|
networkConfig.IPMasquerade = true;
|
|
|
|
};
|
2024-06-23 12:13:53 +00:00
|
|
|
}
|