Skip to content
Snippets Groups Projects
Commit f0794576 authored by Florian Sesser's avatar Florian Sesser
Browse files

clean up server public key config leftovers

parent 0def8276
No related branches found
No related tags found
No related merge requests found
......@@ -23,14 +23,6 @@
permissions = "0400";
action = ["sudo" "systemctl" "restart" "wireguard-monitoringvpn.service"];
};
"monitoringvpn-public-key" = {
source = "../../PrivateStorageSecrets/monitoringvpn/server.pub";
destination = "/run/keys/monitoringvpn/server.pub";
owner.user = "root";
owner.group = "root";
permissions = "0444";
action = ["sudo" "systemctl" "restart" "wireguard-monitoringvpn.service"];
};
"monitoringvpn-preshared-key" = {
source = monitoringvpnPresharedKeyPath;
destination = "/run/keys/monitoringvpn/preshared.key";
......
......@@ -14,18 +14,6 @@ in {
File with base64 private key generated by <command>wg genkey</command>.
'';
};
publicKeyFile = lib.mkOption {
type = lib.types.path;
example = lib.literalExample /run/keys/monitoringvpn/host.pub;
description = ''
File with base64 public key generated by <command>cat private.key | wg pubkey > pubkey.pub</command>.
Cannot have white space or new lines.
Shorthand for public and private key:
<command>wg genkey | tee peer_A.key | wg pubkey > peer_A.pub</command>
TBD the pub files must not have white space or new lines, remove with
them, for example <command>perl -pe 's/\s+//g'</command>
'';
};
presharedKeyFile = lib.mkOption {
type = lib.types.path;
example = lib.literalExample /run/keys/monitoringvpn/preshared.key;
......@@ -59,7 +47,7 @@ in {
};
endpointPublicKeyFile = lib.mkOption {
type = lib.types.path;
example = lib.literalExample /run/keys/monitoringvpn/server.pub;
example = lib.literalExample ../../PrivateStorageSecrets/monitoringvpn/server.pub;
default = ../../../../morph/PrivateStorageSecrets/monitoringvpn/server.pub;
description = ''
File with base64 public key generated by <command>cat private.key | wg pubkey > pubkey.pub</command>.
......@@ -75,7 +63,7 @@ in {
{
allowedIPs = cfg.client.allowedIPs;
endpoint = cfg.client.endpoint; # meaning: the server.
publicKey = builtins.readFile(cfg.client.endpointPublicKeyFile);
publicKey = lib.fileContents(cfg.client.endpointPublicKeyFile);
presharedKeyFile = toString cfg.client.presharedKeyFile;
persistentKeepalive = 25;
}
......
......@@ -19,14 +19,6 @@ in {
File with base64 private key generated by <command>wg genkey</command>.
'';
};
publicKeyFile = lib.mkOption {
type = lib.types.path;
example = lib.literalExample /run/keys/monitoringvpn/server.pub;
default = /run/keys/monitoringvpn/server.pub;
description = ''
File with base64 public key generated by <command>cat private.key | wg pubkey > pubkey.pub</command>.
'';
};
presharedKeyFile = lib.mkOption {
type = lib.types.path;
example = lib.literalExample /run/keys/monitoringvpn/preshared.key;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment