1 { config, inputs, ... }:
3 inherit (config.security) gnupg;
8 (inputs.julm-nix + "/nixos/profiles/wireguard/wg-intra.nix")
10 networking.wireguard.${iface}.peers = {
11 losurdo.enable = true;
14 networking.wireguard.interfaces.${iface} = {
15 privateKeyFile = gnupg.secrets."wireguard/${iface}/privateKey".path;
17 security.gnupg.secrets."wireguard/${iface}/privateKey" = {
19 systemdConfig.serviceConfig = {
20 before = [ "wireguard-${iface}.service" ];
21 wantedBy = [ "wireguard-${iface}.service" ];
22 requiredBy = [ "wireguard-${iface}.service" ];
26 systemd.services."wireguard-${iface}" = {
27 after = [ gnupg.secrets."wireguard/${iface}/privateKey".service ];
28 requires = [ gnupg.secrets."wireguard/${iface}/privateKey".service ];