summaryrefslogtreecommitdiffstats
path: root/2configs/sync/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '2configs/sync/default.nix')
-rw-r--r--2configs/sync/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/2configs/sync/default.nix b/2configs/sync/default.nix
index 6928daf87..c3880bead 100644
--- a/2configs/sync/default.nix
+++ b/2configs/sync/default.nix
@@ -1,16 +1,18 @@
-{ config, pkgs, ... }: with import <stockholm/lib>; let
+{ config, pkgs, ... }: with pkgs.stockholm.lib; let
mk_peers = mapAttrs (n: v: { id = v.syncthing.id; });
all_peers = filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts;
used_peer_names = unique (flatten (mapAttrsToList (n: v: v.devices) config.services.syncthing.folders));
used_peers = filterAttrs (n: v: elem n used_peer_names) all_peers;
in {
+ sops.secrets."syncthing.key" = {};
+ sops.secrets."syncthing.cert" = {};
services.syncthing = {
enable = true;
configDir = "/var/lib/syncthing";
devices = mk_peers used_peers;
- key = toString <secrets/syncthing.key>;
- cert = toString <secrets/syncthing.cert>;
+ key = config.sops.secrets."syncthing.key".path;
+ cert = config.sops.secrets."syncthing.cert".path;
};
services.syncthing.folders.the_playlist = {
path = "/home/lass/tmp/the_playlist";