configuration.nix/hosts/rico2/wireguard.nix

28 lines
656 B
Nix
Raw Normal View History

2024-06-30 17:54:04 +05:30
{ config, ... }: {
2024-07-06 00:54:18 +05:30
imports = [ ../shared/wireguard.nix ];
2024-07-02 23:20:11 +05:30
sops.secrets = {
"wireguard/rico2/pk" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
"wireguard/rico2/psk" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
2024-06-30 18:45:27 +05:30
};
2024-07-02 23:20:11 +05:30
2024-07-06 00:54:18 +05:30
nodeconfig.wireguard = {
2024-06-30 17:54:04 +05:30
enable = true;
2024-07-06 00:54:18 +05:30
listen-port = 51832;
pk-file = config.sops.secrets."wireguard/rico2/pk".path;
psk-file = config.sops.secrets."wireguard/rico2/psk".path;
node-ips = [
"10.10.10.12/24"
"fd7c:585c:c4ae::12/64"
];
2024-06-30 17:54:04 +05:30
};
}