From 4b71ea64fefa0b21396737a3614246876fc054f3 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 7 Dec 2023 20:21:33 -0700 Subject: [PATCH] [NixOS] Share syncthing directory from biskcomp --- nixos/machines/biskcomp.nix | 21 ++++++++++++--------- nixos/users.nix | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/nixos/machines/biskcomp.nix b/nixos/machines/biskcomp.nix index 44103916..c050cef7 100644 --- a/nixos/machines/biskcomp.nix +++ b/nixos/machines/biskcomp.nix @@ -40,14 +40,14 @@ in defaults.email = "IvanMalison@gmail.com"; }; - services.nextcloud = { - enable = true; - hostName = "nextcloud.railbird.ai"; - config = { - dbtype = "pgsql"; - database.createLocally = true; - }; - }; + # services.nextcloud = { + # enable = true; + # hostName = "nextcloud.railbird.ai"; + # config = { + # dbtype = "pgsql"; + # database.createLocally = true; + # }; + # }; services.nginx = { enable = true; @@ -72,8 +72,11 @@ in "syncthing.railbird.ai" = { enableACME = true; forceSSL = true; + root = "/var/lib/syncthing/sync"; locations."/" = { - proxyPass = "http://[::1]:8384"; + extraConfig = '' + autoindex on; + ''; }; }; }; diff --git a/nixos/users.nix b/nixos/users.nix index 91d4a25e..8abac4dc 100644 --- a/nixos/users.nix +++ b/nixos/users.nix @@ -28,6 +28,9 @@ in home = "/var/lib/syncthing"; createHome = true; }; + nginx = { + extraGroups = ["syncthing"]; + }; imalison = userDefaults // { extraGroups = extraGroupsWithWheel; name = "imalison";