diff options
author | makefu <github@syntax-fehler.de> | 2021-01-27 22:57:15 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-01-27 22:57:15 +0100 |
commit | 144edeee1030d647bcc64083efc5834d1628341d (patch) | |
tree | 92f32df8dbc09b1bc36061267967b605628409b7 /lass/2configs/syncthing.nix | |
parent | 9c6c20f69e7b76e4231ffeae715d2ee5d453bb4d (diff) | |
parent | a2ca5f2e214be259fdb0f9ea92b79d74e6216a51 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/syncthing.nix')
-rw-r--r-- | lass/2configs/syncthing.nix | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/lass/2configs/syncthing.nix b/lass/2configs/syncthing.nix index 7758b860d..e288df68a 100644 --- a/lass/2configs/syncthing.nix +++ b/lass/2configs/syncthing.nix @@ -1,20 +1,11 @@ -{ config, pkgs, ... }: with import <stockholm/lib>; let - all_peers = filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts; - own_peers = filterAttrs (n: v: v.owner.name == "lass") all_peers; - mk_peers = mapAttrs (n: v: { id = v.syncthing.id; }); -in { +{ config, pkgs, ... }: with import <stockholm/lib>; +{ + imports = [ <stockholm/krebs/2configs/syncthing.nix> ]; services.syncthing = { - enable = true; group = "syncthing"; - configDir = "/var/lib/syncthing"; declarative = { key = toString <secrets/syncthing.key>; cert = toString <secrets/syncthing.cert>; - devices = mk_peers all_peers; - folders."/home/lass/sync" = { - devices = attrNames (filterAttrs (n: v: n != "phone") own_peers); - # ignorePerms = false; - }; }; }; krebs.iptables.tables.filter.INPUT.rules = [ @@ -26,11 +17,5 @@ in { ${pkgs.coreutils}/bin/chmod a+x /home/lass ''; - krebs.permown."/home/lass/sync" = { - file-mode = "u+rw,g+rw"; - owner = "lass"; - group = "syncthing"; - umask = "0002"; - keepGoing = true; - }; + boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288; } |