From 5476b67957f6fe4a41ef193d0da4e586403712d6 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 2 Sep 2023 18:27:51 +0200 Subject: [PATCH] machines/syncthing: make sure folder exist --- machines/newton/syncthing.nix | 9 +++++++++ machines/serverle/syncthing.nix | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/machines/newton/syncthing.nix b/machines/newton/syncthing.nix index 14c17f4..32c68ae 100644 --- a/machines/newton/syncthing.nix +++ b/machines/newton/syncthing.nix @@ -3,6 +3,15 @@ sops.secrets."syncthing/key" = { }; sops.secrets."syncthing/cert" = { }; + # make sure folders exist writable + systemd.tmpfiles.rules = [ + "d /srv/data/ 0755 syncthing syncthing" + "d /srv/data/computer 0755 syncthing syncthing" + "d /srv/data/phone 0755 syncthing syncthing" + "d /srv/data/music 0755 syncthing syncthing" + "d /srv/data/photos 0755 syncthing syncthing" + ]; + services.syncthing = { enable = true; openDefaultPorts = true; diff --git a/machines/serverle/syncthing.nix b/machines/serverle/syncthing.nix index 1759eb9..be38a04 100644 --- a/machines/serverle/syncthing.nix +++ b/machines/serverle/syncthing.nix @@ -3,6 +3,16 @@ sops.secrets."syncthing/key" = { }; sops.secrets."syncthing/cert" = { }; + # make sure folders exist writable + systemd.tmpfiles.rules = [ + "d /srv/data/ 0755 syncthing syncthing" + "d /srv/data/computer 0755 syncthing syncthing" + "d /srv/data/phone 0755 syncthing syncthing" + "d /srv/data/music 0755 syncthing syncthing" + "d /srv/data/photos 0755 syncthing syncthing" + "d /srv/data/tmp/aria2 0755 syncthing syncthing" + ]; + services.syncthing = { enable = true; openDefaultPorts = true;