* 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>
61 lines
1.7 KiB
Nix
61 lines
1.7 KiB
Nix
{
|
|
description = "Vocalinux — free, offline voice dictation for Linux";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
in
|
|
{
|
|
packages = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
{
|
|
vocalinux = pkgs.python3Packages.callPackage ./packaging/nix/package.nix {
|
|
pywhispercpp = pkgs.python3Packages.callPackage ./packaging/nix/pywhispercpp.nix { };
|
|
src = self;
|
|
};
|
|
default = self.packages.${system}.vocalinux;
|
|
}
|
|
);
|
|
|
|
apps = forAllSystems (system: {
|
|
vocalinux = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.vocalinux}/bin/vocalinux";
|
|
};
|
|
default = self.apps.${system}.vocalinux;
|
|
});
|
|
|
|
overlays.default = final: prev: {
|
|
vocalinux = self.packages.${prev.system}.vocalinux;
|
|
};
|
|
|
|
nixosModules.vocalinux =
|
|
{ pkgs, lib, ... }:
|
|
{
|
|
imports = [ ./packaging/nix/module.nix ];
|
|
programs.vocalinux.package = lib.mkDefault self.packages.${pkgs.system}.vocalinux;
|
|
};
|
|
nixosModules.default = self.nixosModules.vocalinux;
|
|
|
|
homeManagerModules.vocalinux =
|
|
{ pkgs, lib, ... }:
|
|
{
|
|
imports = [ ./packaging/nix/home-manager.nix ];
|
|
programs.vocalinux.package = lib.mkDefault self.packages.${pkgs.system}.vocalinux;
|
|
};
|
|
homeManagerModules.default = self.homeManagerModules.vocalinux;
|
|
};
|
|
}
|