Skip to content

Commit

Permalink
nixos/monado: add enableUltraleap option
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
  • Loading branch information
Scrumplex committed Jan 15, 2025
1 parent 1e01152 commit 7a7d128
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion nixos/modules/services/hardware/monado.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ in
options.services.monado = {
enable = mkEnableOption "Monado user service";

package = mkPackageOption pkgs "monado" { };
package =
mkPackageOption pkgs "monado" { }
// mkOption {
apply = pkg: pkg.override { ultraleapSupport = cfg.enableUltraleap; };
};

defaultRuntime = mkOption {
type = types.bool;
Expand Down Expand Up @@ -52,6 +56,8 @@ in
highPriority =
mkEnableOption "high priority capability for monado-service"
// mkOption { default = true; };

enableUltraleap = mkEnableOption "Ultraleap hand tracking Monado driver and system service";
};

config = mkIf cfg.enable {
Expand All @@ -66,6 +72,10 @@ in

services.udev.packages = with pkgs; [ xr-hardware ];

services.ultraleap = mkIf cfg.enableUltraleap {
enable = mkDefault true;
};

systemd.user = {
services.monado = {
description = "Monado XR runtime service module";
Expand Down

0 comments on commit 7a7d128

Please sign in to comment.