From ee6149941df4c816567a1d1c9ba308e8c7b61258 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Sun, 11 Dec 2022 17:43:44 -0500 Subject: [PATCH] nixos/routnerr-2: new WireGuard key and tailscale Signed-off-by: Matt Layher --- nixos/lib/vargen/main.go | 2 +- nixos/lib/vars.json | 2 +- nixos/routnerr-2/networking.nix | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/lib/vargen/main.go b/nixos/lib/vargen/main.go index 8ac4e7e..a32794a 100644 --- a/nixos/lib/vargen/main.go +++ b/nixos/lib/vargen/main.go @@ -95,7 +95,7 @@ func main() { Name: "wg0", Subnet: wg0, } - wg.addPeer("matt-3", "b3kX+KbsjHDajUIe7Q7F/kEfSNdJ3Phv9Z4zqqlD7iE=") + wg.addPeer("matt-3", "owbwahkmPWQg97iDSfn4dc80f2MYegEbnCAszExlbi8=") // Set up the output structure and create host/infra records. out := output{ diff --git a/nixos/lib/vars.json b/nixos/lib/vars.json index bd3a757..31477d9 100644 --- a/nixos/lib/vars.json +++ b/nixos/lib/vars.json @@ -264,7 +264,7 @@ "peers": [ { "name": "matt-3", - "public_key": "b3kX+KbsjHDajUIe7Q7F/kEfSNdJ3Phv9Z4zqqlD7iE=", + "public_key": "owbwahkmPWQg97iDSfn4dc80f2MYegEbnCAszExlbi8=", "allowed_ips": [ "192.168.20.10/32", "2600:6c4a:787f:1914::a/128", diff --git a/nixos/routnerr-2/networking.nix b/nixos/routnerr-2/networking.nix index 0b47af4..4b4a31d 100644 --- a/nixos/routnerr-2/networking.nix +++ b/nixos/routnerr-2/networking.nix @@ -1,6 +1,7 @@ { lib, ... }: let + unstable = import { }; vars = import ./lib/vars.nix; ethLink = (name: @@ -192,6 +193,12 @@ in { }; }; + services.tailscale = { + enable = true; + package = unstable.tailscale; + interfaceName = "ts0"; + }; + # Enable WireGuard Prometheus exporter and set up peer key/name mappings. # TODO: nixify the configuration. services.wireguard_exporter = {