1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-25 00:55:08 +03:00

secrets: create on entering a nix-shell

This commit is contained in:
Timothy DeHerrera 2020-01-03 17:54:27 -07:00
parent 73d3826d64
commit 89c2e04bb3
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
2 changed files with 11 additions and 4 deletions

View File

@ -112,10 +112,13 @@ your user should be declared here. For convenience, [home-manager][home-manager]
is available automatically for home directory setup.
## Secrets
Anything you wish to keep encrypted goes in the [secrets](secrets) directory.
Be sure to run `git crypt init`, before committing anything to this repo.
Be sure to check out the [documentation](https://github.com/AGWA/git-crypt) if
your not familiar.
Anything you wish to keep encrypted goes in the directory, which is created
on first entering a `nix-shell`.
Be sure to run `git crypt init`, before committing anything to this directory.
Be sure to check out git-crypts [documentation](https://github.com/AGWA/git-crypt)
if your not familiar. The filter is already set up to encrypt everything in this
folder by default.
To keep [profiles](profiles) resuable across configurations, secrets should
only be imported from the [users](users) directory.

View File

@ -24,6 +24,10 @@ pkgs.mkShell {
rebuild
];
shellHook = ''
mkdir -p secrets
'';
NIX_CONF_DIR = let
current = pkgs.lib.optionalString (builtins.pathExists /etc/nix/nix.conf)
(builtins.readFile /etc/nix/nix.conf);