diff options
author | lassulus <lassulus@lassul.us> | 2021-01-23 18:20:52 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2021-01-23 18:20:52 +0100 |
commit | 9e4d47c5b46a92436d8e71c17a61ab729d4c4133 (patch) | |
tree | ba71159c6581efed51e00c908bf58ff7f6c2c8d8 /lass | |
parent | 0b5b4b8eab751d0d1d32573c6f69d08a82b4af1e (diff) |
l: don't always sync basedir
Diffstat (limited to 'lass')
-rw-r--r-- | lass/2configs/sync/sync.nix | 13 | ||||
-rw-r--r-- | lass/2configs/syncthing.nix | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/lass/2configs/sync/sync.nix b/lass/2configs/sync/sync.nix new file mode 100644 index 000000000..bee1d03ac --- /dev/null +++ b/lass/2configs/sync/sync.nix @@ -0,0 +1,13 @@ +{ + services.syncthing.declarative.folders."/home/lass/sync" = { + devices = [ "mors" "icarus" "xerxes" "shodan" "green" "blue" ]; + }; + krebs.permown."/home/lass/sync" = { + file-mode = "u+rw,g+rw"; + owner = "lass"; + group = "syncthing"; + umask = "0002"; + keepGoing = true; + }; +} + diff --git a/lass/2configs/syncthing.nix b/lass/2configs/syncthing.nix index 7758b860d..d31ce7800 100644 --- a/lass/2configs/syncthing.nix +++ b/lass/2configs/syncthing.nix @@ -1,6 +1,5 @@ { 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 { services.syncthing = { @@ -11,10 +10,6 @@ in { 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 +21,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; } |