Compare commits
2 commits
f72961a863
...
7d9d2a93df
Author | SHA1 | Date | |
---|---|---|---|
Pierre Bourdon | 7d9d2a93df | ||
Pierre Bourdon | 9e609128af |
|
@ -13,6 +13,7 @@ in
|
|||
../modules/android-cache.nix
|
||||
../modules/garage.nix
|
||||
../modules/users/friends.nix
|
||||
../modules/bagel-container.nix
|
||||
];
|
||||
|
||||
networking.hostName = "epyc";
|
||||
|
|
26
modules/bagel-container.nix
Normal file
26
modules/bagel-container.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."systemd-nspawn@bagel" = {
|
||||
wantedBy = [ "machines.target" ];
|
||||
wants = [ "network.target" ];
|
||||
after = [ "network.target" ];
|
||||
overrideStrategy = "asDropin";
|
||||
};
|
||||
}
|
|
@ -34,12 +34,29 @@
|
|||
linkConfig.Name = "nat-lan";
|
||||
};
|
||||
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.Name = "wan";
|
||||
systemd.network.netdevs."10-wan-br" = {
|
||||
netdevConfig.Name = "wan-br";
|
||||
netdevConfig.Kind = "bridge";
|
||||
netdevConfig.MACAddress = "none";
|
||||
bridgeConfig.MulticastSnooping = false;
|
||||
};
|
||||
|
||||
systemd.network.links."10-wan-br" = {
|
||||
matchConfig.Name = "wan-br";
|
||||
linkConfig.MACAddressPolicy = "none";
|
||||
};
|
||||
|
||||
systemd.network.networks."10-wan-br" = {
|
||||
matchConfig.Name = "wan-br";
|
||||
linkConfig.RequiredForOnline = true;
|
||||
networkConfig.Address = [ config.networking.newtype.currentHost.ipv6 ];
|
||||
};
|
||||
|
||||
systemd.network.networks."10-wan" = {
|
||||
matchConfig.Name = "wan";
|
||||
networkConfig.Bridge = "wan-br";
|
||||
};
|
||||
|
||||
systemd.network.links."10-wan" = {
|
||||
matchConfig.MACAddress = "3c:ec:ef:7e:bd:c9";
|
||||
linkConfig.Name = "wan";
|
||||
|
|
Loading…
Reference in a new issue