configuration.nix/hosts/layne/network.nix

42 lines
952 B
Nix
Raw Normal View History

2024-07-07 00:24:42 +05:30
{ config, ... }: {
imports = [
../shared/network.nix
../shared/networkd.nix
../shared/wireguard.nix
];
2024-07-03 19:22:10 +05:30
2024-07-07 00:24:42 +05:30
sops.secrets = {
"wireguard/layne/pk" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
"wireguard/layne/psk" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
2024-07-03 19:22:10 +05:30
};
2024-10-25 23:01:15 +05:30
"proton/layne" = {
mode = "400";
owner = config.users.users.root.name;
group = config.users.users.root.group;
};
2024-07-03 19:22:10 +05:30
};
2024-07-07 00:24:42 +05:30
nodeconfig.wireguard = {
2024-07-03 19:22:10 +05:30
enable = true;
2024-07-07 00:24:42 +05:30
listen-port = 51834;
pk-file = config.sops.secrets."wireguard/layne/pk".path;
psk-file = config.sops.secrets."wireguard/layne/psk".path;
node-ips = [
"10.10.10.14/24"
];
2024-07-03 19:22:10 +05:30
};
2024-10-25 23:01:15 +05:30
networking.wg-quick = {
interfaces = {
ProtonVPN.configFile = config.sops.secrets."proton/layne".path;
};
};
2024-07-03 19:22:10 +05:30
}