diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index c548cb2..c503861 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -54,6 +54,7 @@ in clipboard = enabled; # TODO: bundle this with the WM under xorg dunst = enabled; + syncthing = enabled; }; xorg = { xsession = enabled; diff --git a/modules/home/services/syncthing/default.nix b/modules/home/services/syncthing/default.nix new file mode 100644 index 0000000..72f4982 --- /dev/null +++ b/modules/home/services/syncthing/default.nix @@ -0,0 +1,32 @@ +{ + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.services.syncthing; +in +{ + options = mkEnableModule "services.syncthing"; + + config = mkIf cfg.enable { + home.packages = [ + config.services.syncthing.tray.package + ]; + + services.syncthing = { + enable = true; + + tray = { + enable = true; + command = "syncthingtray"; + package = pkgs.syncthingtray-minimal; + }; + }; + }; +} diff --git a/old/home/services/syncthing.nix b/old/home/services/syncthing.nix deleted file mode 100644 index b0843c9..0000000 --- a/old/home/services/syncthing.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -{ - services.syncthing = { - enable = true; - - tray = { - enable = true; - command = "syncthingtray"; - package = pkgs.syncthingtray-minimal; - }; - }; -}