nixos/mpdscribble: Use replace-secret to avoid leaking secrets

Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.

talyz 3a29b7bf 7842e89b

Changed files
+1 -1
nixos
modules
services
+1 -1
nixos/modules/services/audio/mpdscribble.nix
···
replaceSecret = secretFile: placeholder: targetFile:
optionalString (secretFile != null) ''
-
${pkgs.replace}/bin/replace-literal -ef ${placeholder} "$(cat ${secretFile})" ${targetFile}'';
+
${pkgs.replace-secret}/bin/replace-secret '${placeholder}' '${secretFile}' '${targetFile}' '';
preStart = pkgs.writeShellScript "mpdscribble-pre-start" ''
cp -f "${cfgTemplate}" "${cfgFile}"