nixos/secrets.nix
Ivan Bushchik e5a3158d2e
uhhhhhhhhh
add secrets
refactor things
2023-07-28 15:39:50 +03:00

9 lines
336 B
Nix

let
canaryHash = builtins.hashFile "sha256" ./secrets/canary;
expectedHash = "bc6f38a927602241c5e0996b61ebd3a90d5356ca76dc968ec14df3cd45c6612c";
in
if canaryHash != expectedHash then abort "Secrets are not readable. Have you run `git-crypt unlock`?"
else {
hashed-password = builtins.readFile ./secrets/hashed-password;
}