fix: replace gpg key

This commit is contained in:
Malte Tammena 2023-11-06 09:59:38 +01:00
parent 323f17815c
commit 8994b48196
5 changed files with 29 additions and 8 deletions

View file

@ -1,6 +1,6 @@
{
gpg = {
id = "BCE9E4BF632E7CED";
grip = "869B80E964B00C46BEAD6122B780FB1B838234F6";
id = "437B3369EAE401C4";
grip = "A826E14C72FD63C377141B8155F5A51536A01E45";
};
}

View file

@ -1,9 +1,30 @@
{pkgs, ...}: let
conf = import ./conf.nix;
in {
home.packages = with pkgs; [yubikey-personalization];
secret = pkgs.writeShellApplication {
name = "secret";
runtimeInputs = [
pkgs.gnupg
];
text = ''
output=~/"$1.$(date +%s).enc"
gpg --encrypt --armor --output "$output" -r 0x0000 -r 0x0001 -r 0x0002 "$1" && echo "$1"
'';
};
programs.gpg = {enable = true;};
reveal = pkgs.writeShellApplication {
name = "reveal";
runtimeInputs = [
pkgs.gnupg
];
text = ''
output=$(echo "$1" | rev | cut -c16- | rev)
gpg --decrypt --output "$output" "$1" && echo "$1 -> $output"
'';
};
in {
home.packages = [pkgs.yubikey-personalization secret reveal];
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;

View file

@ -179,7 +179,7 @@
};
gpg = {
encryptByDefault = false;
key = "0xBCE9E4BF632E7CED";
key = "0x${(import ./conf.nix).gpg.id}";
signByDefault = true;
};
smtp.tls.enable = true;

View file

@ -37,7 +37,7 @@
in {
programs.password-store = {
enable = true;
settings = {PASSWORD_STORE_KEY = "BCE9E4BF632E7CED";};
settings.PASSWORD_STORE_KEY = (builtins.import ./conf.nix).gpg.id;
};
home.packages = [passmenu-bemenu pkgs.hackNerdLigatures];

View file

@ -1 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXnYMJtwgvSNpjysKzvRCjzyyQRB4yDtzynD7c5ALDZfRHvrgGQS11vk96ExClo66ll3vrFci5mBmGJf4/+yPBb3qiiovEHobjh5nIDHXYTg7tJDHivKIMQ3w8DmZwBKSLFlsH/UZe8NJVGrGR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