Skip to content

Add Nix flake for NixOS support#561

Merged
cjpais merged 7 commits intocjpais:mainfrom
y0usaf:feat/nix-flake
Feb 1, 2026
Merged

Add Nix flake for NixOS support#561
cjpais merged 7 commits intocjpais:mainfrom
y0usaf:feat/nix-flake

Conversation

@y0usaf
Copy link
Contributor

@y0usaf y0usaf commented Jan 9, 2026

Before Submitting This PR

Please confirm you have done the following:

Human Written Description

I use NixOS, I want to use Handy on NixOS, voila :)

Related Issues/Discussions

N/A - New feature

Community Feedback

N/A - Initial contribution for NixOS support

Testing

  • Verified flake syntax with nix flake check
  • AppImage package builds and runs on NixOS

What's Included

# Run directly
nix run github:cjpais/Handy

# Install
nix profile install github:cjpais/Handy

# Development shell
nix develop github:cjpais/Handy
  • handy-appimage (default): Wraps the AppImage release for NixOS compatibility
  • devShell: Development environment with all dependencies for building from source

@cjpais
Copy link
Owner

cjpais commented Jan 10, 2026

Thank you for this contribution and what I'm curious about is I see that version 0.6.9 is hard coded. And it would be really nice to have this update within the GitHub actions so this just becomes part of the release process if possible.

I also see the following:

supportedSystems = ["x86_64-linux" "aarch64-linux"];

And I don't believe we have an ARM64 four build right now for Linux, so we probably should remove aarch64-linux

@y0usaf
Copy link
Contributor Author

y0usaf commented Jan 10, 2026

My apologies, I was hasty in getting this working on my own system. Feel free to critique the new changes 🫡

Copy link
Contributor

@pinage404 pinage404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works great !

It's superfast, it's awesome !

I would love to have this upstreamed in nixpkgs

@pinage404
Copy link
Contributor

I tried Whisper models, when after the download, when i select the model, the app crash with this message

whisper_init_from_file_with_params_no_state: loading model from '/home/pinage404/.local/share/com.pais.handy/models/whisper-medium-q4_1.bin'
whisper_init_with_params_no_state: use gpu    = 1
whisper_init_with_params_no_state: flash attn = 0
whisper_init_with_params_no_state: gpu_device = 0
whisper_init_with_params_no_state: dtw        = 0
terminate called after throwing an instance of 'vk::IncompatibleDriverError'
  what():  vk::createInstance: ErrorIncompatibleDriver

@pinage404
Copy link
Contributor

In the bottom right corner of the window, there is a message that say there is a new version available

image

Clicking on it, download something, then go back to there is a new version available

I suppose that is because Nix store packages in read-only

It could be cool to add a build option to remove this check

y0usaf and others added 5 commits January 29, 2026 11:30
Provides:
- handy-appimage: AppImage-based package (default)
- devShell: Development environment for building from source
- Remove aarch64-linux from supportedSystems (ARM64 builds not produced)
- Read version dynamically from Cargo.toml instead of hardcoding
  This enables automated updates during GitHub releases
Adds a separate workflow triggered on release publication that:
- Fetches the released AppImage
- Computes the SRI hash using nix-prefetch-url
- Updates flake.nix with the new hash
- Commits and pushes changes directly

Includes retry logic for timing issues and defensive checks to verify
the hash was actually updated and skip commits if unchanged.
Co-authored-by: pinage404 <pinage404@gmail.com>
Co-authored-by: pinage404 <pinage404@gmail.com>
@cjpais
Copy link
Owner

cjpais commented Jan 30, 2026

@pinage404 @y0usaf are these changes good enough for nixos? I won't be able to validate but I will look through the code before I pull in

@pinage404
Copy link
Contributor

The main feature works


The feature to start Handy when the computer start doesn't work

 journalctl --boot | rg handy
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.580512.1768417523000000.zst.1.1
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.581172.1768417566000000.zst.1.1
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.582231.1768417753000000.zst.1.1
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.583472.1768417838000000.zst.1.1
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.584092.1768417878000000.zst.1.1
janv. 30 12:44:43 framework-16 logrotate[1765]: considering log /var/lib/systemd/coredump/core.handy.1000.90fc79e686d440cba87508bd7db6da14.585105.1768418351000000.zst.1.1
janv. 30 12:44:58 framework-16 systemd[4406]: Starting Handy...
janv. 30 12:44:58 framework-16 handy[5594]: Could not start dynamically linked executable: /nix/store/rrrbikni1gn1xhn8k2rg2wqnjfp4a6rj-handy-appimage-unwrapped-0.7.0-extracted/usr/bin/handy
janv. 30 12:44:58 framework-16 handy[5594]: NixOS cannot run dynamically linked executables intended for generic
janv. 30 12:44:58 framework-16 handy[5594]: linux environments out of the box. For more information, see:
janv. 30 12:44:58 framework-16 handy[5594]: https://nix.dev/permalink/stub-ld
janv. 30 12:44:58 framework-16 systemd[4406]: Started Handy.
janv. 30 12:44:58 framework-16 systemd[4406]: app-Handy@autostart.service: Main process exited, code=exited, status=127/n/a
janv. 30 12:44:58 framework-16 systemd[4406]: app-Handy@autostart.service: Failed with result 'exit-code'.
janv. 30 12:48:33 framework-16 3gm4hg1vj7a6ndvhrlnh3wrbm46f9zhv-nix-gc[4524]: deleting '/nix/store/9swr07yzsl2myr33h3czpx062kmdw6f7-Handy_0.7.0_amd64.AppImage'

The generated autostart entry use the full path of the executable, maybe it could just use the one present in the $PATH, else it will have to change at each upgrade

cat ~/.config/autostart/Handy.desktop
[Desktop Entry]
Type=Application
Version=1.0
Name=Handy
Comment=Handystartup script
Exec=/nix/store/rrrbikni1gn1xhn8k2rg2wqnjfp4a6rj-handy-appimage-unwrapped-0.7.0-extracted/usr/bin/handy
StartupNotify=false
Terminal=false

Things that I expect that is a problem of the model and not of the packaging (I use Parakeet V3)

The first letter of each beginning of sentences are always missing

In French, the number are often ignored


After downloading Whisper models, the program crashes as reported here #561 (comment)


I think this can be merged and improved later

@y0usaf
Copy link
Contributor Author

y0usaf commented Jan 30, 2026

I agree with the sentiment that it can be improved later, I'm using and am very happy with Handy thanks to this flake, the workflow won't be easy to test, if that breaks then I will aim to fix as needed.

@Hi-Timofey
Copy link

+1 on lgtm. Fixed autostart by hand on my pc. As for everything else - working fine in my nixos.

@cjpais
Copy link
Owner

cjpais commented Feb 1, 2026

Thank you for this contribution and all the support for NixOS!

@cjpais cjpais merged commit 6827fb5 into cjpais:main Feb 1, 2026
2 checks passed
@pinage404
Copy link
Contributor

@y0usaf I try to use the branch from the main repo

switching this

     handy = {
-      url = "github:y0usaf/handy/feat/nix-flake";
+      url = "github:cjpais/handy";
       inputs.nixpkgs.follows = "nixpkgs-current";
     };

Give this error

error: hash mismatch in fixed-output derivation '/nix/store/mwadw6r3flrijqj3c2wkc0z3lz0j0vv3-Handy_0.7.1_amd64.AppImage.drv':
         specified: sha256-tTswFYLCPGtMbHAb2bQMsklRiRCVXLrtu4pQC8IHdqQ=
            got:    sha256-7IUZZriIVmqf85O49w9tCrTKfQURuAOM+k3sKVyigFk=

@pinage404
Copy link
Contributor

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.

4 participants