Files
voculinux/packaging/nix/README.md
T
xavierk 80a3792576
CI / security (pull_request) Failing after 1m25s
CI / lint (pull_request) Failing after 34s
CI / ai-review (pull_request) Successful in 25s
chore: import vocalinux project
Import the vocalinux source tree (tray app, Next.js site in web/,
packaging, installers, docs and tests) on top of the Gitea template
commit. The project README replaces the template README, and the
template CI files (.gitea/workflows/ci.yml, .jscpd.json, CI.md) are kept.
2026-11-06 11:51:44 +05:30

2.6 KiB

Vocalinux for Nix

A flake that builds Vocalinux against nixpkgs: GTK 3, PyGObject and the AppIndicator typelib come from nixpkgs, and pywhispercpp — which nixpkgs does not package — is built from its PyPI sdist (it vendors whisper.cpp and pybind11). Every host tool the app probes for (xdotool, wtype, ydotool, wl-clipboard, xclip, xsel, xprop, setxkbmap, ibus, gdbus, notify-send, paplay, aplay) is wired onto PATH, so the wrapped binary behaves like a deb/rpm install with Recommends present.

Try it

nix run github:VocaHQ/vocalinux

or install into a profile:

nix profile install github:VocaHQ/vocalinux

NixOS

{
  inputs.vocalinux.url = "github:VocaHQ/vocalinux";

  outputs = { nixpkgs, vocalinux, ... }: {
    nixosConfigurations.host = nixpkgs.lib.nixosSystem {
      modules = [
        vocalinux.nixosModules.vocalinux
        {
          programs.vocalinux.enable = true;
          users.users.you.extraGroups = [ "input" "uinput" ];
        }
      ];
    };
  };
}

hardware.uinput (enabled by the module) covers /dev/uinput, which ydotool and the evdev backend's keyboard clone need. input group membership is a per-user decision — it grants read access to every keyboard and pointer device, the same trade-off install.sh documents. X11 sessions need neither and can skip the group lines entirely.

Home Manager

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.home-manager.url = "github:nix-community/home-manager";
  inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
  inputs.vocalinux.url = "github:VocaHQ/vocalinux";

  outputs = { nixpkgs, home-manager, vocalinux, ... }: {
    homeConfigurations.you = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      modules = [
        vocalinux.homeManagerModules.vocalinux
        { programs.vocalinux.enable = true; }
      ];
    };
  };
}

Home Manager on NixOS still needs the system-side pieces above (the NixOS module handles hardware.uinput; group membership stays per-user). On a non-NixOS host, nix profile install plus the equivalent udev rule and group membership from your distro does the same job — see docs/INSTALL.md.

Scope

  • Default engine whisper.cpp plus the [vad] extra (ONNX Runtime) are built in. The vosk, whisper, parakeet and faster_whisper extras are not packaged (PyTorch footprint / not in nixpkgs).
  • pywhispercpp is built with GGML_NATIVE=OFF — a portable baseline rather than -march=native, so binaries can move between machines.