marabethia: Initialize new host

This commit is contained in:
Charlotte Van Petegem 2024-11-09 21:26:40 +01:00
parent 0128fd3fa7
commit ceac7a451a
No known key found for this signature in database
GPG key ID: 019E764B7184435A
72 changed files with 332 additions and 193 deletions

View file

@ -6,6 +6,10 @@
default = false;
example = true;
};
publicInterface = lib.mkOption {
default = "eno3";
example = "eno1";
};
publicIPV4 = lib.mkOption {
example = {
ip = "1.2.3.4";
@ -18,6 +22,10 @@
gateway = "1:2:3:ff:ff:ff:ff:ff";
};
};
internalInterface = lib.mkOption {
default = "eno4";
example = "eno2";
};
internalIPV4 = lib.mkOption {
example = "192.168.0.1";
};
@ -28,9 +36,9 @@
systemd.network = {
enable = true;
networks = with config.chvp.base.network.ovh; {
eno3 = {
"${publicInterface}" = {
enable = true;
matchConfig = { Name = "eno3"; };
matchConfig = { Name = "${publicInterface}"; };
address = [
"${publicIPV4.ip}/24"
"${publicIPV6.ip}/64"
@ -49,9 +57,9 @@
"2606:4700:4700::1001"
];
};
eno4 = {
"${internalInterface}" = {
enable = true;
matchConfig = { Name = "eno4"; };
matchConfig = { Name = "${internalInterface}"; };
address = [ "${internalIPV4}/16" ];
routes = [
{ Destination = "${internalIPV4}/16"; }