1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

nextcloud-client: add package option

This commit is contained in:
Tino Breddin 2021-01-15 11:57:58 +01:00 committed by Robert Helgesson
parent 2c0e3f61da
commit 4e86d65aee
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -2,12 +2,25 @@
with lib;
{
let
cfg = config.services.nextcloud-client;
in {
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 = {
Unit = {
Description = "Nextcloud Client";
@ -17,7 +30,7 @@ with lib;
Service = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloud";
ExecStart = "${cfg.package}/bin/nextcloud";
};
Install = { WantedBy = [ "graphical-session.target" ]; };