courge: wireguard: init
authorJulien Moutinho <julm+julm-nix@sourcephile.fr>
Sat, 2 Dec 2023 15:11:31 +0000 (16:11 +0100)
committerJulien Moutinho <julm+julm-nix@sourcephile.fr>
Sat, 2 Dec 2023 15:11:31 +0000 (16:11 +0100)
hosts/courge/wireguard.nix [new file with mode: 0644]
hosts/courge/wireguard/wg-intra/privateKey.cred [new file with mode: 0644]

diff --git a/hosts/courge/wireguard.nix b/hosts/courge/wireguard.nix
new file mode 100644 (file)
index 0000000..e12f615
--- /dev/null
@@ -0,0 +1,10 @@
+_:
+{
+  systemd.services."wireguard-wg-intra".serviceConfig.LoadCredentialEncrypted = [
+    "privateKey:${./wireguard/wg-intra/privateKey.cred}"
+  ];
+  networking.wireguard.wg-intra.peers.mermet.enable = true;
+  networking.wireguard.wg-intra.peers.losurdo.enable = false;
+  networking.wireguard.wg-intra.peers.aubergine.enable = false;
+  networking.wireguard.wg-intra.peers.oignon.enable = true;
+}
diff --git a/hosts/courge/wireguard/wg-intra/privateKey.cred b/hosts/courge/wireguard/wg-intra/privateKey.cred
new file mode 100644 (file)
index 0000000..a1eeaa2
Binary files /dev/null and b/hosts/courge/wireguard/wg-intra/privateKey.cred differ