mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
add nspawn container
This commit is contained in:
parent
014ddd954b
commit
221ffd2d60
1 changed files with 36 additions and 10 deletions
|
@ -40,16 +40,31 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall = {
|
networking = {
|
||||||
enable = true;
|
firewall = {
|
||||||
allowedTCPPorts = [
|
enable = true;
|
||||||
21
|
allowedTCPPorts = [
|
||||||
80
|
21
|
||||||
];
|
80
|
||||||
allowedUDPPorts = [
|
];
|
||||||
21
|
allowedUDPPorts = [
|
||||||
80
|
21
|
||||||
];
|
80
|
||||||
|
];
|
||||||
|
};
|
||||||
|
bridges.br0.interfaces = [ "enp41s0" ];
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces."br0" = {
|
||||||
|
useDHCP = true;
|
||||||
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.100.3";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
defaultGateway = "192.168.100.1";
|
||||||
|
nameservers = [ "192.168.100.1" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:a0:31e5::/64";
|
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f8:a0:31e5::/64";
|
||||||
|
@ -77,6 +92,17 @@
|
||||||
initialPassword = "backupPassword";
|
initialPassword = "backupPassword";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
containers = {
|
||||||
|
nyan = {
|
||||||
|
privateNetwork = true;
|
||||||
|
hostBridge = "br0"; # Specify the bridge name
|
||||||
|
localAddress = "192.168.100.5/24";
|
||||||
|
config = {
|
||||||
|
services.mastodon.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
vdb = {
|
vdb = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue