l: don't always sync basedir
This commit is contained in:
parent
0b5b4b8eab
commit
9e4d47c5b4
13
lass/2configs/sync/sync.nix
Normal file
13
lass/2configs/sync/sync.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
|||||||
{ config, pkgs, ... }: with import <stockholm/lib>; let
|
{ config, pkgs, ... }: with import <stockholm/lib>; let
|
||||||
all_peers = filterAttrs (n: v: v.syncthing.id != null) config.krebs.hosts;
|
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; });
|
mk_peers = mapAttrs (n: v: { id = v.syncthing.id; });
|
||||||
in {
|
in {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
@ -11,10 +10,6 @@ in {
|
|||||||
key = toString <secrets/syncthing.key>;
|
key = toString <secrets/syncthing.key>;
|
||||||
cert = toString <secrets/syncthing.cert>;
|
cert = toString <secrets/syncthing.cert>;
|
||||||
devices = mk_peers all_peers;
|
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 = [
|
krebs.iptables.tables.filter.INPUT.rules = [
|
||||||
@ -26,11 +21,5 @@ in {
|
|||||||
${pkgs.coreutils}/bin/chmod a+x /home/lass
|
${pkgs.coreutils}/bin/chmod a+x /home/lass
|
||||||
'';
|
'';
|
||||||
|
|
||||||
krebs.permown."/home/lass/sync" = {
|
boot.kernel.sysctl."fs.inotify.max_user_watches" = 524288;
|
||||||
file-mode = "u+rw,g+rw";
|
|
||||||
owner = "lass";
|
|
||||||
group = "syncthing";
|
|
||||||
umask = "0002";
|
|
||||||
keepGoing = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user