From 0388993f406b124883d1bdc1803345d347854e67 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Sat, 25 May 2024 12:48:46 -0400 Subject: [PATCH] testing kubernetes network --- .vscode/settings.json | 4 +++- modules/kub_net.nix | 26 ++++++++++++++++++++++++++ users/richie/home/vscode/settings.json | 3 ++- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 modules/kub_net.nix diff --git a/.vscode/settings.json b/.vscode/settings.json index 60e8adb..2cc6c79 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,7 @@ "Compat", "concatLists", "Cryptodisk", + "devicemap", "dialout", "direnv", "disren", @@ -98,6 +99,7 @@ "zerotier", "zerotierone", "zhaofengli", - "zoxide" + "zoxide", + "ztkubnet" ] } diff --git a/modules/kub_net.nix b/modules/kub_net.nix new file mode 100644 index 0000000..f3c9a32 --- /dev/null +++ b/modules/kub_net.nix @@ -0,0 +1,26 @@ +{ lib, ... }: +{ + system.activationScripts.setZerotierName = lib.stringAfter [ "var" ] '' + echo "ebe7fbd44565ba9d=ztkubnet" > /var/lib/zerotier-one/devicemap + ''; + + services.zerotierone = { + enable = true; + joinNetworks = [ "ebe7fbd44565ba9d" ]; + }; + + networking = { + vlans = { + vlan100 = { + id = 100; + interface = "ztkubnet"; + }; + }; + interfaces.vlan100.ipv4.addresses = [ + { + address = "10.10.10.3"; + prefixLength = 24; + } + ]; + }; +} diff --git a/users/richie/home/vscode/settings.json b/users/richie/home/vscode/settings.json index 46c37e4..0284a76 100644 --- a/users/richie/home/vscode/settings.json +++ b/users/richie/home/vscode/settings.json @@ -60,5 +60,6 @@ // other "python.analysis.typeCheckingMode": "basic", "redhat.telemetry.enabled": true, - "gitlens.plusFeatures.enabled": false + "gitlens.plusFeatures.enabled": false, + "github.copilot.editor.enableAutoCompletions": true }