owncloud-client: add package option
This commit is contained in:
parent
81f16a1e3c
commit
9e9a0e43fe
|
@ -2,12 +2,20 @@
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
let
|
||||||
|
|
||||||
|
cfg = config.services.owncloud-client;
|
||||||
|
|
||||||
|
in {
|
||||||
options = {
|
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 = [
|
assertions = [
|
||||||
(hm.assertions.assertPlatform "services.owncloud-client" pkgs
|
(hm.assertions.assertPlatform "services.owncloud-client" pkgs
|
||||||
platforms.linux)
|
platforms.linux)
|
||||||
|
@ -22,7 +30,7 @@ with lib;
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||||
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
|
ExecStart = "${cfg.package}/bin/owncloud";
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
|
Loading…
Reference in a new issue