From ddf35436b7104e456ef22af48452e13ee5f0eb78 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich <56614642+Kranzes@users.noreply.github.com> Date: Thu, 27 May 2021 19:54:20 +0300 Subject: [PATCH] nextcloud-client: add startInBackground option (#2038) * nextcloud-client: add runInBackground option * nextcloud-client: Change runInBackground description Co-authored-by: Sumner Evans * nextcloud-client: Use optionalString for the runInBackground option Co-authored-by: Sumner Evans * nextcloud-client: Remove "defaultText" in the runInBackground option * nextcloud-client: Fixed formatting * nextcloud-client: Rename runInBackground to startInBackground Co-authored-by: Sumner Evans --- modules/services/nextcloud-client.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/services/nextcloud-client.nix b/modules/services/nextcloud-client.nix index f9fa196d4..4e56c4f50 100644 --- a/modules/services/nextcloud-client.nix +++ b/modules/services/nextcloud-client.nix @@ -17,6 +17,13 @@ in { defaultText = literalExample "pkgs.nextcloud-client"; description = "The package to use for the nextcloud client binary."; }; + + startInBackground = mkOption { + type = types.bool; + default = false; + description = + "Whether to start the Nextcloud client in the background."; + }; }; }; @@ -30,7 +37,8 @@ in { Service = { Environment = "PATH=${config.home.profileDirectory}/bin"; - ExecStart = "${cfg.package}/bin/nextcloud"; + ExecStart = "${cfg.package}/bin/nextcloud" + + (optionalString cfg.startInBackground " --background"); }; Install = { WantedBy = [ "graphical-session.target" ]; };