This commit is contained in:
parent
a6931fbc4c
commit
b0c9f649b3
3 changed files with 39 additions and 1 deletions
37
hosts/physique/hyponix/services/wireguard.nix
Normal file
37
hosts/physique/hyponix/services/wireguard.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{config, ...}:
|
||||||
|
let
|
||||||
|
listenPort = 53141;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
networking.firewall.allowedUDPPorts = [ listenPort ];
|
||||||
|
|
||||||
|
age.secrets.wg-key-hyponix = {
|
||||||
|
file = "../../../../secrets/services/wireguard/wg-key-hyponix.age";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.wireguard = {
|
||||||
|
enable = true;
|
||||||
|
interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
ips = ["10.100.10.2/24" "fd00::2/7"];
|
||||||
|
|
||||||
|
listenPort = listenPort;
|
||||||
|
|
||||||
|
privateKeyFile = config.age.secrets.wg-key-hyponix.path;
|
||||||
|
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
name = "pixos";
|
||||||
|
publicKey = "kaPe5pz2NTW9yMSy92wCV6WQF/sDYK6hHf8e9yN1ZlY=";
|
||||||
|
allowedIPs = [
|
||||||
|
"fd00::1/128"
|
||||||
|
"10.100.0.1/32"
|
||||||
|
];
|
||||||
|
endpoint = "pixos.bytestall.info:${listenPort}";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8,10 +8,11 @@ in
|
||||||
let
|
let
|
||||||
admins = [ lzebulon ];
|
admins = [ lzebulon ];
|
||||||
physiques = [ hyponix ];
|
physiques = [ hyponix ];
|
||||||
servers = hyponix;
|
servers = [ hyponix ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"secrets/services/forgejo/forgejo-runner-token-1.age".publicKeys = admins ++ [ hyponix ];
|
"secrets/services/forgejo/forgejo-runner-token-1.age".publicKeys = admins ++ [ hyponix ];
|
||||||
"secrets/services/searxng.age".publicKeys = admins ++ [ hyponix ];
|
"secrets/services/searxng.age".publicKeys = admins ++ [ hyponix ];
|
||||||
|
"secrets/services/wireguard/wg-key-hyponix.age".publicKeys = admins ++ [hyponix];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
BIN
secrets/services/wireguard/wg-key-hyponix.age
Normal file
BIN
secrets/services/wireguard/wg-key-hyponix.age
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue