fix(nix): fix dolt launchd ProgramArguments type error - #1492
Conversation
writeShellScript returns a derivation that nix-darwin's ProgramArguments type checker rejects. Use the same bash+script pattern as all other launchd agents in this repo.
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
📝 WalkthroughWalkthroughThis change refactors the dolt service configuration in Home Manager by switching from a wrapped script approach to directly using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Mesa DescriptionTL;DRFixes a What changed?
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Code Review
This pull request refactors the startScript definition in the Dolt home-manager service to use pkgs.replaceVars directly and updates the service configurations to explicitly invoke bash for both Darwin and Linux environments. A review comment suggests quoting the script path in the systemd ExecStart command to improve robustness and follow shell best practices.
| Service = { | ||
| Type = "simple"; | ||
| ExecStart = startScript; | ||
| ExecStart = "${pkgs.bash}/bin/bash ${startScript}"; |
There was a problem hiding this comment.
- config/hyprpanel/default.nix (nixfmt) - home-manager/modules/local-scripts/decafinate.sh (shfmt)
Summary
writeShellScriptreturns a derivation that nix-darwin'sProgramArgumentstype checker rejects as non-stringpkgs.replaceVars+bashinvocation pattern used by all other launchd agents in this reponix-darwinbuild failure:A definition for option 'home-manager.users.shunkakinoki.launchd.agents.dolt.config.ProgramArguments."[definition 1-entry 1]"' is not of type 'string'Test plan
nix-darwinjob) passeswriteShellScriptwith inline content)Summary by cubic
Fixes a
nix-darwinbuild failure for the dolt launchd agent by switching to abash+pkgs.replaceVarsscript soProgramArgumentsare valid strings and the service starts reliably on macOS. Also formats drifted files withtreefmt(nixfmt,shfmt).pkgs.replaceVarsscript invoked via${pkgs.bash}/bin/bashinProgramArguments.Service.ExecStartto use the samebashinvocation.Written for commit da53eaf. Summary will update on new commits.