modules/wg-clerie: Lookup private key in sops too
This commit is contained in:
parent
b5fca78654
commit
dd1d36345c
@ -65,7 +65,9 @@ in
|
|||||||
networking.wireguard.enable = true;
|
networking.wireguard.enable = true;
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
wg-clerie = {
|
wg-clerie = {
|
||||||
privateKeyFile = if cfg.privateKeyFile == null then config.age.secrets.wg-clerie.path else cfg.privateKeyFile;
|
privateKeyFile = if cfg.privateKeyFile != null then cfg.privateKeyFile else
|
||||||
|
if builtins.elem "wg-clerie" (attrNames config.sops.secrets) then config.sops.secrets.wg-clerie.path else
|
||||||
|
config.age.secrets.wg-clerie.path;
|
||||||
ips = cfg.ipv6s ++ cfg.ipv4s;
|
ips = cfg.ipv6s ++ cfg.ipv4s;
|
||||||
table = "wg-clerie";
|
table = "wg-clerie";
|
||||||
peers = [
|
peers = [
|
||||||
|
Loading…
Reference in New Issue
Block a user