integrate VM definitions

This commit is contained in:
Pim Kunis 2024-01-28 11:48:13 +01:00
parent e57f80df82
commit 472175c5a3
6 changed files with 296 additions and 216 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, machine, ... }:
let cfg = config.lab.networking;
in {
imports = [ ./dmz ];
@ -89,17 +89,18 @@ in {
config = {
networking = {
domain = "hyp";
hostName = machine.hostName;
domain = machine.domain;
nftables.enable = true;
useDHCP = machine.type == "virtual";
firewall = {
enable = true;
checkReversePath = false;
};
nftables.enable = true;
useDHCP = false;
};
systemd.network = {
systemd.network = lib.mkIf (machine.type == "physical") {
enable = true;
netdevs = {