add tags to agenix-rekey provider

release
Matthew Salerno 1 year ago
parent 1d3184639a
commit dadd5bf720

@ -15,6 +15,10 @@ with lib;
mode = "640";
group = if (builtins.match ".*networkd.*" config.wirenix.configurer != null) then "systemd-network" else "root";
rekeyFile = config.wirenix.secretsDir + /wirenix-peer- + localPeerName + ".age";
generator.tags = [
"wirenix"
"wirenix.peer"
];
generator.script = {pkgs, file, ...}: ''
priv=$(${pkgs.wireguard-tools}/bin/wg genkey)
${pkgs.wireguard-tools}/bin/wg pubkey <<< "$priv" > ${lib.escapeShellArg (lib.removeSuffix ".age" file + ".pub")}
@ -27,6 +31,10 @@ with lib;
mode = "640";
group = if (builtins.match ".*networkd.*" config.wirenix.configurer != null) then "systemd-network" else "root";
rekeyFile = config.wirenix.secretsDir + /wirenix-subnet- + name + ".age";
generator.tags = [
"wirenix"
"wirenix.subnet"
];
generator.script = {pkgs, ...}: ''
psk=$(${pkgs.wireguard-tools}/bin/wg genpsk)
echo "$psk"

Loading…
Cancel
Save