update vpn public key
This commit is contained in:
parent
394ce54810
commit
195bb6f159
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.dadada.networking;
|
cfg = config.dadada.networking;
|
||||||
|
vpnPubKey = "x/y6I59buVzv9Lfzl+b17mGWbzxU+3Ke9mQNa1DLsDI=";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
@ -122,7 +123,7 @@ in
|
||||||
|
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = "lFB2DWtzp55ajV0Fk/OWdO9JlGvN9QsayYKQQHV3GEs=";
|
publicKey = vpnPubKey;
|
||||||
allowedIPs = [ "fd42:9c3b:f96d::/48" ];
|
allowedIPs = [ "fd42:9c3b:f96d::/48" ];
|
||||||
endpoint = "vpn.dadada.li:51234";
|
endpoint = "vpn.dadada.li:51234";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
|
@ -140,7 +141,7 @@ in
|
||||||
systemd.services.wg-reresolve-dns = mkIf (cfg.vpnExtension != null) {
|
systemd.services.wg-reresolve-dns = mkIf (cfg.vpnExtension != null) {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.wireguard-tools}/bin/wg set dadada peer lFB2DWtzp55ajV0Fk/OWdO9JlGvN9QsayYKQQHV3GEs= endpoint vpn.dadada.li:51234 persistent-keepalive 25 allowed-ips fd42:9c3b:f96d::/48
|
${pkgs.wireguard-tools}/bin/wg set dadada peer ${vpnPubKey} endpoint vpn.dadada.li:51234 persistent-keepalive 25 allowed-ips fd42:9c3b:f96d::/48
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue