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 "";
|
options.myConfig.syncthing.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf config.myConfig.syncthing.enable {
|
config = lib.mkIf config.myConfig.syncthing.enable {
|
||||||
|
networking.firewall.interfaces.tailscale0.allowedTCPPorts = [ 22000 ];
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openDefaultPorts = true;
|
|
||||||
|
|
||||||
user = "seb";
|
user = "seb";
|
||||||
group = "users";
|
group = "users";
|
||||||
|
|
@ -13,8 +14,14 @@
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
devices = {
|
devices = {
|
||||||
fern.id = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
|
fern = {
|
||||||
north.id = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
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 =
|
folders =
|
||||||
|
|
@ -24,10 +31,7 @@
|
||||||
lib.genAttrs folders (name: {
|
lib.genAttrs folders (name: {
|
||||||
path = "~/${name}";
|
path = "~/${name}";
|
||||||
ignorePerms = false;
|
ignorePerms = false;
|
||||||
devices = [
|
devices = lib.attrNames config.services.syncthing.settings.devices;
|
||||||
"fern"
|
|
||||||
"north"
|
|
||||||
];
|
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
genFolders [
|
genFolders [
|
||||||
|
|
@ -38,6 +42,15 @@
|
||||||
"Projects"
|
"Projects"
|
||||||
"Videos"
|
"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