Files
voculinux/packaging/nix/home-manager.nix
T
c3c390f19d feat(nix): add flake package, NixOS and Home Manager modules (#936)
* feat(nix): add flake package, NixOS and Home Manager modules

Add a flake.nix plus packaging/nix derivations so Nix and NixOS users can
run and install Vocalinux declaratively, including via Home Manager.

- package.nix: buildPythonApplication with GTK3, libayatana-appindicator,
  IBus and libnotify typelibs; wraps the entry point with every host tool
  the injectors probe for (xdotool, wtype, ydotool, wl-clipboard, xclip,
  xsel, xprop, setxkbmap, ibus, gdbus, notify-send, paplay, aplay)
- pywhispercpp.nix: builds pywhispercpp from its vendored PyPI sdist
  (absent from nixpkgs, same gap as Debian/Fedora), static whisper.cpp,
  GGML_NATIVE=OFF for a portable baseline
- module.nix: NixOS module enabling hardware.uinput and installing the
  package; input/uinput group membership stays a per-user choice
- home-manager.nix: programs.vocalinux.enable installs into the profile
- docs/INSTALL.md gains a Nix / NixOS section; packaging/nix/README.md
  carries the usage snippets

Refs #931

* fix(nix): address review findings on imports check and docs

- pywhispercpp: check pywhispercpp.model and _pywhispercpp too, so the
  compiled binding is proven loadable, not just the package
- README Home Manager example: declare the nixpkgs/home-manager inputs
  and pass pkgs, which homeManagerConfiguration requires
- package.nix: use top-level xprop/setxkbmap attrs (xorg.* is deprecated)

---------

Co-authored-by: Jatin K Malik <jatinkrmalik@gmail.com>
2026-10-10 20:40:25 -07:00

26 lines
698 B
Nix

# Home Manager module for Vocalinux.
#
# Installs the package into the user profile; device permissions are a
# system concern, so pair it with the NixOS module (or the manual group
# steps in docs/INSTALL.md) for Wayland/evdev shortcuts and ydotool typing.
{ config, lib, pkgs, ... }:
let
cfg = config.programs.vocalinux;
in
{
options.programs.vocalinux = {
enable = lib.mkEnableOption "Vocalinux voice dictation";
package = lib.mkOption {
type = lib.types.package;
defaultText = "the package built by the vocalinux flake";
description = "The vocalinux package to install.";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
};
}