Skip to content

feat: add NixOS flake development environment#21

Closed
yuuhikaze wants to merge 1 commit into
Open-LLM-VTuber:mainfrom
yuuhikaze:feat/nix-flake
Closed

feat: add NixOS flake development environment#21
yuuhikaze wants to merge 1 commit into
Open-LLM-VTuber:mainfrom
yuuhikaze:feat/nix-flake

Conversation

@yuuhikaze
Copy link
Copy Markdown

@yuuhikaze yuuhikaze commented Apr 27, 2026

Adds a flake.nix and flake.lock for reproducible development on NixOS. The shell provides Node.js and all system libraries required by Electron (GTK3, X11, Mesa, GBM, audio, etc.) via LD_LIBRARY_PATH, so the app runs without manual dependency management.

Usage

nix develop
npm install
npm run dev

Supports x86_64-linux and aarch64-linux.

Known issue

From my experience on Hyprland: in pet mode, if the avatar has been sitting idle and the user drags it using the window manager (e.g. via a move keybind or WM drag), the session crashes and logs you out. In-app drag (clicking and dragging the avatar directly) is unaffected. This appears to be a Wayland/Electron interaction issue and is not introduced by this PR.

Summary by CodeRabbit

  • Documentation

    • Enhanced project setup documentation with a new Nix-based development environment configuration option
    • Reorganized installation and development instructions into a dedicated Manual Setup section for improved clarity
  • Chores

    • Introduced Nix flake configuration to enable streamlined development environment setup with pre-configured dependencies for Linux systems

Add recommended Nix flake workflow for NixOS users, allowing them to quickly
set up the development environment without manual system dependency installation.
Maintain backward compatibility with manual setup instructions.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

📝 Walkthrough

Walkthrough

The PR restructures project setup documentation and introduces a Nix-based development environment. README.md is reorganized to document both Nix (nix develop) and manual setup paths, while a new flake.nix file provides development shell configurations for multiple architectures with Node.js and system library dependencies.

Changes

Cohort / File(s) Summary
Project Setup Documentation
README.md
Restructured setup instructions to introduce Nix-based workflow alongside manual setup. Existing npm install/dev commands moved under new nested #### Install and #### Development headings within a "Manual Setup" section.
Nix Development Environment
flake.nix
New flake configuration providing development shells for x86_64-linux and aarch64-linux, with Node.js and curated system library paths (GNOME accessibility, GTK/Pango/Cairo, X11/Mesa, dbus, NSS, ALSA).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A dev shell in Nix, so clean and so bright,
No more dependency fights in the night!
With flakes and with guides, the path becomes clear,
Setup's now easier—developers cheer! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a NixOS flake development environment, which is the primary purpose of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

23-33: ⚠️ Potential issue | 🟡 Minor

Resolve markdownlint MD014 in manual command blocks.

Line 26 and Line 32 use $ command prefixes without command output, which triggers the reported markdownlint warning. Consider removing $ for consistency with the Nix section.

Suggested doc fix
 ```bash
-$ npm install
+npm install

@@

-$ npm run dev
+npm run dev
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @README.md around lines 23 - 33, Update the README.md under the "Install" and
"Development" sections to remove the leading "$" from the fenced bash examples
so they are plain commands (change "$ npm install" to "npm install" and "$ npm
run dev" to "npm run dev") to resolve markdownlint MD014 and match the Nix
section formatting.


</details>

</blockquote></details>

</blockquote></details>
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@README.md`:
- Around line 23-33: Update the README.md under the "Install" and "Development"
sections to remove the leading "$" from the fenced bash examples so they are
plain commands (change "$ npm install" to "npm install" and "$ npm run dev" to
"npm run dev") to resolve markdownlint MD014 and match the Nix section
formatting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 345c6530-819d-4671-b587-cbaf2b448e67

📥 Commits

Reviewing files that changed from the base of the PR and between d176e7d and 36fb290.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • README.md
  • flake.nix

@yuuhikaze
Copy link
Copy Markdown
Author

Closing this PR in favor of a more robust solution submitted on: #22
More than just providing a reproducible environment, it fixes a model scaling bug by adding an epsilon boundary

@yuuhikaze yuuhikaze closed this May 6, 2026
@yuuhikaze yuuhikaze deleted the feat/nix-flake branch May 10, 2026 20:03
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.

1 participant