forked from fediversity/fediversity
working networking
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
parent
811f5c3f84
commit
ea26048e58
1 changed files with 41 additions and 4 deletions
|
|
@ -24,13 +24,13 @@ let
|
||||||
];
|
];
|
||||||
key-file = "/root/.ssh/id_ed25519";
|
key-file = "/root/.ssh/id_ed25519";
|
||||||
node-name = "pve";
|
node-name = "pve";
|
||||||
bridge = "br0";
|
bridge = "br-vm";
|
||||||
vlanId = 0;
|
vlanId = 0;
|
||||||
imageDatastoreId = "local";
|
imageDatastoreId = "local";
|
||||||
vmDatastoreId = "local";
|
vmDatastoreId = "local";
|
||||||
cdDatastoreId = "local";
|
cdDatastoreId = "local";
|
||||||
ipv4Gateway = "192.168.1.1";
|
ipv4Gateway = "192.168.10.1";
|
||||||
ipv4Address = "192.168.1.236/24";
|
ipv4Address = "192.168.10.236/24";
|
||||||
ipv6Gateway = "";
|
ipv6Gateway = "";
|
||||||
ipv6Address = "";
|
ipv6Address = "";
|
||||||
};
|
};
|
||||||
|
|
@ -47,7 +47,6 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
../common/data-model-options.nix
|
../common/data-model-options.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
name = "deployment-model";
|
name = "deployment-model";
|
||||||
sourceFileset = lib.fileset.unions [
|
sourceFileset = lib.fileset.unions [
|
||||||
../../run/tf-proxmox/run.sh
|
../../run/tf-proxmox/run.sh
|
||||||
|
|
@ -63,6 +62,43 @@ in
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
];
|
];
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
networking.vlans = {
|
||||||
|
vlan0 = {
|
||||||
|
id = 0;
|
||||||
|
interface = "eth0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.useDHCP = false;
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
bridges.br-vm.interfaces = [ ]; # internal bridge
|
||||||
|
interfaces.br-vm.ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.10.1";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
# Timed out waiting for device /sys/subsystem/net/devices/br0
|
||||||
|
interfaces.br0.ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.1.3";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
nat = {
|
||||||
|
enable = true;
|
||||||
|
# Timed out waiting for device /sys/subsystem/net/devices/br0
|
||||||
|
externalInterface = "br0";
|
||||||
|
internalInterfaces = [ "br-vm" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
|
||||||
|
|
||||||
|
networking.defaultGateway = {
|
||||||
|
interface = "br0";
|
||||||
|
address = "192.168.1.1";
|
||||||
|
};
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
password = "mytestpw";
|
password = "mytestpw";
|
||||||
hashedPasswordFile = lib.mkForce null;
|
hashedPasswordFile = lib.mkForce null;
|
||||||
|
|
@ -85,6 +121,7 @@ in
|
||||||
../../modules/terraform-backend
|
../../modules/terraform-backend
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.firewall.enable = false;
|
||||||
nix.nixPath = [
|
nix.nixPath = [
|
||||||
(lib.concatStringsSep ":" (lib.mapAttrsToList (k: v: k + "=" + v) sources))
|
(lib.concatStringsSep ":" (lib.mapAttrsToList (k: v: k + "=" + v) sources))
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue