Newer
Older
{ hardware
, ristrettoSigningKeyPath
, issuerDomain
, letsEncryptAdminEmail
Jean-Paul Calderone
committed
, allowedChargeOrigins
, publicIPv4
}: rec {
targetHost = publicIPv4;
secrets = {
"ristretto-signing-key" = {
source = ristrettoSigningKeyPath;
destination = "/run/keys/ristretto.signing-key";
owner.user = "root";
owner.group = "root";
permissions = "0400";
action = ["sudo" "systemctl" "restart" "zkapissuer.service"];
};
"stripe-secret-key" = {
source = stripeSecretKeyPath;
destination = "/run/keys/stripe.secret-key";
owner.user = "root";
owner.group = "root";
permissions = "0400";
action = ["sudo" "systemctl" "restart" "zkapissuer.service"];
};
source = monitoringvpnSecretKeyDir + "/${monitoringvpnIPv4}.key";
permissions = "0400";
action = ["sudo" "systemctl" "restart" "wireguard-monitoringvpn.service"];
};
"monitoringvpn-preshared-key" = {
source = monitoringvpnSecretKeyDir + "/preshared.key";
destination = "/run/keys/monitoringvpn/preshared.key";
owner.user = "root";
owner.group = "root";
permissions = "0400";
action = ["sudo" "systemctl" "restart" "wireguard-monitoringvpn.service"];
};
};
};
imports = [
hardware
../../nixos/modules/issuer.nix
../../nixos/modules/monitoring/exporters/node.nix
services.private-storage.sshUsers = sshUsers;
services.private-storage-issuer = {
enable = true;
ristrettoSigningKeyPath = deployment.secrets.ristretto-signing-key.destination;
stripeSecretKeyPath = deployment.secrets.stripe-secret-key.destination;
database = "SQLite3";
databasePath = "/var/db/vouchers.sqlite3";
inherit letsEncryptAdminEmail;
domain = issuerDomain;
Jean-Paul Calderone
committed
inherit allowedChargeOrigins;
};
system.stateVersion = stateVersion;
services.private-storage.monitoring.vpn.client = {
enable = true;