encryption stuff

This commit is contained in:
2024-09-27 00:47:55 -04:00
parent cc0f1da8d6
commit 23f25ab9a4
6 changed files with 10 additions and 15 deletions

View File

@@ -178,22 +178,13 @@
};
age.secrets.gnupg = {
file = ./secrets/gnupg.age;
path = "${homeDirectory}/.secrets/gnupg.tar";
file = ./secrets/my-gpg.age;
path = "${homeDirectory}/.secrets/my-gpg.asc";
};
home.activation.extractGnuPG =
let
gnupg_dir = "${homeDirectory}/.gnupg";
in
''
#!/bin/sh
rm -fr ${gnupg_dir} || true
mkdir -p ${gnupg_dir}
${pkgs.gnutar}/bin/tar xf ${config.age.secrets.gnupg.path} -C ${gnupg_dir}
find ${gnupg_dir} -type f -exec chmod 600 {} \;
find ${gnupg_dir} -type d -exec chmod 700 {} \;
'';
home.activation.extractGnuPG = ''
${pkgs.gnupg}/bin/gpg --import ${config.age.secrets.gnupg.path}
'';
#fish shell!
programs.fish = import ./progs/fish.nix { inherit pkgs; };

Binary file not shown.

Binary file not shown.

View File

@@ -13,6 +13,6 @@ in
[
"server-password.age"
"borg-laptop-password.age"
"gnupg.age"
"my-gpg.age"
]
))