From db3df565d500c29a553040a3213f409dd09c91ad Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 7 Feb 2024 05:39:09 +0000 Subject: [PATCH] syncthings: no need for systemService option --- modules/syncthings.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/syncthings.nix b/modules/syncthings.nix index c49d452..39cc679 100644 --- a/modules/syncthings.nix +++ b/modules/syncthings.nix @@ -496,14 +496,6 @@ in { ''; }; - systemService = mkOption { - type = types.bool; - default = true; - description = lib.mdDoc '' - Whether to auto-launch Syncthing as a system service. - ''; - }; - user = mkOption { type = types.str; default = defaultUser; @@ -622,7 +614,7 @@ in { systemd.packages = [ pkgs.syncthing ]; - users.users = mkIf (cfg.systemService && cfg.user == defaultUser) { + users.users = mkIf (cfg.user == defaultUser) { ${defaultUser} = { group = cfg.group; home = cfg.dataDir; @@ -632,7 +624,7 @@ in { }; }; - users.groups = mkIf (cfg.systemService && cfg.group == defaultGroup) { + users.groups = mkIf (cfg.group == defaultGroup) { ${defaultGroup}.gid = config.ids.gids.syncthing; }; @@ -640,7 +632,7 @@ in { systemd.services = { # upstream reference: # https://github.com/syncthing/syncthing/blob/main/etc/linux-systemd/system/syncthing%40.service - syncthing = mkIf cfg.systemService { + syncthing = { description = "Syncthing service"; after = [ "network.target" ]; environment = {