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.
main
Max 2 years ago
parent 914ef51ffa
commit 2a8bf9777d
  1. 2
      nixos/modules/services/network-filesystems/ipfs.nix

@ -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

Loading…
Cancel
Save