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.
|
# 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.
|
# 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
|
# Configuration parameters
|
||||||
operation="switch" # The nixos-rebuild operation to use
|
operation="switch" # The nixos-rebuild operation to use
|
||||||
hostname=$(/run/current-system/sw/bin/hostname) # The name of the host to build
|
hostname=$(/run/current-system/sw/bin/hostname) # The name of the host to build
|
||||||
|
|
|
@ -13,12 +13,12 @@ in
|
||||||
options = {
|
options = {
|
||||||
${namespace}.services.syncthing = {
|
${namespace}.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;
|
||||||
description = "Where to store Syncthing's configuration files";
|
description = "Where to store Syncthing's configuration files";
|
||||||
};
|
};
|
||||||
|
tray.enable = lib.mkEnableOption "Enables the Syncthing Tray applet.";
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "syncthing";
|
default = "syncthing";
|
||||||
|
@ -41,7 +41,7 @@ in
|
||||||
networking.firewall.allowedTCPPorts = with cfg.web; lib.mkIf (enable && public) [ port ];
|
networking.firewall.allowedTCPPorts = with cfg.web; lib.mkIf (enable && public) [ port ];
|
||||||
|
|
||||||
services = {
|
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"
|
"io.github.martchus.syncthingtray"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ in
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
home = "/home/aires/.config/syncthing";
|
home = "/home/aires/.config/syncthing";
|
||||||
|
tray.enable = true;
|
||||||
user = "aires";
|
user = "aires";
|
||||||
web.enable = true;
|
web.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,6 +73,7 @@ in
|
||||||
syncthing = {
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
home = "/home/aires/.config/syncthing";
|
home = "/home/aires/.config/syncthing";
|
||||||
|
tray.enable = true;
|
||||||
user = "aires";
|
user = "aires";
|
||||||
web.enable = true;
|
web.enable = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue