Added character escaping

This commit is contained in:
Illia Chub 2020-12-23 19:10:24 +02:00
parent eea3109ecf
commit e579054e19

View file

@ -136,24 +136,24 @@ EOF
{ {
systemd.tmpfiles.rules = systemd.tmpfiles.rules =
let let
nextcloudDBPass = builtins.replaceStrings [ "\n" "\"" "\\" ] [ "\\n" "\\\"" "\\\\" ] '' nextcloudDBPass = builtins.replaceStrings [ "\n" "\"" "\\\" ] [ "\\\n" "\\\\\"" "\\\\\\\\" ] ''
irememberMyownvillagewhereiwasdrillingshit1 irememberMyownvillagewhereiwasdrillingshit1
''; '';
nextcloudAdminPass = builtins.replaceStrings [ "\n" "\"" "\\" ] [ "\\n" "\\\"" "\\\\" ] '' nextcloudAdminPass = builtins.replaceStrings [ "\n" "\"" "\\\" ] [ "\\\n" "\\\\\"" "\\\\\\\\" ] ''
irememberMyownvillagewhereiwasdrillingshit1 irememberMyownvillagewhereiwasdrillingshit1
''; '';
resticPass = builtins.replaceStrings [ "\n" "\"" "\\" ] [ "\\n" "\\\"" "\\\\" ] '' resticPass = builtins.replaceStrings [ "\n" "\"" "\\\" ] [ "\\\n" "\\\\\"" "\\\\\\\\" ] ''
irememberMyownvillagewhereiwasdrillingshit1 irememberMyownvillagewhereiwasdrillingshit1
''; '';
in in
[ [
"d /var/restic 0660 restic - - -" "d /var/restic 0660 restic - - -"
"d /var/bitwarden 0777 bitwarden_rs bitwarden_rs -" "d /var/bitwarden 0777 bitwarden_rs bitwarden_rs -"
"d /var/api 0775 unit unit -" "d /var/api 0775 unit unit -"
"d /var/bitwarden/backup 0777 bitwarden_rs bitwarden_rs -" "d /var/bitwarden/backup 0777 bitwarden_rs bitwarden_rs -"
"f /var/restic/restic-repo-password 0660 restic - - \${resticPass}" "f /var/restic/restic-repo-password 0660 restic - - \${resticPass}"
"f /var/nextcloud-db-pass 0440 nextcloud nextcloud - \${nextcloudDBPass}" "f /var/nextcloud-db-pass 0440 nextcloud nextcloud - \${nextcloudDBPass}"
"f /var/nextcloud-admin-pass 0440 nextcloud nextcloud - \${nextcloudAdminPass}" "f /var/nextcloud-admin-pass 0440 nextcloud nextcloud - \${nextcloudAdminPass}"
]; ];
} }
EOF EOF