Files
lhns--steam-frame-nix/flake.nix
T
Pierre Kisters 224715d926 VR keyboard touch typing, on a controller bridge from the SteamVR dashboard
keyboard.vr.touchTyping (off by default): a key is pressed when a
controller's tip, where SteamVR's laser starts (/pose/tip: the device pose
times the render model's "tip" component), passes through it from the
front; released when pulled back 1 cm, re-armed 5 mm in front. Both hands,
also at once. Keys go through the keyboard's own HandleTouchStart /
HandleTouchEnd, like a laser press (Backspace repeats while held). Options
depth (cm) and haptics.

The geometry lives in a reusable controller bridge (vr-keyboard-controllers,
internal option): a systemui patch reads the keyboard's pose with SteamVR's
SGQueryService (an empty transform of ours in the keyboard's mount) and both
controllers' poses, and streams per hand the tip, the laser's hit on the
keyboard and the trigger (~90 Hz while relevant) through the
vr-keyboard-controllers-relay service to __sfuiControllers in Steam's
SharedJSContext. Tests: flake checks vr-keyboard-controllers and
vr-keyboard-touch.
2026-10-01 03:30:01 +02:00

97 lines
4.4 KiB
Nix

{
description = "Home Manager modules for the Valve Steam Frame (SteamOS, aarch64-linux)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
clipboard-sync-src = {
url = "github:dnut/clipboard-sync";
flake = false; # just the source; its flake outputs are x86-only
};
};
outputs = { self, nixpkgs, clipboard-sync-src }:
let
modules = {
session = ./modules/session.nix;
portal = ./modules/portal.nix;
applications-menu = ./modules/applications-menu.nix;
keyboard-layout = ./modules/keyboard-layout.nix;
vr-keyboard-extra-keys = ./modules/vr-keyboard-extra-keys.nix;
vr-keyboard = ./modules/vr-keyboard.nix;
vr-keyboard-controllers = ./modules/vr-keyboard-controllers.nix;
vr-keyboard-touch = ./modules/vr-keyboard-touch.nix;
hidden-apps = ./modules/hidden-apps.nix;
steam-ui-patches = ./modules/steam-ui-patches.nix;
launcher-menu = ./modules/launcher-menu.nix;
steamvr-debugger = ./modules/steamvr-debugger.nix;
cleanup = ./modules/cleanup.nix;
dashboard-windows = ./modules/dashboard-windows.nix;
steam-close-button = ./modules/steam-close-button.nix;
window-curvature = ./modules/window-curvature.nix;
frame-controls = ./modules/frame-controls.nix;
# Built with the consumer's pkgs; `key` dedups direct + `default` imports.
clipboard-sync = {
key = "steam-frame-nix/clipboard-sync";
_file = ./modules/clipboard-sync.nix;
imports = [ (import ./modules/clipboard-sync.nix { inherit clipboard-sync-src; }) ];
};
firefox = ./modules/firefox.nix;
jellyfin = ./modules/jellyfin.nix;
launchers = ./modules/launchers.nix;
docker = ./modules/docker.nix;
screenshots = ./modules/screenshots.nix;
};
# Former attribute names, kept so existing imports keep working (not in
# `default`, which imports each module once under its current name).
aliases = {
steam-keyboard-patch = modules.vr-keyboard-extra-keys; # its name until 2026-09
keyring = modules.launchers; # until 2026-09 (its options now fail with the new form)
};
systems = [ "aarch64-linux" "x86_64-linux" ];
forSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in {
homeManagerModules = modules // aliases // {
default = { imports = builtins.attrValues modules; };
};
# Removes what steam-frame-nix wrote outside the Nix store (install.sh
# cleanup): nix run github:lhns/steam-frame-nix#cleanup -- --all
packages = forSystems (pkgs: {
cleanup = pkgs.callPackage ./modules/cleanup/package.nix { };
});
apps = nixpkgs.lib.mapAttrs (_: p: {
cleanup = {
type = "app";
program = "${p.cleanup}/bin/steam-frame-nix-cleanup";
meta.description = "Remove what steam-frame-nix wrote outside the Nix store";
};
}) self.packages;
# Tests of the VR keyboard (text model, corrector, swipe decoder on the
# default German + English dictionary), the controller geometry and touch
# typing, the extra keys' xdotool allowlist, the Jellyfin mpv shim, the
# Firefox wrapper, the launchers, install.sh cleanup, the
# applications.menu link, the portal config and the screenshots account
# detection: nix flake check
checks = forSystems (pkgs: {
applications-menu = import ./modules/applications-menu/check.nix { inherit pkgs; };
cleanup = import ./modules/cleanup/check.nix { inherit pkgs; };
firefox = import ./modules/firefox/check.nix { inherit pkgs; };
jellyfin = import ./modules/jellyfin/check.nix { inherit pkgs; };
launchers = import ./modules/launchers/check.nix { inherit pkgs; };
portal = import ./modules/portal/check.nix { inherit pkgs; };
screenshots = import ./modules/screenshots/check.nix { inherit pkgs; };
vr-keyboard = import ./modules/vr-keyboard/check.nix { inherit pkgs; };
vr-keyboard-extra-keys = import ./modules/vr-keyboard-extra-keys/check.nix { inherit pkgs; };
vr-keyboard-controllers = import ./modules/vr-keyboard-controllers/check.nix { inherit pkgs; };
vr-keyboard-touch = import ./modules/vr-keyboard-touch/check.nix { inherit pkgs; };
});
# nix flake init -t github:lhns/steam-frame-nix
templates.default = {
path = ./template;
description = "Standalone Home Manager configuration for SteamOS using steam-frame-nix";
};
};
}