owncloud-client: add package option

This commit is contained in:
Natsu Kagami 2022-10-09 10:59:43 +02:00 committed by Robert Helgesson
parent 81f16a1e3c
commit 9e9a0e43fe
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -2,12 +2,20 @@
with lib;
{
let
cfg = config.services.owncloud-client;
in {
options = {
services.owncloud-client = { enable = mkEnableOption "Owncloud Client"; };
services.owncloud-client = {
enable = mkEnableOption "Owncloud Client";
package = mkPackageOption pkgs "owncloud-client" { };
};
};
config = mkIf config.services.owncloud-client.enable {
config = mkIf cfg.enable {
assertions = [
(hm.assertions.assertPlatform "services.owncloud-client" pkgs
platforms.linux)
@ -22,7 +30,7 @@ with lib;
Service = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
ExecStart = "${cfg.package}/bin/owncloud";
};
Install = { WantedBy = [ "graphical-session.target" ]; };