nextcloud-client: add package
option
This commit is contained in:
parent
2c0e3f61da
commit
4e86d65aee
|
@ -2,12 +2,25 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
let
|
||||||
|
|
||||||
|
cfg = config.services.nextcloud-client;
|
||||||
|
|
||||||
|
in {
|
||||||
options = {
|
options = {
|
||||||
services.nextcloud-client = { enable = mkEnableOption "Nextcloud Client"; };
|
services.nextcloud-client = {
|
||||||
|
enable = mkEnableOption "Nextcloud Client";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.nextcloud-client;
|
||||||
|
defaultText = literalExample "pkgs.nextcloud-client";
|
||||||
|
description = "The package to use for the nextcloud client binary.";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.services.nextcloud-client.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.user.services.nextcloud-client = {
|
systemd.user.services.nextcloud-client = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Nextcloud Client";
|
Description = "Nextcloud Client";
|
||||||
|
@ -17,7 +30,7 @@ with lib;
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||||
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloud";
|
ExecStart = "${cfg.package}/bin/nextcloud";
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
|
Loading…
Reference in a new issue