diff --git a/modules/services/owncloud-client.nix b/modules/services/owncloud-client.nix index 4eeafcf0..2884affe 100644 --- a/modules/services/owncloud-client.nix +++ b/modules/services/owncloud-client.nix @@ -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" ]; };