1
0
Fork 0

Services: re-re-enable Syncthing Tray (the Gnome extension couldn't connect to the system service)

This commit is contained in:
Aires 2024-11-24 13:38:58 -05:00
parent 7cff2e17d0
commit 3feefc4b70
2 changed files with 18 additions and 12 deletions

View file

@ -7,7 +7,8 @@ in
{ {
options = { options = {
aux.system.services.syncthing = { aux.system.services.syncthing = {
enable = lib.mkEnableOption "Enables Syncthing"; enable = lib.mkEnableOption "Enables Syncthing.";
enableTray = lib.mkEnableOption "Enables the Syncthing Tray applet.";
home = lib.mkOption { home = lib.mkOption {
default = "/var/lib/syncthing"; default = "/var/lib/syncthing";
type = lib.types.str; type = lib.types.str;
@ -34,16 +35,22 @@ in
# If the web UI is public, open the port in the firewall # If the web UI is public, open the port in the firewall
networking.firewall.allowedTCPPorts = with cfg.web; lib.mkIf (enable && public) [ port ]; networking.firewall.allowedTCPPorts = with cfg.web; lib.mkIf (enable && public) [ port ];
services.syncthing = { services = {
enable = true; flatpak.packages = lib.mkIf (config.aux.system.ui.flatpak.enable && cfg.enableTray) [
user = cfg.user; "io.github.martchus.syncthingtray"
group = config.users.users.${cfg.user}.group; ];
configDir = cfg.home;
guiAddress = syncthing = {
let enable = true;
listenAddress = with cfg.web; (if (enable && public) then "0.0.0.0" else "127.0.0.1"); user = cfg.user;
in group = config.users.users.${cfg.user}.group;
"${listenAddress}:${builtins.toString cfg.web.port}"; configDir = cfg.home;
guiAddress =
let
listenAddress = with cfg.web; (if (enable && public) then "0.0.0.0" else "127.0.0.1");
in
"${listenAddress}:${builtins.toString cfg.web.port}";
};
}; };
systemd.services.syncthing = { systemd.services.syncthing = {

View file

@ -105,7 +105,6 @@ in
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.dash-to-panel gnomeExtensions.dash-to-panel
gnomeExtensions.random-wallpaper gnomeExtensions.random-wallpaper
gnomeExtensions.syncthing-indicator
]; ];
}; };