diff --git a/nixos/modules/services/networking/bee.nix b/nixos/modules/services/networking/bee.nix index da11ac9399ab..72483c41d02d 100644 --- a/nixos/modules/services/networking/bee.nix +++ b/nixos/modules/services/networking/bee.nix @@ -101,8 +101,7 @@ in { preStart = with cfg.settings; '' if ! test -f ${password-file}; then - < /dev/urandom tr -dc _A-Z-a-z-0-9 2> /dev/null | head -c32 > ${password-file} - chmod 0600 ${password-file} + < /dev/urandom tr -dc _A-Z-a-z-0-9 2> /dev/null | head -c32 | install -m 600 /dev/stdin ${password-file} echo "Initialized ${password-file} from /dev/urandom" fi if [ ! -f ${data-dir}/keys/libp2p.key ]; then