-
Notifications
You must be signed in to change notification settings - Fork 0
fix: run paperclip from cloned repo via pnpm dev:once #1352
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,7 +18,6 @@ lib.mkIf host.isKyber { | |||||||||||||||||
| ''; | ||||||||||||||||||
|
|
||||||||||||||||||
| # Systemd service for Paperclip | ||||||||||||||||||
| # Uses bun runtime instead of node to avoid pino-http crash (logger[stringifySym] is not a function) | ||||||||||||||||||
| systemd.user.services.paperclip = { | ||||||||||||||||||
| Unit = { | ||||||||||||||||||
| Description = "Paperclip AI agent orchestration platform"; | ||||||||||||||||||
|
|
@@ -27,13 +26,20 @@ lib.mkIf host.isKyber { | |||||||||||||||||
| }; | ||||||||||||||||||
| Service = { | ||||||||||||||||||
| Type = "simple"; | ||||||||||||||||||
| ExecStart = "${homeDir}/.nix-profile/bin/bun run ${homeDir}/.bun/install/global/node_modules/paperclipai/dist/index.js run --no-repair"; | ||||||||||||||||||
| ExecStart = "${homeDir}/dotfiles/node_modules/.bin/paperclipai run --no-repair"; | ||||||||||||||||||
| Restart = "always"; | ||||||||||||||||||
| RestartSec = "5s"; | ||||||||||||||||||
| Environment = [ | ||||||||||||||||||
| "HOME=${homeDir}" | ||||||||||||||||||
| "HOST=0.0.0.0" | ||||||||||||||||||
| "PAPERCLIP_DEPLOYMENT_MODE=authenticated" | ||||||||||||||||||
| "PAPERCLIP_ALLOWED_HOSTNAMES=paperclip.shunkakinoki.com,172.17.0.1" | ||||||||||||||||||
| "PATH=${homeDir}/.local/bin:${homeDir}/.bun/bin:${homeDir}/.nix-profile/bin:${homeDir}/.local/share/pnpm:${homeDir}/.local/share/fnm/current/bin:${homeDir}/.npm-global/bin:/usr/local/bin:/usr/bin:/bin" | ||||||||||||||||||
| ]; | ||||||||||||||||||
| EnvironmentFile = [ | ||||||||||||||||||
| "${homeDir}/dotfiles/.env" | ||||||||||||||||||
| "${homeDir}/.paperclip/instances/default/.env" | ||||||||||||||||||
|
Comment on lines
+40
to
+41
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Systemd's EnvironmentFile = [
"-${homeDir}/dotfiles/.env"
"-${homeDir}/.paperclip/instances/default/.env"
];Prompt for AI agents
Suggested change
|
||||||||||||||||||
| ]; | ||||||||||||||||||
|
Comment on lines
+39
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Comment on lines
+39
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. EnvironmentFile entries will cause service failure if files are missing. Systemd's EnvironmentFile = [
- "${homeDir}/dotfiles/.env"
- "${homeDir}/.paperclip/instances/default/.env"
+ "-${homeDir}/dotfiles/.env"
+ "-${homeDir}/.paperclip/instances/default/.env"
];Alternatively, if these files are strictly required, add assertions or activation scripts to validate their existence. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| WorkingDirectory = "${homeDir}/.paperclip"; | ||||||||||||||||||
| StandardOutput = "append:/tmp/paperclip/paperclip.log"; | ||||||||||||||||||
| StandardError = "append:/tmp/paperclip/paperclip.log"; | ||||||||||||||||||
|
|
||||||||||||||||||
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.
EnvironmentFileentries are required by systemd; if either${homeDir}/dotfiles/.envor${homeDir}/.paperclip/instances/default/.envis missing, the unit will fail to start. Either ensure these files (and theinstances/defaultdirectory) are created with appropriate permissions during activation, or prefix the paths with-to make them optional and handle missing values another way.