Use Nitrokey as PGP smartcard

This commit is contained in:
Simon Bruder 2024-01-21 20:58:25 +01:00
parent 2c35fc4ec0
commit 54218c7278
Signed by: simon
GPG key ID: 347FF8699CDA0776
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2020-2022 Simon Bruder <simon@sbruder.de> # SPDX-FileCopyrightText: 2020-2024 Simon Bruder <simon@sbruder.de>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
@ -15,6 +15,10 @@ in
"simon@hitagi" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1kQUoPII8A9/bgPA+OrZGQLPA8MxkdmPSCCsfGMh9qRZfF7BSD8W6VdE/28tLw+39QeUl1+/9VuVvGjZBP1zBAbKIcKx4DjtgxpNXCsfWMjXFtpTGk2dyl71CaY5n72YlADxXYwtEvuwfNixgE2yTCefMbBsfwqYC0GZGiDlFtjxdg+RuUC8jU++C+WFUFct9gj9ieQ0LWjud+Oh0AF0JhyGnou+wVZIIO8mwo7Cc5xiPldXhbc13XiNC3mpNGCLFj+nh1feazk8TeAVDBps6xaDkOd+hDwTBQh8LoimePK7MiShzLvC38Vd/sim5ym/IqY634CjqBDGCMp1KXnqHUTT8CqeifMv10+aRJKUPevVkO3nEE3VoSPt7Ui9ZzLnL4qhZyygoBau+PvD2WCWm+gRwBkvU1uNrYKi4HIGhB/gXcYHKJimqJwLMyqG5Wv1jfuhn3ZZN+uNqTgdAznGgPRU1Q/Mx6nMEDiQip78qdYEc0YGwdb/TldEL6aHRjuNuZPpTW+zakQHiQTRb/0VdZT1bAwyT9yL0Uf40h706Kh/pKiSQ1yq1dlSdl3RlfedbqLqGjspds1iRSrSXyH2MBghPbz/SF7Vt4LW/tXF0rcyV7CU98ZvxJDWeN60OE0vPf/AT5udYyfPO1691y0F8jGKxGYYPg9R/Y5o7J24PbQ=="; "simon@hitagi" = "ssh-rsa AAAAB3NzaC1yc2E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# pgp key
"alpha" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE1KsR0pgwLfhbP/BDeyb7CLnIqbWiaS52QKUOYLtioH"; # Nitrokey 3
"beta" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOtp4pbIVjjXN7J277+pm5EyzIQVD5aHpoi45J1PNVCL"; # Nitrokey 3
"backup" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfsufQIdFzWK1B1uelCzt8XJaoublRPn1gjZvumSEr+"; # Offline backup key
}; };
}; };
trustedNames = lib.mkOption { trustedNames = lib.mkOption {
@ -24,6 +28,9 @@ in
"simon@hitagi" "simon@hitagi"
"simon@mayushii" "simon@mayushii"
"simon@nunotaba" "simon@nunotaba"
"alpha"
"beta"
"backup"
]; ];
}; };
trustedKeys = lib.mkOption { trustedKeys = lib.mkOption {

View file

@ -2,13 +2,13 @@
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
{ nixosConfig, ... }: { nixosConfig, pkgs, ... }:
{ {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
settings = { settings = {
default-key = "47E7559E037A35652DBBF8AA8D3C82F9F309F8EC"; default-key = "D48A1ACAB1CDBD170151662BB1A0B4A45885A031";
keyid-format = "none"; keyid-format = "none";
with-fingerprint = false; with-fingerprint = false;
with-subkey-fingerprint = true; with-subkey-fingerprint = true;