1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-31 04:14:37 +00:00

add readonly option sopsFileHash

This commit is contained in:
Nick Cao 2021-07-04 13:45:09 +08:00
parent c4f7025e5d
commit 0d957142b6
No known key found for this signature in database
GPG key ID: 068A56CEF48FA2C1

View file

@ -70,6 +70,14 @@ let
Sops file the secret is loaded from.
'';
};
sopsFileHash = mkOption {
type = types.str;
readOnly = true;
default = if cfg.validateSopsFiles then "${builtins.hashFile "sha256" config.sopsFile}" else "";
description = ''
Hash of the sops file, useful in systemd.services.<name>.restartTriggers.
'';
};
};
});
manifest = pkgs.writeText "manifest.json" (builtins.toJSON {