feat: kw -> nixfiles, kw.secrets -> secrets

This commit is contained in:
Kat Inskip 2022-10-02 14:57:26 -07:00
parent 9794026f6c
commit ece1dbe466
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
63 changed files with 180 additions and 265 deletions

View file

@ -102,7 +102,9 @@ in {
field = head (reverseList parts);
path = if length parts > 1 then head parts else "password";
in nameValuePair "${config.esphome.name}-secret-${name}" ({
value.shellCommand = "bitw get ${path} -f ${field}";
value.shellCommand = let
bitw = pkgs.writeShellScriptBin "bitw" ''${pkgs.rbw-bitw}/bin/bitw -p gpg://${config.network.nodes.all.${builtins.getEnv "HOME_HOSTNAME"}.secrets.repo.bitw.source} "$@"'';
in "${bitw}/bin/bitw get ${path} -f ${field}";
type = "string";
sensitive = true;
})