diff --git a/config/optional/vr.nix b/config/optional/vr.nix new file mode 100644 index 0000000..fb53ae1 --- /dev/null +++ b/config/optional/vr.nix @@ -0,0 +1,11 @@ +{ + # can't play VR until https://github.com/hyprwm/Hyprland/pull/8116 is merged + services.monado = { + enable = true; + defaultRuntime = true; + }; + systemd.user.services.monado.environment = { + STEAMVR_LH_ENABLE = "1"; + XRT_COMPOSITOR_COMPUTE = "1"; + }; +} diff --git a/hosts/desktopnix/default.nix b/hosts/desktopnix/default.nix index a615840..f0728c2 100644 --- a/hosts/desktopnix/default.nix +++ b/hosts/desktopnix/default.nix @@ -26,6 +26,8 @@ ../../config/optional/secureboot.nix ../../config/optional/steam.nix ../../config/optional/xserver.nix + ../../config/optional/wayland.nix + ../../config/optional/vr.nix ../../config/optional/zfs.nix ./net.nix diff --git a/users/common/graphical/wayland/fuzzel.nix b/users/common/graphical/wayland/fuzzel.nix index 16583d7..ba2a294 100644 --- a/users/common/graphical/wayland/fuzzel.nix +++ b/users/common/graphical/wayland/fuzzel.nix @@ -4,7 +4,7 @@ enable = true; settings = { main = { - launch-preix = "uwsm app --"; + launch-prefix = "uwsm app --"; }; }; }; diff --git a/users/common/graphical/wayland/hyprland.nix b/users/common/graphical/wayland/hyprland.nix index feb8f75..0458edf 100644 --- a/users/common/graphical/wayland/hyprland.nix +++ b/users/common/graphical/wayland/hyprland.nix @@ -48,6 +48,9 @@ let ''; in { + # UWSM starts a SH to read env variables + # this ensures all home.sessionVars are exported + programs.bash.enable = true; wayland.windowManager.hyprland = { enable = true; settings = mkMerge [ @@ -144,7 +147,7 @@ in "SUPER,b,exec,uwsm app -- firefox" "SUPER,t,exec,uwsm app -- kitty" - ",Menu,exec,uwsm app -- fuzzel" + ",Menu,exec,fuzzel" "SUPER,c,exec,${lib.getExe pkgs.scripts.clone-term}" "CTRL,F7,pass,class:^(discord)$" diff --git a/users/patrick/default.nix b/users/patrick/default.nix index 0daeb07..73d976f 100644 --- a/users/patrick/default.nix +++ b/users/patrick/default.nix @@ -63,6 +63,7 @@ lib.optionalAttrs (!minimal) { ./gpg ./impermanence.nix ./minion.nix + ./vr.nix ../common ../common/impermanence.nix diff --git a/users/patrick/impermanence.nix b/users/patrick/impermanence.nix index 3fff3be..9a92389 100644 --- a/users/patrick/impermanence.nix +++ b/users/patrick/impermanence.nix @@ -30,6 +30,8 @@ ".config/obs-studio" + ".local/share/monado" + # For nextcloud client install "Nextcloud" ".config/Nextcloud" diff --git a/users/patrick/patrick.nix b/users/patrick/patrick.nix index 9875cab..4fd984c 100644 --- a/users/patrick/patrick.nix +++ b/users/patrick/patrick.nix @@ -24,6 +24,7 @@ orca-slicer hexyl gh + nixpkgs-review via diff --git a/users/patrick/vr.nix b/users/patrick/vr.nix new file mode 100644 index 0000000..33981fd --- /dev/null +++ b/users/patrick/vr.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: +{ + home.packages = [ pkgs.wlx-overlay-s ]; + xdg.configFile."openxr/1/active_runtime.json".text = '' + { + "file_format_version": "1.0.0", + "runtime": { + "name": "Monado", + "library_path": "${pkgs.monado}/lib/libopenxr_monado.so" + } + } + ''; + + xdg.configFile."openvr/openvrpaths.vrpath".text = '' + { + "config" : + [ + "${config.xdg.dataHome}/Steam/config" + ], + "external_drivers" : null, + "jsonid" : "vrpathreg", + "log" : + [ + "${config.xdg.dataHome}/Steam/logs" + ], + "runtime" : + [ + "${pkgs.opencomposite}/lib/opencomposite" + ], + "version" : 1 + } + ''; +}