diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-11-12 00:48:40 -0800 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-11-12 00:48:40 -0800 |
| commit | 2286ab880c94e17a29ad99561f87b2e357d4a780 (patch) | |
| tree | d6d7a3c67bce7ac45315841381be9485da27ec18 /pgp/default.nix | |
| parent | 3571e62d04e92542bdcaac83d340eebee14ea902 (diff) | |
add pgp keys, wkd
Diffstat (limited to 'pgp/default.nix')
| -rw-r--r-- | pgp/default.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pgp/default.nix b/pgp/default.nix new file mode 100644 index 0000000..3fd5961 --- /dev/null +++ b/pgp/default.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +let + domain = "kassouni.net"; + # gpg --with-wkd-hash -k alex@kassouni.net + hash = "cddpr77ezsy7h967hgjydxhhmnt76n8w"; + pubkey = pkgs.runCommandLocal "wkd-key-${domain}" { nativeBuildInputs = [ pkgs.gnupg ]; } '' + gpg --dearmor < ${./pubkey.asc} > $out + ''; +in +{ + services.nginx.virtualHosts.${domain}.locations = { + "= /.well-known/openpgpkey/hu/${hash}" = { + alias = "${pubkey}"; + extraConfig = '' + default_type application/octet-stream; + add_header Access-Control-Allow-Origin "*" always; + ''; + }; + + "= /.well-known/openpgpkey/policy".alias = "${pkgs.emptyFile}"; + + "= /pubkey.asc".alias = "${./pubkey.asc}"; + }; +} |