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:
Ilan Joselevich 2021-05-27 19:54:20 +03:00 committed by GitHub
parent b840707a87
commit ddf35436b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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" ]; };