refactor: move guest system and common lib parts to extra-modules

This commit is contained in:
oddlama 2024-01-11 03:02:42 +01:00
parent ab9c6fc507
commit a44f73d3b0
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
16 changed files with 72 additions and 1092 deletions

View file

@ -59,7 +59,12 @@
../../modules
./guests/common.nix
./guests/${guestName}.nix
{node.secretsDir = ./secrets/${guestName};}
{
node.secretsDir = ./secrets/${guestName};
networking.nftables.firewall = {
zones.untrusted.interfaces = [config.guests.${guestName}.networking.mainLinkName];
};
}
];
};
@ -73,6 +78,11 @@
macvtap = "lan";
baseMac = config.repo.secrets.local.networking.interfaces.lan.mac;
};
extraSpecialArgs = {
inherit (inputs.self) nodes;
inherit (inputs.self.pkgs.x86_64-linux) lib;
inherit inputs minimal;
};
};
};
@ -83,6 +93,9 @@
// {
backend = "container";
container.macvlan = "lan";
extraSpecialArgs = {
inherit lib nodes inputs minimal;
};
};
};
in