mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 11:41:26 +00:00
Merge pull request 'Add rclone config creation' (#3) from ilchub-patch-1 into system-configuration
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config/pulls/3
This commit is contained in:
commit
41cbf0f14e
|
@ -14,6 +14,12 @@ in
|
||||||
CLOUDFLARE_DNS_API_TOKEN=${cfg.cloudflare.apiKey}
|
CLOUDFLARE_DNS_API_TOKEN=${cfg.cloudflare.apiKey}
|
||||||
CLOUDFLARE_ZONE_API_TOKEN=${cfg.cloudflare.apiKey}
|
CLOUDFLARE_ZONE_API_TOKEN=${cfg.cloudflare.apiKey}
|
||||||
'';
|
'';
|
||||||
|
rcloneConfig = builtins.replaceStrings [ "\n" "\"" "\\" ] [ "\\n" "\\\"" "\\\\" ] ''
|
||||||
|
[backblaze]
|
||||||
|
type = b2
|
||||||
|
account = ${cfg.backblaze.accountId}
|
||||||
|
key = ${cfg.backblaze.accountKey}
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
(if cfg.bitwarden.enable then "d /var/lib/bitwarden 0777 bitwarden_rs bitwarden_rs -" else "")
|
(if cfg.bitwarden.enable then "d /var/lib/bitwarden 0777 bitwarden_rs bitwarden_rs -" else "")
|
||||||
|
@ -21,6 +27,7 @@ in
|
||||||
(if cfg.pleroma.enable then "d /var/lib/pleroma 0600 pleroma pleroma - -" else "")
|
(if cfg.pleroma.enable then "d /var/lib/pleroma 0600 pleroma pleroma - -" else "")
|
||||||
"d /var/lib/restic 0600 restic - - -"
|
"d /var/lib/restic 0600 restic - - -"
|
||||||
"f /var/lib/restic/pass 0400 restic - - ${resticPass}"
|
"f /var/lib/restic/pass 0400 restic - - ${resticPass}"
|
||||||
|
"f /root/.config/rclone.conf 0400 root root - ${rcloneConfig}"
|
||||||
(if cfg.pleroma.enable then "f /var/lib/pleroma/secrets.exs 0755 pleroma pleroma - -" else "")
|
(if cfg.pleroma.enable then "f /var/lib/pleroma/secrets.exs 0755 pleroma pleroma - -" else "")
|
||||||
"f /var/domain 0444 selfprivacy-api selfprivacy-api - ${domain}"
|
"f /var/domain 0444 selfprivacy-api selfprivacy-api - ${domain}"
|
||||||
(if cfg.nextcloud.enable then "f /var/lib/nextcloud/db-pass 0440 nextcloud nextcloud - ${nextcloudDBPass}" else "")
|
(if cfg.nextcloud.enable then "f /var/lib/nextcloud/db-pass 0440 nextcloud nextcloud - ${nextcloudDBPass}" else "")
|
||||||
|
|
Loading…
Reference in a new issue