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,22 +178,13 @@
}; };
age.secrets.gnupg = { age.secrets.gnupg = {
file = ./secrets/gnupg.age; file = ./secrets/my-gpg.age;
path = "${homeDirectory}/.secrets/gnupg.tar"; path = "${homeDirectory}/.secrets/my-gpg.asc";
}; };
home.activation.extractGnuPG = home.activation.extractGnuPG = ''
let ${pkgs.gnupg}/bin/gpg --import ${config.age.secrets.gnupg.path}
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 {} \;
'';
#fish shell! #fish shell!
programs.fish = import ./progs/fish.nix { inherit pkgs; }; 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" "server-password.age"
"borg-laptop-password.age" "borg-laptop-password.age"
"gnupg.age" "my-gpg.age"
] ]
)) ))