encryption stuff

This commit is contained in:
Simon Gardling 2024-09-27 00:47:55 -04:00
parent cc0f1da8d6
commit 23f25ab9a4
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
6 changed files with 10 additions and 15 deletions

4
.git-crypt/.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
# Do not edit this file. To specify the files to encrypt, create your own
# .gitattributes file in the directory where your files are.
* !filter !diff
*.gpg binary

View File

@ -178,21 +178,12 @@
};
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!

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"
]
))