encryption stuff
This commit is contained in:
parent
cc0f1da8d6
commit
23f25ab9a4
4
.git-crypt/.gitattributes
vendored
Normal file
4
.git-crypt/.gitattributes
vendored
Normal 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
|
||||
Binary file not shown.
@ -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.
BIN
nix/home-manager/secrets/my-gpg.age
Normal file
BIN
nix/home-manager/secrets/my-gpg.age
Normal file
Binary file not shown.
@ -13,6 +13,6 @@ in
|
||||
[
|
||||
"server-password.age"
|
||||
"borg-laptop-password.age"
|
||||
"gnupg.age"
|
||||
"my-gpg.age"
|
||||
]
|
||||
))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user