system/hosts/asus-gl553vd/configs/wireguard/default.nix

22 lines
495 B
Nix
Raw Permalink Normal View History

{ config, hostsPath, ... }:
2024-04-16 02:51:46 +03:00
let
serverData = import (hostsPath + "/tatos/data.secret.nix");
2024-04-16 02:51:46 +03:00
in
{
age.secrets.wireguard-asus-gl553vd-private = {
file = ./wireguard-asus-gl553vd-private.age;
mode = "0400";
};
local.services.vpn.wireguard = {
enable = true;
ip = "10.20.30.4/24";
privateKeyFile = config.age.secrets.wireguard-asus-gl553vd-private.path;
server = {
inherit (serverData) addr;
inherit (serverData.wireguard) port publicKey;
};
};
}