summaryrefslogtreecommitdiff
path: root/os/cez/modules
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2025-07-30 18:42:37 +0530
committersinanmohd <sinan@sinanmohd.com>2025-07-30 18:42:37 +0530
commit2e2731380c81a020f7bad594f475a6b4da4465f1 (patch)
tree01a5806bc1883804c086b26eef7b38988d6872ed /os/cez/modules
parent4fcd418e5dbc75b66d04f103c49523f660aeefe6 (diff)
os/cez/wireguard: add bud
Diffstat (limited to 'os/cez/modules')
-rw-r--r--os/cez/modules/wireguard.nix58
1 files changed, 38 insertions, 20 deletions
diff --git a/os/cez/modules/wireguard.nix b/os/cez/modules/wireguard.nix
index 47b857a..3cffe66 100644
--- a/os/cez/modules/wireguard.nix
+++ b/os/cez/modules/wireguard.nix
@@ -25,27 +25,45 @@ let
in
{
sops.secrets."misc/wireguard" = { };
+ environment.systemPackages = [ helper ];
- networking.wg-quick.interfaces.${wgIface} = {
- autostart = false;
- address = [ "10.0.1.2/24" ];
- dns = [ "10.0.1.1" ];
- mtu = 1412;
- privateKeyFile = config.sops.secrets."misc/wireguard".path;
+ networking.wg-quick.interfaces = {
+ ${wgIface} = {
+ autostart = false;
+ address = [ "10.0.1.2/24" ];
+ dns = [ "10.0.1.1" ];
+ mtu = 1412;
+ privateKeyFile = config.sops.secrets."misc/wireguard".path;
- peers = [
- {
- publicKey = "wJMyQDXmZO4MjYRk6NK4+J6ZKWLTTZygAH+OwbPjOiw=";
- allowedIPs = [
- "10.0.1.0/24"
- "104.16.0.0/12"
- "172.64.0.0/13"
- ];
- endpoint = "${domain}:51820";
- persistentKeepalive = 25;
- }
- ];
- };
+ peers = [
+ {
+ publicKey = "wJMyQDXmZO4MjYRk6NK4+J6ZKWLTTZygAH+OwbPjOiw=";
+ allowedIPs = [
+ "10.0.1.0/24"
+ "104.16.0.0/12"
+ "172.64.0.0/13"
+ ];
+ endpoint = "${domain}:51820";
+ persistentKeepalive = 25;
+ }
+ ];
+ };
- environment.systemPackages = [ helper ];
+ bud = {
+ autostart = true;
+ address = [ "10.54.132.2/24" ];
+ dns = [ "10.54.132.1" ];
+ mtu = 1420;
+ privateKeyFile = config.sops.secrets."misc/wireguard".path;
+
+ peers = [
+ {
+ publicKey = "O2GRMEWf22YRGKexHAdg1fitucTZ/U/om2MWEJMeyFQ=";
+ allowedIPs = [ "10.54.132.0/24" ];
+ endpoint = "dev.bud.studio:51820";
+ persistentKeepalive = 25;
+ }
+ ];
+ };
+ };
}