Pass traffic through genesis
* keepalived does not work with Nebula VPN * update Genesis firewall to allow passing through local traffic * target all traffic directly to the LAN IP using genesis's routing
This commit is contained in:
@@ -15,8 +15,6 @@ let
|
||||
sha256 = "sha256-Qs1qJmgZm8q9xZsORjT/N/wzpbWVVODXtzDpjnAYMuQ=";
|
||||
};
|
||||
keepaliveIp = "10.42.5.1";
|
||||
nebulaName = "k3s.nebula.thehellings.com";
|
||||
nebulaIp = "10.157.100.1";
|
||||
in
|
||||
{
|
||||
options.greg = {
|
||||
@@ -46,13 +44,6 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.greg.nebula.enable;
|
||||
message = "Configure Nebula for this host, first";
|
||||
}
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
bw_secret.file = ../../secrets/kubernetes/bw_secret.age;
|
||||
dendrite_key.file = ../../secrets/dendrite_key.age;
|
||||
@@ -106,8 +97,6 @@ in
|
||||
"--tls-san ${config.networking.hostName}.thehellings.lan"
|
||||
"--tls-san ${config.networking.hostName}.shire-zebra.ts.net"
|
||||
"--tls-san ${keepaliveIp}"
|
||||
"--tls-san ${nebulaName}"
|
||||
"--tls-san ${nebulaIp}"
|
||||
];
|
||||
manifests = {
|
||||
cert-manager.source = cert-manager;
|
||||
@@ -139,21 +128,6 @@ in
|
||||
advert_int 1
|
||||
'';
|
||||
};
|
||||
k3s-nebula = {
|
||||
interface = "nebula0";
|
||||
priority = 1;
|
||||
state = if (config.networking.hostName == "isaiah") then "MASTER" else "BACKUP";
|
||||
virtualIps = [
|
||||
{
|
||||
addr = "${nebulaIp}/16";
|
||||
dev = "nebula0";
|
||||
}
|
||||
];
|
||||
virtualRouterId = 78;
|
||||
extraConfig = ''
|
||||
advert_int 1
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
openiscsi = {
|
||||
|
||||
+13
-2
@@ -23,6 +23,13 @@ with lib;
|
||||
type = types.str;
|
||||
description = "Kernel module type to install - amd, intel, etc";
|
||||
};
|
||||
host = mkOption {
|
||||
type = types.enum [
|
||||
"libvirt"
|
||||
"vbox"
|
||||
];
|
||||
description = "Which VM hosting type to configure";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -35,7 +42,6 @@ with lib;
|
||||
nixos-generators
|
||||
packer
|
||||
swtpm
|
||||
virt-manager
|
||||
virtio-win
|
||||
xorriso
|
||||
];
|
||||
@@ -44,7 +50,7 @@ with lib;
|
||||
|
||||
# Enable the virtualisation services
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
libvirtd = mkIf (cfg.host == "libvirt") {
|
||||
enable = true;
|
||||
onBoot = "ignore"; # Do not auto-restart VMs on boot, unless they are marked autostart
|
||||
qemu = {
|
||||
@@ -54,6 +60,11 @@ with lib;
|
||||
};
|
||||
};
|
||||
};
|
||||
virtualbox.host = mkIf (cfg.host == "vbox") {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
headless = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = "options kvm_${cfg.system} nested=1";
|
||||
|
||||
Reference in New Issue
Block a user