secrets-store: print message once

This commit is contained in:
Michele Guerini Rocco 2020-10-27 07:47:19 +01:00
parent 05d878545c
commit f42a287ca2
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -126,13 +126,15 @@ in {
# `user` activation script hasn't run yet. # `user` activation script hasn't run yet.
config.system.activationScripts.secrets-own = { config.system.activationScripts.secrets-own = {
deps = [ "secrets-copy" "users" ]; deps = [ "secrets-copy" "users" ];
text = concatMapStrings (pair: text =
''
echo setting secrets ownership...
'' + concatMapStrings (pair:
let let
name = "${concatStringsSep "-" pair.path}"; name = "${concatStringsSep "-" pair.path}";
secret = pair.value; secret = pair.value;
in in
'' ''
echo setting secrets store ownership...
# Set ownership of ${name} # Set ownership of ${name}
chown ${secret.user}:${secret.group} /run/secrets/${name} chown ${secret.user}:${secret.group} /run/secrets/${name}
'') secretFiles; '') secretFiles;