From b6f6da57e5890987c079420200755ea656092e17 Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 15 Nov 2024 16:16:22 -0500 Subject: [PATCH] Users: re-enable Syncthing Tray --- flake.nix | 2 +- hosts/Shura/default.nix | 10 ++++++++-- modules/users/aires/default.nix | 9 +++++---- modules/users/gremlin/default.nix | 11 +++++------ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index c7d8236..56db5d6 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,7 @@ inputs = { # Import the desired Nix channel. Defaults to unstable, which uses a fully tested rolling release model. - # You can find a list of channels at https://wiki.nixos.org/wiki/Nix_channels + # You can find a list of channels at https://wiki.nixos.org/wiki/Channel_branches # To follow a different channel, replace `nixos-unstable` with the channel name, e.g. `nixos-24.05`. nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; diff --git a/hosts/Shura/default.nix b/hosts/Shura/default.nix index 4b4fb6b..f50a328 100644 --- a/hosts/Shura/default.nix +++ b/hosts/Shura/default.nix @@ -105,11 +105,17 @@ in users = { aires = { enable = true; - services.syncthing.enable = true; + services.syncthing = { + enable = true; + enableTray = true; + }; }; gremlin = { enable = true; - services.syncthing.enable = true; + services.syncthing = { + enable = true; + enableTray = true; + }; }; }; }; diff --git a/modules/users/aires/default.nix b/modules/users/aires/default.nix index cffe6db..fe6790d 100644 --- a/modules/users/aires/default.nix +++ b/modules/users/aires/default.nix @@ -122,10 +122,11 @@ in # Enable Syncthing (lib.mkIf cfg.services.syncthing.enable { - users.users.aires.packages = [ - pkgs.syncthing - (lib.mkIf cfg.services.syncthing.enableTray pkgs.syncthingtray) - ]; + users.users.aires.packages = [ pkgs.syncthing ]; + + services.flatpak.packages = lib.mkIf ( + config.aux.system.ui.flatpak.enable && cfg.services.syncthing.enableTray + ) [ "io.github.martchus.syncthingtray" ]; # Open port 8080 networking.firewall.allowedTCPPorts = [ 8080 ]; diff --git a/modules/users/gremlin/default.nix b/modules/users/gremlin/default.nix index 2edccd1..dd6c96c 100644 --- a/modules/users/gremlin/default.nix +++ b/modules/users/gremlin/default.nix @@ -103,12 +103,11 @@ in # Enable Syncthing (lib.mkIf cfg.services.syncthing.enable { - users.users.gremlin = { - packages = [ - pkgs.syncthing - (lib.mkIf cfg.services.syncthing.enableTray pkgs.syncthingtray) - ]; - }; + users.users.gremlin.packages = [ pkgs.syncthing ]; + + services.flatpak.packages = lib.mkIf ( + config.aux.system.ui.flatpak.enable && cfg.services.syncthing.enableTray + ) [ "io.github.martchus.syncthingtray" ]; home-manager.users.gremlin = { # Syncthing options