imports = [
(inputs.julm-nix + "/nixos/profiles/wireguard/wg-intra.nix")
];
+ systemd.services."wireguard-${wgIface}" = {
+ serviceConfig = {
+ LoadCredentialEncrypted = [ "privateKey:${./. + "/${wgIface}/privateKey.cred"}" ];
+ };
+ unitConfig = {
+ Upholds = [ "upnpc-${toString wg.listenPort}.service" ];
+ };
+ };
networking.wireguard.${wgIface}.peers = {
mermet.enable = true;
oignon.enable = true;
carotte.enable = true;
aubergine.enable = true;
};
- systemd.services."wireguard-${wgIface}" = {
- unitConfig.Upholds = [ "upnpc-${toString wg.listenPort}.service" ];
- };
networking.nftables.ruleset = ''
table inet filter {
chain input-intra {
}
'';
# Apparently required to get NAT reflection.
+ services.upnpc.enable = true;
services.upnpc.redirections = [
{
description = "WireGuard";