Skip to content

fix(cliproxyapi): bundle backup scripts to fix service failure - #449

Merged
shunkakinoki merged 3 commits into
mainfrom
fix/cliproxyapi-backup-scripts
Dec 26, 2025
Merged

fix(cliproxyapi): bundle backup scripts to fix service failure#449
shunkakinoki merged 3 commits into
mainfrom
fix/cliproxyapi-backup-scripts

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Dec 25, 2025

Copy link
Copy Markdown
Owner

Summary

  • Fixes the failing cliproxyapi-backup.service which was degrading the systemd session
  • The service was failing with exit code 127 (command not found)

Root Cause

The backup-and-recover.sh script references two other scripts (backup-auth.sh and recover-auth.sh), but only the main script was being copied to the Nix store. When the service tried to execute the dependent scripts, they weren't found in $SCRIPT_DIR.

Additionally, the scripts need bash in the PATH to execute properly.

Solution

  1. Created a backupScripts Nix derivation that bundles all three scripts together into the same directory in the Nix store
  2. Added bash to the systemd service PATH environment variable
  3. Updated both macOS (launchd) and Linux (systemd) services to use the bundled scripts

Changes

  • Added backupScripts derivation using pkgs.runCommand
  • Updated both macOS (launchd) and Linux (systemd) services to use the bundled scripts
  • Added PATH environment variable for systemd service to include bash, awscli2, and coreutils

Testing

✅ Service is now running successfully on the fix branch
✅ Systemd session is no longer degraded (0 failed units)
✅ Backup and recovery cycle completes without errors

After merging, the fix will be automatically applied by the dotfiles-updater service.

Copilot AI review requested due to automatic review settings December 25, 2025 10:19
@coderabbitai

coderabbitai Bot commented Dec 25, 2025

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Bundled backup scripts into the service package and updated service references to use the bundled copies
    • Ensured the Linux backup service has an expanded PATH so required tooling (bash, AWS CLI v2, coreutils) is available
    • No functional changes to the macOS (Darwin) service paths or behavior

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This change adds a bundled backupScripts output (three backup-related scripts, marked executable), updates the cliproxyapi service and oneshot backup/recovery service ProgramArguments to use the bundled script paths, and extends the Linux systemd Environment PATH to include bash, awscli2, and coreutils.

Changes

Cohort / File(s) Summary
Backup scripts bundle & service config
home-manager/services/cliproxyapi/default.nix
Adds backupScripts output packaging three backup scripts (executable); updates main service ProgramArguments and oneshot backup/recovery ExecStart to reference bundled script paths; adds Linux systemd Environment = PATH=...:bash:awscli2:coreutils

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I packed three scripts in a cozy den,
Made them executable — ready, then!
PATHs extended, tools in tow,
Backups hum where rabbit feet go. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: bundling backup scripts to fix service failure, which is the primary objective of this pull request.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the problem, root cause, solution, and testing verification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cliproxyapi-backup-scripts

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4f1da and 6c1708a.

📒 Files selected for processing (1)
  • home-manager/services/cliproxyapi/default.nix
🚧 Files skipped from review as they are similar to previous changes (1)
  • home-manager/services/cliproxyapi/default.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: nix-linux
  • GitHub Check: nix-darwin
  • GitHub Check: nix-nixos
  • GitHub Check: lua-neovim-test
  • GitHub Check: lua-hammerspoon
  • GitHub Check: lua-neovim
  • GitHub Check: shellspec
  • GitHub Check: shellcheck

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.

@mesa-dot-dev

mesa-dot-dev Bot commented Dec 25, 2025

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical issue where the cliproxyapi-backup.service was failing due to dependent scripts not being properly included in the Nix store. The core problem was that backup-and-recover.sh relied on other scripts that were not bundled alongside it, leading to 'command not found' errors. The solution involves creating a dedicated Nix derivation to package all related backup scripts together, ensuring their availability. This change also updates the service configurations for both macOS and Linux to use this new bundled package and enhances the systemd service's environment with essential command-line tools.

Highlights

  • Service Failure Fix: Resolves the cliproxyapi-backup.service failing with exit code 127 (command not found) on Linux, which was degrading the systemd session.
  • Script Bundling: Introduces a new Nix derivation, backupScripts, to bundle backup-and-recover.sh and its dependent scripts (backup-auth.sh, recover-auth.sh) into a single, accessible directory in the Nix store.
  • Service Configuration Updates: Updates both macOS (launchd) and Linux (systemd) service configurations to utilize the newly bundled scripts, ensuring all necessary components are found during execution.
  • Environment Path Enhancement: Adds awscli2 and coreutils to the PATH environment variable for the systemd service, providing necessary tools for script execution.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

The cliproxyapi-backup service was failing because backup-and-recover.sh
references backup-auth.sh and recover-auth.sh, but only the main script
was being copied to the Nix store.

This commit creates a backupScripts derivation that bundles all three
scripts together, ensuring they're all available in the same directory
when the service runs.

Fixes exit code 127 (command not found) errors.
@mesa-dot-dev

mesa-dot-dev Bot commented Dec 25, 2025

Copy link
Copy Markdown

Mesa Description

TL;DR

Bundled cliproxyapi backup scripts to fix cliproxyapi-backup.service failure and systemd session degradation.

What changed?

  • flake.lock: Updated to reflect changes in Nix Flake inputs and dependencies.
  • home-manager/services/cliproxyapi/default.nix:
    • Refactored backup scripts (backup-and-recover.sh, backup-auth.sh, recover-auth.sh) into a single backupScripts Nix derivation using pkgs.runCommand.
    • Updated cliproxyapi-backup-service (launchd) and cliproxyapi-backup-timer (systemd) to utilize these bundled scripts.
    • Configured the PATH environment variable for the systemd service's ExecStart to include bash, awscli2, and coreutils.

Description generated by Mesa. Update settings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request correctly identifies and fixes the issue of the cliproxyapi-backup.service failing due to missing script dependencies. Bundling the scripts into a single Nix derivation is a good solution. The changes for the systemd service look solid, including the addition of the PATH environment variable. I've left one comment regarding a potential issue on macOS where the launchd service is missing a similar PATH configuration, which could lead to failures.

ProgramArguments = [
"${pkgs.bash}/bin/bash"
"${./scripts/backup-and-recover.sh}"
"${backupScripts}/backup-and-recover.sh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

While this correctly points the launchd service to the bundled script, it's missing the necessary PATH environment variable for the commands within the scripts to be found on macOS. The backup scripts use commands like aws, ls, and date, which are provided by pkgs.awscli2 and pkgs.coreutils. Without setting the PATH, this service is likely to fail on macOS, similar to the original problem on Linux.

To fix this, you should add an Environment attribute to the config block for this launchd agent, similar to how you've done for the systemd service. It should set a PATH that includes the binaries from awscli2 and coreutils.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +106 to +109
Environment = "PATH=${
lib.makeBinPath [
pkgs.awscli2
pkgs.coreutils

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include bash in backup service PATH

The backup service now overrides PATH to only awscli2/coreutils, but backup-and-recover.sh executes backup-auth.sh and recover-auth.sh directly, which rely on their #!/usr/bin/env bash shebangs to find bash. On NixOS (or any system without /usr/bin/bash), env won’t locate bash in this restricted PATH, so the backup cycle fails with env: bash: No such file or directory. Consider adding pkgs.bash to the PATH or invoking the helper scripts via an explicit ${pkgs.bash}/bin/bash.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
home-manager/services/cliproxyapi/default.nix (1)

71-83: Darwin backup service missing PATH environment variable.

The Linux systemd backup service (lines 106-111) correctly adds a PATH environment variable including awscli2 and coreutils. However, the Darwin launchd backup service lacks this environment configuration. If the backup scripts require aws CLI commands or coreutils utilities (which is likely given the PR context), this service may fail on macOS.

Consider adding an Environment attribute similar to the main cliproxyapi Darwin service (lines 29-38):

🔎 Proposed fix
  launchd.agents.cliproxyapi-backup = lib.mkIf pkgs.stdenv.isDarwin {
    enable = true;
    config = {
      ProgramArguments = [
        "${pkgs.bash}/bin/bash"
        "${backupScripts}/backup-and-recover.sh"
      ];
+     Environment = {
+       PATH = "${
+         lib.makeBinPath [
+           pkgs.awscli2
+           pkgs.coreutils
+         ]
+       }:/opt/homebrew/bin:/usr/local/bin:/usr/bin";
+     };
      StartInterval = 300; # Run every 5 minutes
      RunAtLoad = true;
      StandardOutPath = "/tmp/cliproxyapi-backup.log";
      StandardErrorPath = "/tmp/cliproxyapi-backup.error.log";
    };
  };
🧹 Nitpick comments (1)
home-manager/services/cliproxyapi/default.nix (1)

11-18: Consider adding more detailed documentation.

The backupScripts derivation correctly bundles the three scripts to fix the missing dependency issue. However, per the coding guidelines on documenting complex configurations and major changes, consider expanding the comment to explain why this bundling is needed (e.g., "backup-and-recover.sh sources backup-auth.sh and recover-auth.sh from the same directory, so they must be bundled together in the Nix store").

Based on coding guidelines and learnings about documenting major changes in Nix configurations.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5d56660 and 7b4f1da.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • home-manager/services/cliproxyapi/default.nix
🧰 Additional context used
📓 Path-based instructions (6)
**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.nix: Use nixfmt for formatting all Nix files
Document complex configurations with comments in Nix files

**/*.nix: Use 2 spaces for indentation in Nix files
Keep line length under 100 characters in Nix files
Sort attribute sets alphabetically in Nix files
Use consistent spacing around operators in Nix files
Format lists and sets consistently in Nix files

Use treefmt.toml for formatting Nix files

**/*.nix: Use mkOption for configurable options in Nix modules
Implement proper typing for all options in Nix modules
Follow the Nix expression language style guide

Files:

  • home-manager/services/cliproxyapi/default.nix
**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Use default.nix files for module exports

Files:

  • home-manager/services/cliproxyapi/default.nix
home-manager/services/*/default.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Service configurations should be located in home-manager/services/<name>/ with proper service definitions and correct dependency handling

Files:

  • home-manager/services/cliproxyapi/default.nix
home-manager/services/**/default.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

Service configurations must include proper service definitions, handle dependencies correctly, and document service parameters

Files:

  • home-manager/services/cliproxyapi/default.nix
home-manager/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)

home-manager/**/*.nix: Use typed options whenever possible in Nix configurations
Document all configuration options in Nix modules and programs
Follow home-manager's module structure and keep configurations modular
Use proper indentation and formatting in Nix configuration files

Files:

  • home-manager/services/cliproxyapi/default.nix
home-manager/services/**/*.nix

📄 CodeRabbit inference engine (.cursor/rules/nix.mdc)

Service configurations in home-manager/services/ should follow systemd service conventions, include proper service dependencies, and have clear documentation for service parameters

Files:

  • home-manager/services/cliproxyapi/default.nix
🧠 Learnings (5)
📚 Learning: 2025-11-25T09:34:40.062Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-11-25T09:34:40.062Z
Learning: Document all major changes in Nix configurations

Applied to files:

  • home-manager/services/cliproxyapi/default.nix
📚 Learning: 2025-11-25T09:35:01.066Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/nix.mdc:0-0
Timestamp: 2025-11-25T09:35:01.066Z
Learning: Applies to home-manager/services/**/*.nix : Service configurations in `home-manager/services/` should follow systemd service conventions, include proper service dependencies, and have clear documentation for service parameters

Applied to files:

  • home-manager/services/cliproxyapi/default.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/services/**/default.nix : Service configurations must include proper service definitions, handle dependencies correctly, and document service parameters

Applied to files:

  • home-manager/services/cliproxyapi/default.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/programs/**/*.nix : Follow program-specific best practices in program configuration files

Applied to files:

  • home-manager/services/cliproxyapi/default.nix
📚 Learning: 2025-11-25T09:34:55.014Z
Learnt from: CR
Repo: shunkakinoki/dotfiles PR: 0
File: .cursor/rules/home-manager.mdc:0-0
Timestamp: 2025-11-25T09:34:55.014Z
Learning: Applies to home-manager/services/*/default.nix : Service configurations should be located in `home-manager/services/<name>/` with proper service definitions and correct dependency handling

Applied to files:

  • home-manager/services/cliproxyapi/default.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Agent
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: docker-build-push (linux/arm64, arm64, ubuntu-24.04-arm)
  • GitHub Check: docker-build-push (linux/amd64, amd64, ubuntu-latest)
  • GitHub Check: nix-nixos
  • GitHub Check: nix-darwin
  • GitHub Check: nix-linux
  • GitHub Check: e2e-run (NixOS, ubuntu-latest)
  • GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
  • GitHub Check: e2e-run (MacOS, macos-latest)
  • GitHub Check: lua-neovim
  • GitHub Check: lua-neovim-test
  • GitHub Check: lua-hammerspoon
  • GitHub Check: shellcheck
  • GitHub Check: shellspec
🔇 Additional comments (1)
home-manager/services/cliproxyapi/default.nix (1)

105-111: LGTM! Properly fixes the service failure.

The changes correctly address the issue described in the PR objectives:

  • Line 105 uses the bundled scripts path, ensuring all dependent scripts are available in the same directory
  • Lines 106-111 add the PATH environment variable with awscli2 and coreutils, which the scripts need to execute aws commands and use standard utilities

This should resolve the code 127 (command not found) error.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a failing cliproxyapi-backup.service on Linux by bundling the main backup script with its dependencies (backup-auth.sh and recover-auth.sh) into a single Nix store directory. Previously, only the main script was copied, causing the service to fail with exit code 127 when trying to execute the dependent scripts.

Key Changes:

  • Created a backupScripts derivation that bundles all three backup scripts together
  • Updated both macOS and Linux backup services to reference the bundled scripts
  • Added PATH environment variable to the Linux systemd service to include awscli2 and coreutils

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
home-manager/services/cliproxyapi/default.nix Added backupScripts derivation to bundle all backup scripts together; updated service configurations to use bundled scripts; added PATH environment for systemd service
flake.lock Updated NUR dependency (unrelated to the main fix)
Comments suppressed due to low confidence (1)

home-manager/services/cliproxyapi/default.nix:83

  • The macOS launchd backup service is missing the Environment configuration with PATH that includes awscli2 and coreutils. The backup scripts (backup-auth.sh and recover-auth.sh) depend on the 'aws' command being available. Without a PATH environment variable, the service may fail on macOS when trying to execute these commands. Consider adding an Environment section similar to the main cliproxyapi service (lines 29-38) that includes awscli2 and coreutils in the PATH.
  launchd.agents.cliproxyapi-backup = lib.mkIf pkgs.stdenv.isDarwin {
    enable = true;
    config = {
      ProgramArguments = [
        "${pkgs.bash}/bin/bash"
        "${backupScripts}/backup-and-recover.sh"
      ];
      StartInterval = 300; # Run every 5 minutes
      RunAtLoad = true;
      StandardOutPath = "/tmp/cliproxyapi-backup.log";
      StandardErrorPath = "/tmp/cliproxyapi-backup.error.log";
    };
  };

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="home-manager/services/cliproxyapi/default.nix">

<violation number="1" location="home-manager/services/cliproxyapi/default.nix:109">
P1: The PATH environment variable is missing `pkgs.bash`. The helper scripts (`backup-auth.sh` and `recover-auth.sh`) use `#!/usr/bin/env bash` shebangs, which require `bash` to be in PATH. On NixOS (or any system without `/usr/bin/bash`), `env` won&#39;t be able to locate bash with this restricted PATH, causing the backup service to fail with `env: bash: No such file or directory`.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

Environment = "PATH=${
lib.makeBinPath [
pkgs.awscli2
pkgs.coreutils

@cubic-dev-ai cubic-dev-ai Bot Dec 25, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1: The PATH environment variable is missing pkgs.bash. The helper scripts (backup-auth.sh and recover-auth.sh) use #!/usr/bin/env bash shebangs, which require bash to be in PATH. On NixOS (or any system without /usr/bin/bash), env won't be able to locate bash with this restricted PATH, causing the backup service to fail with env: bash: No such file or directory.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/services/cliproxyapi/default.nix, line 109:

<comment>The PATH environment variable is missing `pkgs.bash`. The helper scripts (`backup-auth.sh` and `recover-auth.sh`) use `#!/usr/bin/env bash` shebangs, which require `bash` to be in PATH. On NixOS (or any system without `/usr/bin/bash`), `env` won&#39;t be able to locate bash with this restricted PATH, causing the backup service to fail with `env: bash: No such file or directory`.</comment>

<file context>
@@ -93,7 +102,13 @@ in
+      Environment = &quot;PATH=${
+        lib.makeBinPath [
+          pkgs.awscli2
+          pkgs.coreutils
+        ]
+      }&quot;;
</file context>
Suggested change
pkgs.coreutils
pkgs.coreutils
pkgs.bash

✅ Addressed in 6c1708a

The service needs bash in PATH to execute the backup scripts that call
other scripts using SCRIPT_DIR.
@shunkakinoki
shunkakinoki merged commit c1bcf72 into main Dec 26, 2025
20 of 21 checks passed
@shunkakinoki
shunkakinoki deleted the fix/cliproxyapi-backup-scripts branch December 26, 2025 05:47
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.

2 participants