modules/wg-clerie: migrate to age secrets
This commit is contained in:
parent
f07dbd3c53
commit
11a5a520d8
BIN
hosts/astatine/secrets/wg-clerie.age
Normal file
BIN
hosts/astatine/secrets/wg-clerie.age
Normal file
Binary file not shown.
@ -11,8 +11,8 @@ in
|
||||
services.wg-clerie = {
|
||||
enable = mkEnableOption "VPN for public static IP";
|
||||
privateKeyFile = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/src/secrets/wireguard/wg-clerie";
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "Path to file containing private key for wireguard interface";
|
||||
};
|
||||
ipv6s = mkOption {
|
||||
@ -49,7 +49,7 @@ in
|
||||
networking.wireguard.enable = true;
|
||||
networking.wireguard.interfaces = {
|
||||
wg-clerie = {
|
||||
inherit (cfg) privateKeyFile;
|
||||
privateKeyFile = if cfg.privateKeyFile == null then config.age.secrets.wg-clerie.path else cfg.privateKeyFile;
|
||||
ips = cfg.ipv6s ++ cfg.ipv4s;
|
||||
table = "wg-clerie";
|
||||
peers = [
|
||||
|
Loading…
Reference in New Issue
Block a user