From 6581bffacd88189a9b23dd5118c68006dc1e8ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 28 Sep 2025 19:02:13 +0800 Subject: [PATCH] home/gpg: add key --- nix/homeModules/common/gpg.nix | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/nix/homeModules/common/gpg.nix b/nix/homeModules/common/gpg.nix index 6091bd56..f20aca9f 100644 --- a/nix/homeModules/common/gpg.nix +++ b/nix/homeModules/common/gpg.nix @@ -5,19 +5,23 @@ }; programs.gpg.publicKeys = let - github = { - user, + fromUrl = { + url, hash, trust ? 5, }: { - source = pkgs.fetchurl { - url = "https://github.com/${user}.gpg"; - inherit hash; - }; + source = pkgs.fetchurl {inherit url hash;}; inherit trust; }; + + github = {user, ...} @ args: + fromUrl ( + builtins.removeAttrs args ["user"] + // {url = "https://github.com/${user}.gpg";} + ); in map github [ + # Do not depend on my own forgejo instance / self-host server to avoid a single point of failure { user = "leana8959"; hash = "sha256-Y+v/8bLkyUIe4vjToChQP3ChPxRV/DqI72OTsx6F0oo="; @@ -34,5 +38,11 @@ user = "confusedkernel"; hash = "sha256-9DdtDAcv+2Z0jJMSLAXbp5ne8uHYj5V/lNGi0kKSdv4="; } + ] + ++ map fromUrl [ + { + url = "https://eragon.re/pubkey.asc"; + hash = "sha256-xvNB+BxqxHqdVBnMhzX3eenN3KmjmdATFPHkPUGweAA="; + } ]; }