From 4a7e9d536b88a3ac2a3c19aa191ff5f6f880ca55 Mon Sep 17 00:00:00 2001 From: Anish L Date: Fri, 1 Jul 2022 23:18:00 +1000 Subject: [PATCH] add seafile keep trying syncthing backup syncthing --- flake.nix | 2 +- hosts/box/default.nix | 1 + profiles/seafile/default.nix | 13 +++++++++++++ profiles/syncthing/default.nix | 11 +++-------- 4 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 profiles/seafile/default.nix diff --git a/flake.nix b/flake.nix index f329c60b..38632dc6 100644 --- a/flake.nix +++ b/flake.nix @@ -127,7 +127,7 @@ suites = with profiles; rec { base = [ core users.root users.anish ]; sealight = [ base server ]; # matrix rsshub backup wireguard-server - mossnet = [ base server taskd shaarli wallabag dns monitoring nfs rss-bridge gonic headphones radicale syncthing ]; # hpi sync.music + mossnet = [ base server taskd shaarli wallabag dns monitoring nfs rss-bridge gonic headphones radicale seafile syncthing ]; # hpi syncthing sync.music cube = [ base site server ]; graphical = [ base bluetooth music sync.kitaab sync.website sync.cal wifi desktop ]; # syncthing curve = [ graphical secrets ]; diff --git a/hosts/box/default.nix b/hosts/box/default.nix index c4c6f2ee..aae435fe 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -28,6 +28,7 @@ "/var/www/shaarli-config" # sharli "/var/backup/postgresql" # wallabag "/var/lib/radicale" # radicale + "/home/anish/usr/syncthing" # syncthing ]; # seafile? # syncthing diff --git a/profiles/seafile/default.nix b/profiles/seafile/default.nix new file mode 100644 index 00000000..a3bb28ff --- /dev/null +++ b/profiles/seafile/default.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + services.seafile = { + enable = true; + seafileSettings = { + fileserver.host = "0.0.0.0"; + fileserver.port = 8082; + }; + ccnetSettings.General.SERVICE_URL = "file.mossnet.lan"; + initialAdminPassword = "arandompasswordsecure!"; + }; +} diff --git a/profiles/syncthing/default.nix b/profiles/syncthing/default.nix index 3619946b..5710dea6 100644 --- a/profiles/syncthing/default.nix +++ b/profiles/syncthing/default.nix @@ -4,16 +4,11 @@ services.syncthing = { enable = true; user = "anish"; - dataDir = "/home/anish/usr/syncthing"; + group = "users"; + dataDir = "/home/anish/"; + configDir = "/home/anish/.config/syncthing"; guiAddress = "0.0.0.0:8384"; }; - mossnet.backup = { - enable = true; - name = "syncthing"; - paths = [ "/home/anish/usr/syncthing" ]; - }; - networking.firewall.allowedTCPPorts = [ 8384 22000 ]; - networking.firewall.allowedUDPPorts = [ 22000 21027 ]; }