nixos/ipfs: do not leak config to journal on startup

The preStart script for the IPFS service will print parts of the configuration
to stdout (and therefore, the journal) when applying profiles on startup. This
may lead to unwanted disclosure of private information, such as remote pinning
service API keys. Fix by sending stdout to /dev/null.
This commit is contained in:
Max 2022-06-13 21:14:49 +02:00
parent 914ef51ffa
commit 2a8bf9777d

View File

@ -257,7 +257,7 @@ in
'' + optionalString cfg.autoMigrate ''
${pkgs.ipfs-migrator}/bin/fs-repo-migrations -to '${cfg.package.repoVersion}' -y
'' + ''
ipfs --offline config profile apply ${profile}
ipfs --offline config profile apply ${profile} >/dev/null
fi
'' + optionalString cfg.autoMount ''
ipfs --offline config Mounts.FuseAllowOther --json true