Added in v0.18.2

Install Vocalinux on NixOS with the Nix flake

The Vocalinux repository is a Nix flake. It builds the app against nixpkgs, ships a NixOS module and a Home Manager module, and wires every text-injection and clipboard tool onto the wrapped binary’s PATH. Use it on NixOS, or on any Linux with Nix and flakes enabled.

Try it or install into a profile

No configuration needed. nix run starts Vocalinux once; nix profile install keeps it in your user profile:

nix run github:VocaHQ/vocalinux        # try it
nix profile install github:VocaHQ/vocalinux

On a non-NixOS host, pair nix profile install with your distro’s udev rule and group membership for /dev/uinput and /dev/input if you use Wayland.

Enable the NixOS module

  1. 1. Add the flake input

    Add inputs.vocalinux.url = "github:VocaHQ/vocalinux" to your system flake.

  2. 2. Import the module and enable it

    Add vocalinux.nixosModules.vocalinux to your modules and set programs.vocalinux.enable = true. The module installs the package and enables hardware.uinput.

  3. 3. Add each dictating user to input and uinput

    Set users.users.<name>.extraGroups = [ "input" "uinput" ] for Wayland shortcuts and ydotool typing. X11 sessions can skip this.

  4. 4. Rebuild and log in again

    Rebuild your system as usual, then log out and back in so the new group membership applies.

The documented flake, with host and you replaced by your hostname and user:

{
  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.enable, which the module sets, loads the uinput kernel module, creates the uinput group and installs the matching udev rule. ydotool and the evdev backend’s keyboard clone both open /dev/uinput. Group membership stays per user because input grants read access to every keyboard and pointer device.

Home Manager

homeManagerModules.vocalinux takes the same programs.vocalinux options and installs into your home profile. Device permissions are a system concern, so on NixOS keep the NixOS module (or the group lines) on the system side.

{
  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; }
      ];
    };
  };
}

What the flake provides

Flake outputUse
packages.<system>.vocalinux (also default)The Vocalinux package for x86_64-linux and aarch64-linux
apps.<system>.vocalinux (also default)What nix run github:VocaHQ/vocalinux starts
overlays.defaultAdds pkgs.vocalinux to your own nixpkgs
nixosModules.vocalinux (also default)programs.vocalinux.enable and programs.vocalinux.package
homeManagerModules.vocalinux (also default)The same programs.vocalinux options, per user

Included in the package

  • whisper.cpp (the default engine), with pywhispercpp built from its PyPI sdist with the Vulkan backend
  • Silero neural VAD through onnxruntime (the [vad] extra)
  • GTK 3, PyGObject and the AppIndicator typelib from nixpkgs
  • xdotool, wtype, ydotool, wl-clipboard, xclip, xsel, xprop, setxkbmap, ibus, gdbus, notify-send, paplay, aplay and vulkaninfo on PATH
  • A desktop entry and the app icon

Not included

The vosk, whisper, parakeet and faster_whisper extras are not packaged, so Parakeet and Faster Whisper need the install script on another distro. The flake follows nixos-unstable and builds for x86_64-linux and aarch64-linux.

Gotchas

  • Do not run install.sh on NixOS. It expects a conventional filesystem layout; the flake is the supported path.
  • Speech models are not part of the Nix store. Vocalinux downloads one only after you confirm it, and shows the size first.
  • On Wayland without input membership, the hotkey is disabled. Bind a compositor shortcut through D-Bus activation instead; it toggles, it cannot push-to-talk.
  • On KDE Plasma Wayland, set System Settings → Keyboard → Virtual Keyboard to “IBus Wayland”. More in the Wayland guide.

NixOS FAQ

Is NixOS supported?

Yes, through the Nix flake added in v0.18.2. The standard install.sh script does not work on NixOS because of the /nix/store layout, which is why the distro compatibility doc still lists NixOS as unsupported for that installer. Use the flake instead.

Does the Nix package use my GPU?

The bundled pywhispercpp is built with the Vulkan backend, so whisper.cpp can use an AMD, Intel or NVIDIA GPU through Vulkan. It is also built with GGML_NATIVE=OFF, a portable baseline rather than -march=native.

Can I use Parakeet, Faster Whisper, VOSK or OpenAI Whisper from the flake?

No. The flake packages whisper.cpp plus the Silero VAD extra. The other engines are not packaged because of the PyTorch footprint or because they are not in nixpkgs.

Why do I need the input group?

On Wayland the built-in push-to-talk hotkey reads keyboard devices under /dev/input. Membership in input grants read access to every keyboard and pointer device, so the module leaves that choice to each user. The alternative is a compositor shortcut bound to the D-Bus Toggle command, which only toggles.

How do I update?

Update the vocalinux input in your flake lock and rebuild, or upgrade your Nix profile. The in-app update checker only tells you a release exists; it never installs anything.

Other ways to install

Not on Nix? The install script, AUR, .deb, .rpm, AppImage and the VocaHQ Flatpak remote cover most other systems.