From 759390af8d4c650055d99c0f872dfb9002f9dd86 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Sat, 22 Mar 2025 14:35:54 -0500 Subject: [PATCH] removed unused syncthing config options --- .../nixos/defiant/configuration.nix | 15 ++------ .../nixos/horizon/configuration.nix | 11 ++---- .../nixos/twilight/configuration.nix | 11 ++---- modules/nixos-modules/sync.nix | 36 +------------------ 4 files changed, 7 insertions(+), 66 deletions(-) diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix index 78c215d..e3d59bd 100644 --- a/configurations/nixos/defiant/configuration.nix +++ b/configurations/nixos/defiant/configuration.nix @@ -98,19 +98,6 @@ adguardhome = { enable = false; }; - sync = { - enable = true; - folders = { - share = { - enable = true; - calendar.enable = true; - }; - leyla = { - documents.enable = true; - notes.enable = true; - }; - }; - }; }; networking = { hostId = "c51763d6"; @@ -168,6 +155,8 @@ ]; }; + syncthing.enable = true; + fail2ban.enable = true; jellyfin = { diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix index b59b7e9..6375003 100644 --- a/configurations/nixos/horizon/configuration.nix +++ b/configurations/nixos/horizon/configuration.nix @@ -17,15 +17,6 @@ }; eve.isDesktopUser = true; }; - sync = { - enable = true; - folders = { - share.enable = true; - leyla = { - documents.enable = true; - }; - }; - }; }; environment.systemPackages = [ @@ -66,6 +57,8 @@ # "--advertise-tags=tag:client,tag:mobile" ]; }; + + syncthing.enable = true; }; networking = { diff --git a/configurations/nixos/twilight/configuration.nix b/configurations/nixos/twilight/configuration.nix index 6def768..8467003 100644 --- a/configurations/nixos/twilight/configuration.nix +++ b/configurations/nixos/twilight/configuration.nix @@ -29,15 +29,6 @@ openRGB.enable = true; graphicsAcceleration.enable = true; }; - sync = { - enable = true; - folders = { - share.enable = true; - leyla = { - documents.enable = true; - }; - }; - }; }; services = { @@ -65,6 +56,8 @@ "--advertise-routes=192.168.0.0/24" ]; }; + + syncthing.enable = true; }; programs.steam = { enable = true; diff --git a/modules/nixos-modules/sync.nix b/modules/nixos-modules/sync.nix index de361e6..8915dc8 100644 --- a/modules/nixos-modules/sync.nix +++ b/modules/nixos-modules/sync.nix @@ -7,39 +7,6 @@ mountDir = "/mnt/sync"; configDir = "/etc/syncthing"; in { - options.host.sync = { - enable = lib.mkEnableOption "should sync thing be enabled on this device"; - folders = { - share = { - enable = lib.mkEnableOption "should the share folder by synced"; - calendar = { - enable = lib.mkEnableOption "should the calendar folder be synced"; - }; - }; - leyla = { - documents = { - enable = lib.mkEnableOption "should the documents folder be synced"; - }; - notes = { - enable = lib.mkEnableOption "should the notes folder by synced"; - }; - }; - extraFolders = lib.mkOption { - type = lib.types.attrsOf (lib.types.submodule ({...}: { - options = { - path = lib.mkOption { - type = lib.types.str; - }; - devices = lib.mkOption { - type = lib.types.listof lib.types.str; - }; - }; - })); - default = {}; - }; - }; - }; - config = lib.mkMerge [ { systemd = lib.mkIf config.services.syncthing.enable { @@ -50,10 +17,9 @@ in { ]; }; } - (lib.mkIf config.host.sync.enable (lib.mkMerge [ + (lib.mkIf config.services.syncthing.enable (lib.mkMerge [ { services.syncthing = { - enable = true; user = "syncthing"; group = "syncthing"; dataDir = "${mountDir}/default";