nextcloud-client: add startInBackground option (#2038)
* nextcloud-client: add runInBackground option * nextcloud-client: Change runInBackground description Co-authored-by: Sumner Evans <me@sumnerevans.com> * nextcloud-client: Use optionalString for the runInBackground option Co-authored-by: Sumner Evans <me@sumnerevans.com> * nextcloud-client: Remove "defaultText" in the runInBackground option * nextcloud-client: Fixed formatting * nextcloud-client: Rename runInBackground to startInBackground Co-authored-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
b840707a87
commit
ddf35436b7
|
@ -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" ]; };
|
||||
|
|
Loading…
Reference in a new issue