15 lines
616 B
Nix
15 lines
616 B
Nix
{ runCommand, gnupg, ... }:
|
|
|
|
runCommand "clerie-keys" {
|
|
buildInputs = [ gnupg ];
|
|
} ''
|
|
mkdir -p $out/{ssh,gpg}
|
|
cp ${../../users/clerie/ssh.pub} $out/ssh/clerie_id.pub
|
|
|
|
export GNUPGHOME=$(pwd)
|
|
|
|
gpg --import-options import-export --armor -o $out/gpg/clerie@clerie.de.asc --import ${../../users/clerie/gpg.asc}
|
|
gpg --import-options import-export -o $out/gpg/clerie@clerie.de --import ${../../users/clerie/gpg.asc}
|
|
gpg --import-options show-only --with-colons --fingerprint --import ${../../users/clerie/gpg.asc} | awk -F: '$1 == "fpr" {print $10;}' | head -1 > $out/gpg/clerie@clerie.de.fingerprint.txt
|
|
''
|