summaryrefslogtreecommitdiff
path: root/modules/nixos/syncthing.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/syncthing.nix')
-rw-r--r--modules/nixos/syncthing.nix120
1 files changed, 60 insertions, 60 deletions
diff --git a/modules/nixos/syncthing.nix b/modules/nixos/syncthing.nix
index faf6723..24bfbb6 100644
--- a/modules/nixos/syncthing.nix
+++ b/modules/nixos/syncthing.nix
@@ -50,73 +50,68 @@ in {
overrideDevices = true;
overrideFolders = true;
- settings = {
- devices = mapAttrs (name: attr:
- mkIf (attr.syncthing.id != null && hasAttr "wireguard" attr) {
- inherit (attr.syncthing) id;
- addresses = ["tcp://${name}.${config.networking.domain}:22000"];
- introducer = this.isHeadless;
- })
- my.configurations;
+ devices = mapAttrs (name: attr:
+ mkIf (attr.syncthing.id != null && hasAttr "wireguard" attr) {
+ inherit (attr.syncthing) id;
+ addresses = ["tcp://${name}.${config.networking.domain}:22000"];
+ introducer = this.isHeadless;
+ })
+ my.configurations;
- folders = let
- filterDevices = f:
- attrNames (filterAttrs (_: attr:
- (attr.hostname != this.hostname)
- && (attr.syncthing.id != null)
- && f attr)
- my.configurations);
- all = filterDevices (_: true);
- notHeadless = filterDevices (attr: !attr.isHeadless);
- notOther = filterDevices (attr: !attr.isOther);
+ folders = let
+ filterDevices = f:
+ attrNames (filterAttrs (_: attr:
+ (attr.hostname != this.hostname)
+ && (attr.syncthing.id != null)
+ && f attr)
+ my.configurations);
+ all = filterDevices (_: true);
+ notHeadless = filterDevices (attr: !attr.isHeadless);
+ notOther = filterDevices (attr: !attr.isOther);
- simple = {
- type = "simple";
- params.keep = "5";
+ simple = {
+ type = "simple";
+ params.keep = "5";
+ };
+ trashcan = {
+ type = "trashcan";
+ params.cleanoutDays = "7";
+ };
+ in
+ with config.hm.xdg.userDirs; {
+ share = {
+ path = publicShare;
+ devices = notHeadless;
+ versioning = trashcan;
};
- trashcan = {
- type = "trashcan";
- params.cleanoutDays = "7";
+ pass = {
+ path = config.hm.programs.password-store.settings.PASSWORD_STORE_DIR;
+ devices = notOther;
+ versioning = trashcan;
};
- in
- with config.hm.xdg.userDirs; {
- share = {
- path = publicShare;
- devices = notHeadless;
- versioning = trashcan;
- };
- pass = {
- path = config.hm.programs.password-store.settings.PASSWORD_STORE_DIR;
- devices = notOther;
- versioning = trashcan;
- };
- org = {
- path = "${documents}/org";
- devices = all;
- versioning = simple;
- };
- roam = {
- path = "${documents}/roam";
- devices = notOther;
- versioning = simple;
- };
- elfeed = {
- path = "${config.my.home}/.elfeed";
- devices = notOther;
- versioning = trashcan;
- };
- books = {
- path = "${documents}/books";
- devices = notOther;
- versioning = trashcan;
- };
+ org = {
+ path = "${documents}/org";
+ devices = all;
+ versioning = simple;
+ };
+ roam = {
+ path = "${documents}/roam";
+ devices = notOther;
+ versioning = simple;
+ };
+ elfeed = {
+ path = "${config.my.home}/.elfeed";
+ devices = notOther;
+ versioning = trashcan;
+ };
+ books = {
+ path = "${documents}/books";
+ devices = notOther;
+ versioning = trashcan;
};
-
- gui = {
- insecureAdminAccess = true;
- insecureSkipHostcheck = this.isHeadless;
};
+ extraOptions = {
options = {
testOption = false;
autoUpgradeIntervalH = 0;
@@ -128,6 +123,11 @@ in {
stunKeepaliveStartS = 0;
urAccepted = -1;
};
+
+ gui = {
+ insecureAdminAccess = true;
+ insecureSkipHostcheck = this.isHeadless;
+ };
};
};