Skip to content

feat(linux): add Nix flake for one-command install & github action#886

Merged
gabrielste1n merged 6 commits into
OpenWhispr:mainfrom
0x4bs3nt:feat/nix-flake
Jun 3, 2026
Merged

feat(linux): add Nix flake for one-command install & github action#886
gabrielste1n merged 6 commits into
OpenWhispr:mainfrom
0x4bs3nt:feat/nix-flake

Conversation

@0x4bs3nt
Copy link
Copy Markdown
Contributor

@0x4bs3nt 0x4bs3nt commented Jun 1, 2026

Summary

Adds a Nix flake so users can run nix run github:OpenWhispr/openwhispr without writing their own derivation. Includes a GitHub Action that auto-PRs version bumps when new releases are published.

This finishes solution 1 of issue #728 .

…rkflow

Adds a Nix flake so users can run `nix run github:OpenWhispr/openwhispr`
without writing their own derivation. Includes a GitHub Action that
auto-PRs version bumps when new releases are published.

Closes OpenWhispr#728 (solution 1)
@0x4bs3nt
Copy link
Copy Markdown
Contributor Author

0x4bs3nt commented Jun 1, 2026

Didn't bother working on the whole issue since benedikt-weyer in #728 already made a PR for nixpkgs.

@0x4bs3nt
Copy link
Copy Markdown
Contributor Author

0x4bs3nt commented Jun 1, 2026

@gabrielste1n is the failing check my fault and I need to fix something, cause from the logs it looks like a missing env var and not anything to do with my PR?

@xAlcahest
Copy link
Copy Markdown
Collaborator

@gabrielste1n is the failing check my fault and I need to fix something, cause from the logs it looks like a missing env var and not anything to do with my PR?

Not your fault, the windows build and notarize always fail in PR

@xAlcahest
Copy link
Copy Markdown
Collaborator

Pushed a few commits on top to round this out for #728 — kept your original work, the auto-bump action and flake.lock as is.

What changed:

  • nix/package.nix now declares the runtime tools the app shells out to on Linux, via extraPkgs. Without these the AppImage launches but auto-paste silently does nothing on Wayland, which is the core of feat: Add Nix/NixOS installation support (flake, nixpkgs package, or Home Manager module) #728. Added xdotool, wtype, ydotool, wl-clipboard, xclip and xsel for clipboard and keystroke injection across X11/wlroots/GNOME/KDE, kdotool for KDE window detection, playerctl for media auto-pause, plus libsecret (safeStorage), libnotify (notifications), libpulseaudio (mic capture) and libstdc++/libgomp for the bundled whisper/llama/sherpa/qdrant binaries. Compositor tools like hyprctl, qdbus, gsettings and systemctl still resolve from the host, since wrapType2 keeps the host PATH.
  • nix/module.nix is a new NixOS module exposed as nixosModules.default. programs.openwhispr.enable installs the app and turns on programs.ydotool and hardware.uinput; programs.openwhispr.users adds the listed users to the ydotool and uinput groups so /dev/uinput access is granted declaratively.
  • A NixOS card in Settings → Wayland Paste Setup. That section already showed apt/dnf/systemctl steps for other distros; on NixOS it now shows the configuration.nix snippet instead (programs.ydotool + hardware.uinput + groups), plus the programs.openwhispr.enable one-liner if you install via the flake. Translated across all 10 locales.

NixOS setup for users:

{
  inputs.openwhispr.url = "github:OpenWhispr/openwhispr";

  # in your nixosConfigurations modules:
  imports = [ openwhispr.nixosModules.default ];
  programs.openwhispr = {
    enable = true;
    users = [ "yourname" ];
  };
}

Verified with nix build and by evaluating the module in a nixosSystem (ydotool and uinput on, user in both groups). The 1.7.2 AppImage hash matches your pin, tsc is clean, and all 10 locale files validate. Still x86_64-linux only.

@0x4bs3nt
Copy link
Copy Markdown
Contributor Author

0x4bs3nt commented Jun 2, 2026

Pushed a few commits on top to round this out for #728 — kept your original work, the auto-bump action and flake.lock as is.

What changed:

* nix/package.nix now declares the runtime tools the app shells out to on Linux, via extraPkgs. Without these the AppImage launches but auto-paste silently does nothing on Wayland, which is the core of [feat: Add Nix/NixOS installation support (flake, nixpkgs package, or Home Manager module) #728](https://github.com/OpenWhispr/openwhispr/issues/728). Added xdotool, wtype, ydotool, wl-clipboard, xclip and xsel for clipboard and keystroke injection across X11/wlroots/GNOME/KDE, kdotool for KDE window detection, playerctl for media auto-pause, plus libsecret (safeStorage), libnotify (notifications), libpulseaudio (mic capture) and libstdc++/libgomp for the bundled whisper/llama/sherpa/qdrant binaries. Compositor tools like hyprctl, qdbus, gsettings and systemctl still resolve from the host, since wrapType2 keeps the host PATH.

* nix/module.nix is a new NixOS module exposed as nixosModules.default. programs.openwhispr.enable installs the app and turns on programs.ydotool and hardware.uinput; programs.openwhispr.users adds the listed users to the ydotool and uinput groups so /dev/uinput access is granted declaratively.

* A NixOS card in Settings → Wayland Paste Setup. That section already showed apt/dnf/systemctl steps for other distros; on NixOS it now shows the configuration.nix snippet instead (programs.ydotool + hardware.uinput + groups), plus the programs.openwhispr.enable one-liner if you install via the flake. Translated across all 10 locales.

NixOS setup for users:

{
  inputs.openwhispr.url = "github:OpenWhispr/openwhispr";

  # in your nixosConfigurations modules:
  imports = [ openwhispr.nixosModules.default ];
  programs.openwhispr = {
    enable = true;
    users = [ "yourname" ];
  };
}

Verified with nix build and by evaluating the module in a nixosSystem (ydotool and uinput on, user in both groups). The 1.7.2 AppImage hash matches your pin, tsc is clean, and all 10 locale files validate. Still x86_64-linux only.

Alright, all changes sound good to me. Still a new contributor here, so not yet so intimiately familiar with the project. Thanks for the help.

@gabrielste1n gabrielste1n self-requested a review June 2, 2026 15:32
@gabrielste1n gabrielste1n merged commit 5b7d61c into OpenWhispr:main Jun 3, 2026
@gabrielste1n
Copy link
Copy Markdown
Collaborator

thanks legends @0x4bs3nt @xAlcahest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants