diff --git a/hosts/perso-desktop/configuration.nix b/hosts/perso-desktop/configuration.nix index 50ee3e6..a797ad4 100644 --- a/hosts/perso-desktop/configuration.nix +++ b/hosts/perso-desktop/configuration.nix @@ -55,6 +55,8 @@ printing.enable = true; steering-wheel.enable = true; }; + + services.monado.enable = true; }; chaotic.mesa-git = { diff --git a/modules/system/services/default.nix b/modules/system/services/default.nix index 7161ded..3196ea5 100644 --- a/modules/system/services/default.nix +++ b/modules/system/services/default.nix @@ -4,6 +4,7 @@ imports = [ ./distrobox.nix ./docker.nix + ./monado.nix ./ollama.nix ./openssh.nix ]; diff --git a/modules/system/services/monado.nix b/modules/system/services/monado.nix new file mode 100644 index 0000000..1fa61fd --- /dev/null +++ b/modules/system/services/monado.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.modules.system.services.monado; +in +{ + options.modules.system.services.monado = { + enable = mkEnableOption '' + Enable monado with my custom configurations + ''; + }; + config = mkIf cfg.enable { + # https://github.com/NixOS/nixpkgs/issues/258196 + services.monado = { + enable = true; + defaultRuntime = true; + }; + + systemd.user.services.monado.environment = { + STEAMVR_LH_ENABLE = "1"; + XRT_COMPOSITOR_COMPUTE = "1"; + }; + + environment.variables = { + STEAMVR_LH_ENABLE = "1"; + XRT_COMPOSITOR_COMPUTE = "1"; + WMR_HANDTRACKING = "0"; + + VIT_SYSTEM_LIBRARY_PATH = "${pkgs.basalt-monado}/lib/libbasalt.so"; + }; + + home-manager.users.florian.home.file.".local/share/monado/hand-tracking-models".source = + pkgs.fetchgit + { + url = "https://gitlab.freedesktop.org/monado/utilities/hand-tracking-models"; + sha256 = "x/X4HyyHdQUxn3CdMbWj5cfLvV7UyQe1D01H93UCk+M="; + fetchLFS = true; + }; + }; +} \ No newline at end of file