improve syncthing.nix
This commit is contained in:
parent
4c647291bc
commit
2bc86a4912
5 changed files with 8 additions and 45 deletions
|
@ -1,14 +1,4 @@
|
|||
{ config, lib, pkgs, factsGenerator, clanLib, ... }:
|
||||
let
|
||||
clanMachines =
|
||||
lib.mapAttrs
|
||||
(machine: facts: {
|
||||
name = machine;
|
||||
id = facts."syncthing.pub";
|
||||
addresses = [ "tcp://[${facts."zerotier-ip"}]:22000" ];
|
||||
})
|
||||
(clanLib.readFactsFromAllMachines [ "syncthing.pub" "zerotier-ip" ]);
|
||||
in
|
||||
with lib; {
|
||||
|
||||
# networking.firewall.interfaces."gummybears".allowedTCPPorts = [ 8384 ];
|
||||
|
@ -22,6 +12,14 @@ with lib; {
|
|||
cert = config.clan.core.facts.services.syncthing.secret."syncthing.cert".path;
|
||||
settings.devices =
|
||||
let
|
||||
clanMachines =
|
||||
lib.mapAttrs
|
||||
(machine: facts: {
|
||||
name = machine;
|
||||
id = facts."syncthing.pub";
|
||||
addresses = [ "tcp://[${facts."zerotier-ip"}]:22000" ];
|
||||
})
|
||||
(clanLib.readFactsFromAllMachines [ "syncthing.pub" "zerotier-ip" ]);
|
||||
device = machine: id: {
|
||||
"${machine}" = {
|
||||
name = machine;
|
||||
|
@ -37,8 +35,6 @@ with lib; {
|
|||
|
||||
settings.folders = {
|
||||
|
||||
# needs to be on encrypted drives
|
||||
# -------------------------------
|
||||
audiobooks = {
|
||||
enable = lib.mkDefault false;
|
||||
path = lib.mkDefault "/tmp/audiobooks";
|
||||
|
@ -102,16 +98,6 @@ with lib; {
|
|||
path = lib.mkDefault "/tmp/password-store";
|
||||
devices = [ "cream" "cherry" "orbi" ];
|
||||
};
|
||||
# todo remove if zfs is is used
|
||||
#nextcloud_backup = {
|
||||
# enable = lib.mkDefault false;
|
||||
# path = lib.mkDefault "/tmp/lost-fotos";
|
||||
# devices = [ "chungus" ];
|
||||
# versioning = {
|
||||
# type = "simple";
|
||||
# params.keep = "2";
|
||||
# };
|
||||
#};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = false;
|
||||
|
@ -10,9 +9,6 @@
|
|||
configDir = "/home/palo/.syncthing";
|
||||
overrideFolders = true;
|
||||
settings.folders = {
|
||||
|
||||
# on encrypted drive
|
||||
# ------------------
|
||||
oscar_cpap = {
|
||||
enable = true;
|
||||
path = "/home/palo/Documents/OSCAR_Data";
|
||||
|
@ -42,9 +38,6 @@
|
|||
path = "/home/palo/share";
|
||||
type = "sendonly";
|
||||
};
|
||||
|
||||
# no need to be encrypted
|
||||
# -----------------------
|
||||
books = {
|
||||
enable = true;
|
||||
path = "/home/palo/books";
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
overrideFolders = true;
|
||||
user = "media";
|
||||
group = "media";
|
||||
# make some folders send only
|
||||
settings.folders = {
|
||||
# on encrypted drive
|
||||
# ------------------
|
||||
oscar_cpap = {
|
||||
enable = true;
|
||||
path = "/syncthing/oscar_cpap";
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
configDir = "/home/palo/.syncthing";
|
||||
overrideFolders = true;
|
||||
settings.folders = {
|
||||
|
||||
# on encrypted drive
|
||||
# ------------------
|
||||
oscar_cpap = {
|
||||
enable = true;
|
||||
path = "/home/palo/Documents/OSCAR_Data";
|
||||
|
@ -25,10 +22,6 @@
|
|||
enable = true;
|
||||
path = "/home/palo/logseq";
|
||||
};
|
||||
#private = {
|
||||
# enable = true;
|
||||
# path = "/home/palo/private";
|
||||
#};
|
||||
art = {
|
||||
enable = true;
|
||||
path = "/home/palo/art";
|
||||
|
@ -46,9 +39,6 @@
|
|||
path = "/home/palo/share";
|
||||
type = "sendonly";
|
||||
};
|
||||
|
||||
# no need to be encrypted
|
||||
# -----------------------
|
||||
books = {
|
||||
enable = true;
|
||||
path = "/home/palo/books";
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
configDir = "/home/palo/.syncthing";
|
||||
overrideFolders = true;
|
||||
folders = {
|
||||
|
||||
# on encrypted drive
|
||||
# ------------------
|
||||
private = {
|
||||
enable = true;
|
||||
path = "/home/palo/private";
|
||||
|
|
Loading…
Reference in a new issue