0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/xrdp: use --replace-fail with substituteInPlace (#392206)

This commit is contained in:
Pol Dellaiera 2025-03-23 19:38:42 +01:00 committed by GitHub
commit 7324582e6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,17 +20,17 @@ let
chmod +x $out/startwm.sh
substituteInPlace $out/xrdp.ini \
--replace "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \
--replace "certificate=" "certificate=${cfg.sslCert}" \
--replace "key_file=" "key_file=${cfg.sslKey}" \
--replace LogFile=xrdp.log LogFile=/dev/null \
--replace EnableSyslog=true EnableSyslog=false
--replace-fail "#rsakeys_ini=" "rsakeys_ini=/run/xrdp/rsakeys.ini" \
--replace-fail "certificate=" "certificate=${cfg.sslCert}" \
--replace-fail "key_file=" "key_file=${cfg.sslKey}" \
--replace-fail LogFile=xrdp.log LogFile=/dev/null \
--replace-fail EnableSyslog=true EnableSyslog=false
substituteInPlace $out/sesman.ini \
--replace LogFile=xrdp-sesman.log LogFile=/dev/null \
--replace EnableSyslog=1 EnableSyslog=0 \
--replace startwm.sh $out/startwm.sh \
--replace reconnectwm.sh $out/reconnectwm.sh \
--replace-fail LogFile=xrdp-sesman.log LogFile=/dev/null \
--replace-fail EnableSyslog=1 EnableSyslog=0 \
--replace-fail startwm.sh $out/startwm.sh \
--replace-fail reconnectwm.sh $out/reconnectwm.sh \
# Ensure that clipboard works for non-ASCII characters
sed -i -e '/.*SessionVariables.*/ a\