Services: tweak Syncthing tray option
This commit is contained in:
parent
0cf137da05
commit
844f6a1399
|
@ -2,6 +2,9 @@
|
|||
# The NixOS Operations Script (NOS) is a wrapper script for nixos-rebuild and Flake-based configurations.
|
||||
# It handles pulling the latest version of your repository using Git, running system updates, and pushing changes back up.
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
# Configuration parameters
|
||||
operation="switch" # The nixos-rebuild operation to use
|
||||
hostname=$(/run/current-system/sw/bin/hostname) # The name of the host to build
|
||||
|
|
|
@ -13,12 +13,12 @@ in
|
|||
options = {
|
||||
${namespace}.services.syncthing = {
|
||||
enable = lib.mkEnableOption "Enables Syncthing.";
|
||||
enableTray = lib.mkEnableOption "Enables the Syncthing Tray applet.";
|
||||
home = lib.mkOption {
|
||||
default = "/var/lib/syncthing";
|
||||
type = lib.types.str;
|
||||
description = "Where to store Syncthing's configuration files";
|
||||
};
|
||||
tray.enable = lib.mkEnableOption "Enables the Syncthing Tray applet.";
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "syncthing";
|
||||
|
@ -41,7 +41,7 @@ in
|
|||
networking.firewall.allowedTCPPorts = with cfg.web; lib.mkIf (enable && public) [ port ];
|
||||
|
||||
services = {
|
||||
flatpak.packages = lib.mkIf (config.${namespace}.ui.flatpak.enable && cfg.enableTray) [
|
||||
flatpak.packages = lib.mkIf (config.${namespace}.ui.flatpak.enable && cfg.tray.enable) [
|
||||
"io.github.martchus.syncthingtray"
|
||||
];
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ in
|
|||
syncthing = {
|
||||
enable = true;
|
||||
home = "/home/aires/.config/syncthing";
|
||||
tray.enable = true;
|
||||
user = "aires";
|
||||
web.enable = true;
|
||||
};
|
||||
|
|
|
@ -73,6 +73,7 @@ in
|
|||
syncthing = {
|
||||
enable = true;
|
||||
home = "/home/aires/.config/syncthing";
|
||||
tray.enable = true;
|
||||
user = "aires";
|
||||
web.enable = true;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue