mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
Only sync(thing) over tailscale
This commit is contained in:
parent
f71c958316
commit
d8226d7eb1
1 changed files with 20 additions and 7 deletions
|
|
@ -3,9 +3,10 @@
|
|||
options.myConfig.syncthing.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.syncthing.enable {
|
||||
networking.firewall.interfaces.tailscale0.allowedTCPPorts = [ 22000 ];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
|
||||
user = "seb";
|
||||
group = "users";
|
||||
|
|
@ -13,8 +14,14 @@
|
|||
|
||||
settings = {
|
||||
devices = {
|
||||
fern.id = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
|
||||
north.id = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
||||
fern = {
|
||||
id = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
|
||||
addresses = [ "tcp://fern.${config.networking.domain}:22000" ];
|
||||
};
|
||||
north = {
|
||||
id = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
||||
addresses = [ "tcp://north.${config.networking.domain}:22000" ];
|
||||
};
|
||||
};
|
||||
|
||||
folders =
|
||||
|
|
@ -24,10 +31,7 @@
|
|||
lib.genAttrs folders (name: {
|
||||
path = "~/${name}";
|
||||
ignorePerms = false;
|
||||
devices = [
|
||||
"fern"
|
||||
"north"
|
||||
];
|
||||
devices = lib.attrNames config.services.syncthing.settings.devices;
|
||||
});
|
||||
in
|
||||
genFolders [
|
||||
|
|
@ -38,6 +42,15 @@
|
|||
"Projects"
|
||||
"Videos"
|
||||
];
|
||||
|
||||
options = {
|
||||
globalAnnounceEnabled = false;
|
||||
localAnnounceEnabled = false;
|
||||
relaysEnabled = false;
|
||||
natEnabled = false;
|
||||
urAccepted = -1;
|
||||
autoUpgradeIntervalH = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue