-
Notifications
You must be signed in to change notification settings - Fork 0
fix: use nix-profile bun path for paperclip service #1350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ lib.mkIf host.isKyber { | |
| }; | ||
| Service = { | ||
| Type = "simple"; | ||
| ExecStart = "${homeDir}/.bun/bin/bun run ${homeDir}/.bun/install/global/node_modules/paperclipai/dist/index.js run --no-repair"; | ||
| ExecStart = "${homeDir}/.nix-profile/bin/bun run ${homeDir}/.bun/install/global/node_modules/paperclipai/dist/index.js run --no-repair"; | ||
|
||
| Restart = "always"; | ||
| RestartSec = "5s"; | ||
| Environment = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the path to the
bunbinary in the user's profile (.nix-profile) is fragile and bypasses Nix's dependency tracking. A more robust and idiomatic approach in Home Manager is to use thebunpackage frompkgsdirectly (e.g.,${pkgs.bun}/bin/bun). This ensures that the binary is always available in the Nix store and correctly referenced by the service, regardless of the state of the user's profile. Note: To implement this, you will need to addpkgsto the module arguments at the top of the file (e.g.,{ config, lib, pkgs, inputs, ... }).