mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
owncloud-client: add package option
This commit is contained in:
parent
81f16a1e3c
commit
9e9a0e43fe
1 changed files with 12 additions and 4 deletions
|
@ -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" ]; };
|
||||
|
|
Loading…
Reference in a new issue