mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 10:19:48 +01:00
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
1 changed files with 9 additions and 1 deletions
|
@ -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