commit e2efdd87d3916787e4574c06d30707522eea0f3f
parent 9cb02eca9ab870a532c207a014152c61580257cb
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 29 Nov 2026 20:54:20 +0000
move bordervm local cruft into optional untracked module
Diffstat:
1 file changed, 2 insertions(+), 40 deletions(-)
diff --git a/bordervm-configuration.nix b/bordervm-configuration.nix
@@ -67,7 +67,8 @@ in
};
imports = [
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
- ];
+ ] ++ (let f = ./local/bordervm-configuration-module.nix;
+ in lib.optional (builtins.pathExists f) f);
config = {
boot.kernelParams = [ "loglevel=9" ];
systemd.services.pppoe =
@@ -117,33 +118,11 @@ in
virtualisation = {
forwardPorts = [
- # {
- # # guest tang service exposed on host for easy querying
- # from = "host";
- # host.port = 7654;
- # guest.port = 7654;
- # }
{
host.port = 2222;
guest.address = "10.0.2.15";
guest.port = 22;
}
- {
- # expose victorialogs on host so (clients attached to) guest
- # can log
- from = "guest"; # packets are forwarded from guest
- guest.address = "10.0.2.10";
- guest.port = 443;
- host.address = "127.0.0.1";
- host.port = 443;
- }
- {
- from = "guest"; # packets are forwarded from guest
- guest.address = "10.0.2.10";
- guest.port = 19613;
- host.address = "127.0.0.1";
- host.port = 19613;
- }
];
qemu = {
networkingOptions = [ ];
@@ -169,14 +148,6 @@ in
};
};
- services.tang = {
- enable = true;
- ipAddressAllow = [
- "10.0.0.0/24"
- "0.0.0.0/0"
- ];
- };
-
environment.systemPackages =
let
wireshark-nogui = pkgs.wireshark.override { withQt = false; };
@@ -190,7 +161,6 @@ in
iptables
usbutils
busybox
- clevis
];
security.sudo.wheelNeedsPassword = false;
networking = {
@@ -211,14 +181,6 @@ in
enable = true;
internalInterfaces = [ "eth1" ];
externalInterface = "eth0";
- extraCommands = ''
- portfwd() {
- iptables -t nat -A PREROUTING -p tcp --dport $2 -j DNAT --to-destination $1:$2
- iptables -t nat -A POSTROUTING -p tcp -d $1 --dport $2 -j SNAT --to-source 10.0.0.1
- }
- portfwd 10.0.2.10 443
- portfwd 10.0.2.10 19613
- '';
};
};
users.users.liminix = {