mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
nextcloud-client: add package
option
This commit is contained in:
parent
2c0e3f61da
commit
4e86d65aee
1 changed files with 17 additions and 4 deletions
|
@ -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