Skip to content
Snippets Groups Projects
make-issuer.nix 1.4 KiB
Newer Older
{ hardware
, ristrettoSigningKeyPath
, stripeSecretKeyPath
    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"];
      };
    ../../nixos/modules/issuer.nix
  services.private-storage.sshUsers = sshUsers;
  services.private-storage-issuer = {
    enable = true;
Jean-Paul Calderone's avatar
Jean-Paul Calderone committed
    tls = true;
    ristrettoSigningKeyPath = deployment.secrets.ristretto-signing-key.destination;
    stripeSecretKeyPath = deployment.secrets.stripe-secret-key.destination;
    database = "SQLite3";
    databasePath = "/var/db/vouchers.sqlite3";
    inherit letsEncryptAdminEmail;
  };

  system.stateVersion = stateVersion;
}