about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-21 19:25:59 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-21 19:25:59 -0700
commitd91013096244ab0026dfc0f53d14ea0bbd3a8d79 (patch)
treeaa573b98c861ad152ff53b13654bef745ca610f9 /modules/services
parentsyncthing: enable on tahoe (diff)
downloadworld-d91013096244ab0026dfc0f53d14ea0bbd3a8d79.tar.gz
syncthing: configure the keys for tahoe
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/syncthing/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/services/syncthing/default.nix b/modules/services/syncthing/default.nix
index bbd4fb9..ea8c4d6 100644
--- a/modules/services/syncthing/default.nix
+++ b/modules/services/syncthing/default.nix
@@ -1,5 +1,7 @@
 { config, pkgs, lib, ... }:
-let cfg = config.my.services.syncthing;
+let
+  cfg = config.my.services.syncthing;
+  secrets = config.age.secrets;
 in {
   options.my.services.syncthing = with lib; {
     enable = mkEnableOption "syncthing service";
@@ -9,9 +11,11 @@ in {
     services.syncthing = {
       enable = true;
       openDefaultPorts = true;
-      user = users.users.fcuny;
+      user = "fcuny";
       group = "users";
-      dataDir = "${users.users.fcuny.home}/.syncthing";
+      dataDir = "/home/fcuny/.local/state/syncthing";
+      cert = secrets."syncthing/cert".path;
+      key = secrets."syncthing/key".path;
     };
   };
 }