wireguard: add trinkgenossin, delite, blue-shell

This commit is contained in:
teutat3s 2024-08-25 00:13:53 +02:00
parent 15b507904f
commit d32abd7a7f
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1
16 changed files with 305 additions and 12 deletions

View file

@ -139,15 +139,15 @@
sshUser = username;
};
trinkgenossin = {
#hostname = "trinkgenossin.wg.pub.solar";
hostname = "trinkgenossin.wg.pub.solar";
sshUser = username;
};
delite = {
#hostname = "delite.wg.pub.solar";
hostname = "delite.wg.pub.solar";
sshUser = username;
};
blue-shell = {
#hostname = "delite.wg.pub.solar";
hostname = "blue-shell.wg.pub.solar";
sshUser = username;
};
};

View file

@ -12,8 +12,6 @@
"ip=dhcp"
];
services.openssh.openFirewall = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View file

@ -7,7 +7,7 @@
./disk-config.nix
./networking.nix
#./wireguard.nix
./wireguard.nix
#./backups.nix
];
}

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
flake,
...
}:
let
wireguardIPv4 = "10.7.6.7";
wireguardIPv6 = "fd00:fae:fae:fae:fae:7::";
in
{
networking.firewall.allowedUDPPorts = [ 51820 ];
age.secrets.wg-private-key.file = "${flake.self}/secrets/blue-shell-wg-private-key.age";
networking.wireguard.interfaces = {
wg-ssh = {
listenPort = 51820;
mtu = 1300;
ips = [
"${wireguardIPv4}/32"
"${wireguardIPv6}/96"
];
privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [
{
# flora-6.pub.solar
endpoint = "80.71.153.210:51820";
publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU=";
allowedIPs = [
"10.7.6.2/32"
"fd00:fae:fae:fae:fae:2::/96"
];
}
];
};
};
services.openssh.listenAddresses = [
{
addr = wireguardIPv4;
port = 22;
}
{
addr = "[${wireguardIPv6}]";
port = 22;
}
];
}

View file

@ -12,8 +12,6 @@
"ip=dhcp"
];
services.openssh.openFirewall = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View file

@ -7,7 +7,7 @@
./disk-config.nix
./networking.nix
#./wireguard.nix
./wireguard.nix
#./backups.nix
];
}

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
flake,
...
}:
let
wireguardIPv4 = "10.7.6.6";
wireguardIPv6 = "fd00:fae:fae:fae:fae:6::";
in
{
networking.firewall.allowedUDPPorts = [ 51820 ];
age.secrets.wg-private-key.file = "${flake.self}/secrets/delite-wg-private-key.age";
networking.wireguard.interfaces = {
wg-ssh = {
listenPort = 51820;
mtu = 1300;
ips = [
"${wireguardIPv4}/32"
"${wireguardIPv6}/96"
];
privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [
{
# flora-6.pub.solar
endpoint = "80.71.153.210:51820";
publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU=";
allowedIPs = [
"10.7.6.2/32"
"fd00:fae:fae:fae:fae:2::/96"
];
}
];
};
};
services.openssh.listenAddresses = [
{
addr = wireguardIPv4;
port = 22;
}
{
addr = "[${wireguardIPv6}]";
port = 22;
}
];
}

View file

@ -47,6 +47,33 @@
"fd00:fae:fae:fae:fae:4::/96"
];
}
{
# trinkgenossin.pub.solar
endpoint = "85.215.152.22:51820";
publicKey = "QWgHovHxtqiQhnHLouSWiT6GIoQDmuvnThYL5c/rvU4=";
allowedIPs = [
"10.7.6.5/32"
"fd00:fae:fae:fae:fae:5::/96"
];
}
{
# delite.pub.solar
endpoint = "5.255.119.132:51820";
publicKey = "ZT2qGWgMPwHRUOZmTQHWCRX4m14YwOsiszjsA5bpc2k=";
allowedIPs = [
"10.7.6.6/32"
"fd00:fae:fae:fae:fae:6::/96"
];
}
{
# blue-shell.pub.solar
endpoint = "194.13.83.205:51820";
publicKey = "bcrIpWrKc1M+Hq4ds3aN1lTaKE26f2rvXhd+93QrzR8=";
allowedIPs = [
"10.7.6.7/32"
"fd00:fae:fae:fae:fae:7::/96"
];
}
];
};
};

View file

@ -14,8 +14,6 @@
"ip=dhcp"
];
services.openssh.openFirewall = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View file

@ -6,7 +6,7 @@
./configuration.nix
./networking.nix
#./wireguard.nix
./wireguard.nix
#./backups.nix
];
}

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
flake,
...
}:
let
wireguardIPv4 = "10.7.6.5";
wireguardIPv6 = "fd00:fae:fae:fae:fae:5::";
in
{
networking.firewall.allowedUDPPorts = [ 51820 ];
age.secrets.wg-private-key.file = "${flake.self}/secrets/trinkgenossin-wg-private-key.age";
networking.wireguard.interfaces = {
wg-ssh = {
listenPort = 51820;
mtu = 1300;
ips = [
"${wireguardIPv4}/32"
"${wireguardIPv6}/96"
];
privateKeyFile = config.age.secrets.wg-private-key.path;
peers = flake.self.logins.admins.wireguardDevices ++ [
{
# flora-6.pub.solar
endpoint = "80.71.153.210:51820";
publicKey = "jtSR5G2P/nm9s8WrVc26Xc/SQLupRxyXE+5eIeqlsTU=";
allowedIPs = [
"10.7.6.2/32"
"fd00:fae:fae:fae:fae:2::/96"
];
}
];
};
};
services.openssh.listenAddresses = [
{
addr = wireguardIPv4;
port = 22;
}
{
addr = "[${wireguardIPv6}]";
port = 22;
}
];
}

View file

@ -0,0 +1,43 @@
age-encryption.org/v1
-> ssh-ed25519 eP5MMw xAObv9OBtCMHWnbnO9b9w5fiG3tkJJTvjFNWmYmGfhQ
sXmgq1drzY3rap8aD8/iMbMgjGkajfENkBQDdK/2TKQ
-> ssh-ed25519 uYcDNw sxw3K1xYG+OZQy+4U2UfX//ZElPaCieANzFHanJxfxw
VyhqjYppfHVb2jTceXLL/yYwEJE2uD9TY4PliHu7c0E
-> ssh-rsa f5THog
hRIMIg4P7SOOS3IGr2vF/TAdv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pʱ£†ç2Å}Éz-R4E<34>ÀN

Binary file not shown.

View file

@ -21,6 +21,12 @@ let
metronomKeys = [ metronom-host ];
trinkgenossinKeys = [ trinkgenossin-host ];
deliteKeys = [ delite-host ];
blueshellKeys = [ blue-shell-host ];
garageKeys = [
trinkgenossin-host
delite-host
@ -35,6 +41,9 @@ in
"tankstelle-wg-private-key.age".publicKeys = tankstelleKeys ++ adminKeys;
"flora6-wg-private-key.age".publicKeys = flora6Keys ++ adminKeys;
"metronom-wg-private-key.age".publicKeys = metronomKeys ++ adminKeys;
"trinkgenossin-wg-private-key.age".publicKeys = trinkgenossinKeys ++ adminKeys;
"delite-wg-private-key.age".publicKeys = deliteKeys ++ adminKeys;
"blue-shell-wg-private-key.age".publicKeys = blueshellKeys ++ adminKeys;
"mastodon-secret-key-base.age".publicKeys = nachtigallKeys ++ adminKeys;
"mastodon-otp-secret.age".publicKeys = nachtigallKeys ++ adminKeys;

View file

@ -0,0 +1,43 @@
age-encryption.org/v1
-> ssh-ed25519 NID4eA Q3E8hBMDQRxoJx6UGzECMZmkffdgyYlhGaloKFNmxw0
37DKT5sgmAEritSoPuW+O5dvjCH23pOAdFyJG0TnY6w
-> ssh-ed25519 uYcDNw zgfSabCBntiTnc0fdfDzpkq/AwUXSpyvsA14gkatP3w
tLbZDE6UB/xvC153mSGcGSSWKH+Ph1Ek5D+JTrWjzdk
-> ssh-rsa f5THog
0THw5q/Aa/wCzfqO/9YFBOvSfISS/O2cMHBlQ7NXzF2hlj+hzGjJeL2USmL8iZ7X
YToH0oy8lreVRYxfi/LUMyg14hQf11hTekT/sKc8m5eBm+8WiHbWJsQJKdRg6WVO
B2Ju+3QIZXBk7ajCIcVjgoJQy1JydXm5YQkZnI69icdtAEnYSEoVEpaPHkT7Et65
UUC/eegltWFSeJl4bzgceVXO3VtszoG/KkL7ToT2WX2Hbnb4R3U8cWLOTr4I6hzM
90h6mNaorm3bd5fysOoU3G531/eAqcC7QZQQGyCOEBBHgx0w32ZKpjqu8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ANst+LFA7ctwpz/d0PB8Gvjf6g
-> piv-p256 vRzPNw AmCpZNeI8ggIr211niro2CalG6ELXYubjXj2J01eSwL+
IPXLB01UKFj7tptbB7FmNbbjDGrqbEoizjNzzJvNsXs
-> piv-p256 zqq/iw Auwb+rr9JfTX9VoTKaDobEGFPIwJZUFAMolG8SvZ5ix6
+e5IWW7Sxy1T2F0Ykm1tKQIvGGJFODIrNdvrCKREvrI
-> ssh-ed25519 YFSOsg 5Eeo3PIUgfRgPrY/eR6aps8UB2NNNr9YJswZ5mPj5Fk
cN4Dwp+ZFN8UCptfVsAp3iGesYhry7umwGc77jom2Vo
-> ssh-ed25519 iHV63A RMH4ezLwPxlf9cLgFlWSrGMDdlySpIr22O3Nr4ESgkg
8Ll31aL8PCOFp5+TIhv7qYVzjnBMepWJSlT6PGBMtdM
-> ssh-ed25519 BVsyTA 9yQZMVRpIitqx4ggP9pswC2VBmtKHR8FqIiLAq6wdCs
g/dA5SXBUNyLFGuOEVwsPIu2sEyAS4y+5RlccymLfL0
-> ssh-ed25519 +3V2lQ unqrENNB2tJvICc/nAi31TZ8c7ilbFreww51f/Mi4nQ
y7QWtFtEUq8elK+Q2HxpGav3nx3dxDQd5ikn9DpIJ20
--- SJo44grQsKFl8WMnva4kMp88kMZ9D3EWnm3mN0Oe15c
~°ÙìÚŒx̆Il`<60>u²”˜ôÿÁÙ@«Ž'B#ÅRaˆ Ù£;«ã(»ÃÎïŠ<C3AF>Šò˜åŽ³&G3<Q<>sH‰ª~G ò)½¡®

View file

@ -24,6 +24,21 @@ resource "namecheap_domain_records" "pub-solar" {
type = "A"
address = "10.7.6.4"
}
record {
hostname = "trinkgenossin.wg"
type = "A"
address = "10.7.6.5"
}
record {
hostname = "delite.wg"
type = "A"
address = "10.7.6.6"
}
record {
hostname = "blue-shell.wg"
type = "A"
address = "10.7.6.7"
}
record {
hostname = "nachtigall.wg"
type = "AAAA"
@ -44,6 +59,21 @@ resource "namecheap_domain_records" "pub-solar" {
type = "AAAA"
address = "fd00:fae:fae:fae:fae:4::"
}
record {
hostname = "trinkgenossin.wg"
type = "AAAA"
address = "fd00:fae:fae:fae:fae:5::"
}
record {
hostname = "delite.wg"
type = "AAAA"
address = "fd00:fae:fae:fae:fae:6::"
}
record {
hostname = "blue-shell.wg"
type = "AAAA"
address = "fd00:fae:fae:fae:fae:7::"
}
record {
hostname = "flora-6"
type = "A"