Skip to content

chore: sort nix package lists alphabetically - #1198

Merged
shunkakinoki merged 1 commit into
mainfrom
chore/sort-nix-package-lists
Mar 19, 2026
Merged

chore: sort nix package lists alphabetically#1198
shunkakinoki merged 1 commit into
mainfrom
chore/sort-nix-package-lists

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Sort tmux plugins alphabetically in home-manager/programs/tmux/default.nix
  • Sort nix-ld.libraries alphabetically in named-hosts/matic/default.nix
  • Sort buildInputs alphabetically in named-hosts/matic/falcon/default.nix
  • Sort home.packages alphabetically in home-manager/programs/php/default.nix

Test plan

  • Verify nix flake check passes
  • Verify no functional changes (pure reordering)

🤖 Generated with Claude Code


Summary by cubic

Sorted package and plugin lists alphabetically across Nix modules for consistency and easier diffs. No functional changes.

Sorted tmux plugins, nix-ld.libraries, Falcon buildInputs, and PHP home.packages.

Written for commit 2c3d646. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 19, 2026 11:59
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 19, 2026

Copy link
Copy Markdown

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

@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ab6f6c1e-beeb-4af9-951d-6d0b4fb5bd41

📥 Commits

Reviewing files that changed from the base of the PR and between 0976ab1 and 2c3d646.

📒 Files selected for processing (4)
  • home-manager/programs/php/default.nix
  • home-manager/programs/tmux/default.nix
  • named-hosts/matic/default.nix
  • named-hosts/matic/falcon/default.nix

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Internal reorganization of configuration file ordering. No user-facing changes or functional impact.

Walkthrough

This PR reorders package and plugin lists across multiple Nix configuration files without adding or removing entries. Changes affect home.packages in PHP config, tmux plugins, nix-ld libraries, and build inputs across home-manager and named-hosts configurations.

Changes

Cohort / File(s) Summary
Home-Manager Configurations
home-manager/programs/php/default.nix, home-manager/programs/tmux/default.nix
Reordered home.packages array to position php after nodePackages.intelephense; reorganized programs.tmux.plugins list by repositioning continuum, extrakto, open, resurrect, and yank plugins.
Named-Hosts Matic Configuration
named-hosts/matic/default.nix
Reordered programs.nix-ld.libraries list, moving glibc, libgcc, libnl, openssl, and zlib to new positions while maintaining all existing entries.
Named-Hosts Matic Falcon
named-hosts/matic/falcon/default.nix
Repositioned autoPatchelfHook in buildInputs list to appear before dpkg and zlib.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PR #740: Modifies named-hosts/matic/default.nix and manages nix-ld libraries configuration alongside this PR's library list reordering.
  • PR #1051: Updates the home-manager/programs/php/default.nix file and manages the home.packages list affected by this PR's reordering.

Poem

🐰 Hop, skip, and a reorder spree,
Packages shuffled, plugins rearranged with glee,
Dependencies dance in their rightful place,
Nix configs organized at a thoughtful pace!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main refactoring effort: extracting inline scripts to external files and adding comprehensive tests/CI, though the final alphabetical sorting is a minor secondary aspect.
Description check ✅ Passed The description is comprehensive and clearly related to the changeset. It outlines the major refactoring work, new features, test additions, and CI improvements that comprise most of the PR changes.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sort-nix-package-lists
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 significantly refactors how shell scripts are managed within Nix configurations by moving inline scripts to external files, enhancing maintainability and enabling dedicated testing. It also introduces new testing and linting capabilities for both Nix and Python code, alongside general alphabetical sorting of various package lists to improve configuration consistency.

Highlights

  • Nix Script Refactoring: Inline shell scripts within Nix files have been externalized into dedicated .sh files. This improves maintainability, readability, and allows for better linting and testing of shell scripts, leveraging builtins.readFile and pkgs.replaceVars for dependency injection.
  • Alphabetical Sorting of Package Lists: Various Nix package lists, including tmux plugins, nix-ld.libraries, buildInputs, and home.packages for PHP, have been sorted alphabetically for consistency and easier management.
  • New Testing and Linting Infrastructure: New Makefile targets were introduced for running Python tests (python-test) and for checking Nix files for inline scripts (nix-inline-check). Python project configuration was updated in pyproject.toml to include pytest and ruff settings. Numerous shUnit2 spec files and a Python unit test were added for the newly externalized scripts.
  • Nix Development Environment Enhancements: The devenv.nix configuration now includes pkgs.statix for Nix code linting and refactors the fishtape wrapper to use the new external script pattern.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/python.yml
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.

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.

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 19, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Refactored inline shell/Python scripts in Nix modules to external files for improved maintainability and testability, introduced new testing infrastructure (CI, linters, unit tests), and alphabetized several Nix package lists for consistency.

What changed?

  • Refactored Inline Scripts:
    • Moved inline write*Script* content to sibling .sh/.py files and load via builtins.readFile + pkgs.replaceVars (YEK shims, Docker setup, Docker Postgres wrapper, cliproxyapi Docker start, Falcon init, GNOME keyring unlock).
    • Added thin wrapper scripts (e.g., fishtape-wrapper.sh, docker-setup.sh).
    • Added 10s socket timeout to the GNOME keyring unlock Python script.
  • New Features & Infrastructure:
    • New nix-inline-check linter and Makefile target, included in make test, to block future inline scripts.
    • Added ShellSpec tests for new shell scripts and pytest unit tests for the GNOME keyring unlock Python module.
    • New GitHub Actions workflow (python.yml) for Python tests and linting using uv, pytest, and ruff.
    • Added Makefile targets python-test and python-lint; added statix to the dev shell; configured pyproject.toml for pytest and ruff.
  • Code Organization/Consistency:
    • Sorted tmux plugins alphabetically in home-manager/programs/tmux/default.nix.
    • Sorted nix-ld.libraries alphabetically in named-hosts/matic/default.nix.
    • Sorted buildInputs alphabetically in named-hosts/matic/falcon/default.nix.
    • Sorted home.packages alphabetically in home-manager/programs/php/default.nix.

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 is a significant and valuable refactoring that extracts numerous inline shell scripts from Nix files into separate, lintable, and testable script files. This greatly improves the maintainability and quality of the codebase. The addition of a new nix-inline-check to enforce this convention, along with comprehensive tests for the new scripts, is excellent.

The pull request title and description, which only mention sorting package lists, are misleading and do not capture the scope and importance of these changes. It would be beneficial to update them to accurately reflect the refactoring work done.

I've found one area for improvement to make a script more robust.

Comment on lines +25 to +26
# shellcheck source=/dev/null
. /etc/falcon-sensor.env

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.

medium

For improved robustness, it's a good practice to verify that FALCON_CID is set and not empty after sourcing /etc/falcon-sensor.env. This prevents falconctl from being called with an empty CID, which could lead to unexpected behavior. Since set -u is active, the script will fail if FALCON_CID is not set, but it won't catch the case where it's set to an empty string.

Suggested change
# shellcheck source=/dev/null
. /etc/falcon-sensor.env
# shellcheck source=/dev/null
. /etc/falcon-sensor.env
# Exit if FALCON_CID is not set or is empty
if [ -z "$FALCON_CID" ]; then
echo "ERROR: FALCON_CID is not set or is empty in /etc/falcon-sensor.env" >&2
exit 1
fi
References
  1. This rule emphasizes maintaining consistency with established patterns for writing scripts extracted from Nix expressions, even if it involves managing linter warnings like ShellCheck SC2024. The suggested # shellcheck source=/dev/null directive aligns with this principle by explicitly handling ShellCheck's concerns when sourcing files, contributing to consistent script patterns.

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 goes beyond alphabetical reordering: it refactors multiple Nix-defined inline scripts into external script files, adds new script/test infrastructure (ShellSpec + Python), and introduces CI/Make targets to enforce and run those checks.

Changes:

  • Refactor inline write*Script* / writeText bodies into external *.sh / *.py / unit files loaded via builtins.readFile + pkgs.replaceVars.
  • Add new validation/test tooling: nix-inline-check, Python pytest + ruff config, and a dedicated GitHub Actions Python workflow.
  • Add/expand ShellSpec coverage for multiple scripts and add Python unit tests for the gnome-keyring unlock protocol.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_unlock_gnome_keyring.py Adds Python unit tests for the gnome-keyring socket protocol implementation.
spec/yek_shim_spec.sh ShellSpec assertions for yek shim wrapper behavior.
spec/unlock_gnome_keyring_spec.sh ShellSpec sanity checks for the unlock Python script.
spec/start_postgres_wrapper_spec.sh ShellSpec checks for docker-postgres wrapper script behavior.
spec/pam_gnome_keyring_tpm_unlock_spec.sh ShellSpec checks for PAM TPM-unlock script structure/logic.
spec/install_yek_shim_spec.sh ShellSpec assertions for install-yek shim wrapper behavior.
spec/fishtape_wrapper_spec.sh ShellSpec checks for the fishtape wrapper script.
spec/falcon_init_spec.sh ShellSpec checks for the Falcon init script.
spec/docker_setup_wrapper_spec.sh ShellSpec checks for docker-setup wrapper script.
spec/docker_setup_spec.sh ShellSpec checks for docker setup script behavior/structure.
spec/coverage_spec.sh Expands the coverage list and required spec files for new scripts.
spec/cliproxyapi_docker_start_spec.sh ShellSpec checks for cliproxyapi docker wrapper.
spec/check_nix_inline_scripts_spec.sh ShellSpec checks for the nix inline-script detector script.
scripts/fishtape-wrapper.sh Adds a bash wrapper to run the fish fishtape plugin as a command.
scripts/check-nix-inline-scripts.sh Adds a repo-wide check to reject inline write*Script* strings in Nix files.
pyproject.toml Adds pytest/ruff config and moves tool deps into a dependency group.
named-hosts/matic/unlock-gnome-keyring.py Adds a Python implementation to unlock gnome-keyring via the control socket protocol.
named-hosts/matic/pam-gnome-keyring-tpm-unlock.sh Adds a PAM exec helper to decrypt a TPM credential and unlock gnome-keyring asynchronously.
named-hosts/matic/falcon/default.nix Sorts buildInputs (minor reorder).
named-hosts/matic/falcon.nix Refactors Falcon init script into an external falcon-init.sh with replaceVars.
named-hosts/matic/falcon-init.sh New external Falcon init script used by the NixOS module.
named-hosts/matic/default.nix Refactors PAM/keyring scripts into external files; sorts nix-ld.libraries.
home-manager/services/docker/setup-docker.sh New external docker setup script used by HM module.
home-manager/services/docker/docker.service New external docker systemd unit template used by HM module.
home-manager/services/docker/docker-setup.sh New wrapper exposing setup-docker as a command.
home-manager/services/docker/default.nix Refactors inline unit/script to external files with replaceVars.
home-manager/services/docker-postgres/start-postgres-wrapper.sh New external wrapper script (used by HM docker-postgres).
home-manager/services/docker-postgres/default.nix Refactors wrapper from inline to external file with replaceVars.
home-manager/services/cliproxyapi/scripts/docker-start.sh New external docker wrapper script for cliproxyapi.
home-manager/services/cliproxyapi/default.nix Refactors docker wrapper from inline to external file with replaceVars.
home-manager/programs/tmux/default.nix Sorts tmux plugins.
home-manager/programs/php/default.nix Sorts home.packages.
home-manager/modules/yek/yek-shim.sh New shim delegating to the Nix-store yek wrapper.
home-manager/modules/yek/install-yek-shim.sh New shim delegating to the Nix-store install-yek script.
home-manager/modules/yek/default.nix Refactors inline shim scripts into external files with replaceVars.
devenv.nix Adds statix and refactors fishtape wrapper to be loaded from an external file.
Makefile Adds python and nix-inline-check targets and wires them into make test.
.github/workflows/python.yml Adds CI for Python tests + ruff lint/format checks.

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

You can also share your feedback on Copilot code review. Take the survey.

DOCKER_SERVICE_FILE=@docker_service_file@

# Check if docker group exists and user is in it
if ! "$GROUPS_CMD" | "$GREP" -q docker; then
Comment thread Makefile Outdated
Comment on lines 195 to 196
test: neovim-test nix-test shell-test python-test nix-inline-check ## Run all tests (neovim + nix + shell + python + nix-inline-check).

Comment thread devenv.nix
Comment on lines 4 to 22
packages = [
pkgs.nodejs
pkgs.bun
pkgs.neovim
pkgs.shellcheck
pkgs.shellspec
pkgs.gnumake
pkgs.gcc
pkgs.fish
(pkgs.writeShellScriptBin "fishtape" ''
exec ${pkgs.fish}/bin/fish \
-C "source ${pkgs.fishPlugins.fishtape_3.src}/functions/fishtape.fish" \
-c 'fishtape $argv' \
-- "$@"
'')
pkgs.statix
(pkgs.writeShellScriptBin "fishtape" (
builtins.readFile (
pkgs.replaceVars ./scripts/fishtape-wrapper.sh {
fish = pkgs.fish;
fishtape_3_src = pkgs.fishPlugins.fishtape_3.src;
}
)
))
];
Comment on lines +44 to +48
pw = sys.stdin.read().rstrip("\n")
result = unlock(pw)
codes = {0: "OK", 1: "DENIED", 2: "FAILED", 3: "NO_DAEMON"}
print(f"gnome-keyring unlock: {codes.get(result, result)}", flush=True)
sys.exit(0 if result == 0 else 1)

violations=$(grep -rn \
--include='*.nix' \
-E 'write(Shell)?(Script|ScriptBin)[[:space:]]+"[^"]+"+[[:space:]]+'"''" \

@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.

8 issues found across 38 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="spec/check_nix_inline_scripts_spec.sh">

<violation number="1" location="spec/check_nix_inline_scripts_spec.sh:21">
P2: This assertion is too broad to validate the detector: it also matches the script's comment, so the test can pass even if the real `write*Script*` grep pattern breaks.</violation>
</file>

<file name="spec/yek_shim_spec.sh">

<violation number="1" location="spec/yek_shim_spec.sh:26">
P2: This assertion is too broad: it matches the placeholder in the shim's comment, so the test can pass even if the `exec` line no longer uses `@bash@`/`@yek_wrapper_script@`. Match the actual `exec` command instead of any occurrence in the file.</violation>
</file>

<file name="named-hosts/matic/falcon.nix">

<violation number="1" location="named-hosts/matic/falcon.nix:16">
P2: Avoid `builtins.readFile` on `pkgs.replaceVars` here; it turns this script extraction into import-from-derivation during evaluation, which adds avoidable eval-time realisation and can fail where IFD is disabled.</violation>
</file>

<file name="spec/start_postgres_wrapper_spec.sh">

<violation number="1" location="spec/start_postgres_wrapper_spec.sh:38">
P2: This test only greps for implementation strings, so it won't fail when the wrapper's docker-access fallback logic is broken. Exercise the script with mocked `docker`/`sg` commands instead of asserting on source text.</violation>
</file>

<file name="spec/pam_gnome_keyring_tpm_unlock_spec.sh">

<violation number="1" location="spec/pam_gnome_keyring_tpm_unlock_spec.sh:74">
P2: Use an exact count assertion here; `include '1'` also passes for counts like `10` and `11`.</violation>
</file>

<file name="spec/docker_setup_spec.sh">

<violation number="1" location="spec/docker_setup_spec.sh:53">
P2: These grep-based checks are too weak to validate the Docker setup behavior; they only prove that certain words exist in the script, so regressions can slip through while the tests still pass.</violation>
</file>

<file name="scripts/check-nix-inline-scripts.sh">

<violation number="1" location="scripts/check-nix-inline-scripts.sh:14">
P2: The grep only detects inline scripts when the name argument is a quoted literal, so inline `write*Script*` calls with interpolated or variable names will slip through.</violation>
</file>

<file name="home-manager/services/docker-postgres/start-postgres-wrapper.sh">

<violation number="1" location="home-manager/services/docker-postgres/start-postgres-wrapper.sh:9">
P2: `docker info` is treating "daemon still starting" as "permission denied", so the wrapper can exit early instead of letting `start-postgres.sh` wait for Docker to come up.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


Describe 'detection pattern'
It 'searches for writeScript patterns'
When run bash -c "grep 'write.*Script' '$SCRIPT'"

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: This assertion is too broad to validate the detector: it also matches the script's comment, so the test can pass even if the real write*Script* grep pattern breaks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/check_nix_inline_scripts_spec.sh, line 21:

<comment>This assertion is too broad to validate the detector: it also matches the script's comment, so the test can pass even if the real `write*Script*` grep pattern breaks.</comment>

<file context>
@@ -0,0 +1,36 @@
+
+Describe 'detection pattern'
+It 'searches for writeScript patterns'
+When run bash -c "grep 'write.*Script' '$SCRIPT'"
+The output should include 'write'
+End
</file context>
Fix with Cubic

Comment thread spec/yek_shim_spec.sh
End

It 'references @bash@'
When run bash -c "grep '@bash@' '$SCRIPT'"

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: This assertion is too broad: it matches the placeholder in the shim's comment, so the test can pass even if the exec line no longer uses @bash@/@yek_wrapper_script@. Match the actual exec command instead of any occurrence in the file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/yek_shim_spec.sh, line 26:

<comment>This assertion is too broad: it matches the placeholder in the shim's comment, so the test can pass even if the `exec` line no longer uses `@bash@`/`@yek_wrapper_script@`. Match the actual `exec` command instead of any occurrence in the file.</comment>

<file context>
@@ -0,0 +1,41 @@
+End
+
+It 'references @bash@'
+When run bash -c "grep '@bash@' '$SCRIPT'"
+The output should include '@bash@'
+End
</file context>
Fix with Cubic

# sanity print
${falcon}/bin/fs-bash -c "/opt/CrowdStrike/falconctl -g --cid"
'';
initScript = pkgs.writeScript "init-falcon" (

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: Avoid builtins.readFile on pkgs.replaceVars here; it turns this script extraction into import-from-derivation during evaluation, which adds avoidable eval-time realisation and can fail where IFD is disabled.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At named-hosts/matic/falcon.nix, line 16:

<comment>Avoid `builtins.readFile` on `pkgs.replaceVars` here; it turns this script extraction into import-from-derivation during evaluation, which adds avoidable eval-time realisation and can fail where IFD is disabled.</comment>

<file context>
@@ -13,37 +13,15 @@
-    # sanity print
-    ${falcon}/bin/fs-bash -c "/opt/CrowdStrike/falconctl -g --cid"
-  '';
+  initScript = pkgs.writeScript "init-falcon" (
+    builtins.readFile (
+      pkgs.replaceVars ./falcon-init.sh {
</file context>
Fix with Cubic


Describe 'docker access strategy'
It 'tries docker directly first'
When run bash -c "grep 'docker info' '$SCRIPT'"

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: This test only greps for implementation strings, so it won't fail when the wrapper's docker-access fallback logic is broken. Exercise the script with mocked docker/sg commands instead of asserting on source text.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/start_postgres_wrapper_spec.sh, line 38:

<comment>This test only greps for implementation strings, so it won't fail when the wrapper's docker-access fallback logic is broken. Exercise the script with mocked `docker`/`sg` commands instead of asserting on source text.</comment>

<file context>
@@ -0,0 +1,58 @@
+
+Describe 'docker access strategy'
+It 'tries docker directly first'
+When run bash -c "grep 'docker info' '$SCRIPT'"
+The output should include 'docker info'
+End
</file context>
Fix with Cubic


It 'runs unlock in background subshell'
When run bash -c "grep -c ') &' '$SCRIPT'"
The output should include '1'

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: Use an exact count assertion here; include '1' also passes for counts like 10 and 11.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/pam_gnome_keyring_tpm_unlock_spec.sh, line 74:

<comment>Use an exact count assertion here; `include '1'` also passes for counts like `10` and `11`.</comment>

<file context>
@@ -0,0 +1,83 @@
+
+It 'runs unlock in background subshell'
+When run bash -c "grep -c ') &' '$SCRIPT'"
+The output should include '1'
+End
+
</file context>
Fix with Cubic

Comment thread spec/docker_setup_spec.sh
@@ -0,0 +1,80 @@
#!/usr/bin/env bash

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: These grep-based checks are too weak to validate the Docker setup behavior; they only prove that certain words exist in the script, so regressions can slip through while the tests still pass.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At spec/docker_setup_spec.sh, line 53:

<comment>These grep-based checks are too weak to validate the Docker setup behavior; they only prove that certain words exist in the script, so regressions can slip through while the tests still pass.</comment>

<file context>
@@ -0,0 +1,80 @@
+
+Describe 'docker group management'
+It 'checks group membership'
+When run bash -c "grep 'docker group' '$SCRIPT'"
+The output should include 'docker group'
+End
</file context>
Fix with Cubic


violations=$(grep -rn \
--include='*.nix' \
-E 'write(Shell)?(Script|ScriptBin)[[:space:]]+"[^"]+"+[[:space:]]+'"''" \

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: The grep only detects inline scripts when the name argument is a quoted literal, so inline write*Script* calls with interpolated or variable names will slip through.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/check-nix-inline-scripts.sh, line 14:

<comment>The grep only detects inline scripts when the name argument is a quoted literal, so inline `write*Script*` calls with interpolated or variable names will slip through.</comment>

<file context>
@@ -0,0 +1,30 @@
+
+violations=$(grep -rn \
+  --include='*.nix' \
+  -E 'write(Shell)?(Script|ScriptBin)[[:space:]]+"[^"]+"+[[:space:]]+'"''" \
+  "$ROOT" \
+  --exclude-dir='.git' \
</file context>
Fix with Cubic

SCRIPT="@bash@/bin/bash @start_script@"

# Try docker directly first (works on NixOS or when user has docker group)
if @docker@/bin/docker info >/dev/null 2>&1; then

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: docker info is treating "daemon still starting" as "permission denied", so the wrapper can exit early instead of letting start-postgres.sh wait for Docker to come up.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At home-manager/services/docker-postgres/start-postgres-wrapper.sh, line 9:

<comment>`docker info` is treating "daemon still starting" as "permission denied", so the wrapper can exit early instead of letting `start-postgres.sh` wait for Docker to come up.</comment>

<file context>
@@ -0,0 +1,21 @@
+SCRIPT="@bash@/bin/bash @start_script@"
+
+# Try docker directly first (works on NixOS or when user has docker group)
+if @docker@/bin/docker info >/dev/null 2>&1; then
+  exec $SCRIPT
+fi
</file context>
Fix with Cubic

@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: 3

🧹 Nitpick comments (3)
home-manager/services/docker-postgres/start-postgres-wrapper.sh (1)

1-21: Consider extracting the shared Docker fallback logic.

This script is nearly identical to home-manager/services/cliproxyapi/scripts/docker-start.sh. Both implement the same Docker access fallback pattern (direct → NixOS sg → system sg → error).

Consider extracting this common logic into a shared wrapper template that both services can use, parameterized only by @start_script@. This would reduce maintenance burden and ensure consistent behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/services/docker-postgres/start-postgres-wrapper.sh` around lines
1 - 21, The Docker-access fallback logic is duplicated (see SCRIPT, the
`@start_script`@ substitution and the direct → NixOS sg → system sg → error flow)
and should be extracted into a shared wrapper template used by both
start-postgres-wrapper.sh and docker-start.sh; create a single reusable
script/template that accepts the start script path (parameterize `@start_script`@)
and performs the same checks (try `@docker@/bin/docker info`, then
`/run/wrappers/bin/sg docker -c`, then `/usr/bin/sg docker -c`, else error) and
update both callers to invoke that shared wrapper instead of duplicating the
logic.
scripts/check-nix-inline-scripts.sh (1)

12-20: Regex may miss multi-line patterns.

The detection regex requires '' to be on the same line as the function call. Patterns like:

writeShellScript "name"
  ''
  content
  ''

would not be detected. This is likely acceptable as a best-effort check, but consider documenting this limitation or using a multi-line grep approach with -z flag if stricter enforcement is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/check-nix-inline-scripts.sh` around lines 12 - 20, The current grep
regex in check-nix-inline-scripts.sh (searching for
write(Shell)?(Script|ScriptBin)...) only matches when the Nix literal delimiter
'' appears on the same line and will miss multi-line usages; either document
this limitation in the script header/README or switch to a multi-line search
using grep -z and a PCRE pattern (e.g., use grep -z -P to allow matching across
newlines and a pattern like
write(Shell)?(Script|ScriptBin)\s*"[^"]+"\s*''.*?''), updating the violations
variable construction and tests accordingly so multi-line
writeShellScript/writeScript/writeScriptBin invocations are detected.
spec/pam_gnome_keyring_tpm_unlock_spec.sh (1)

13-16: Minor inconsistency in placeholder replacement.

This spec uses true as the placeholder replacement value (Line 14), while other specs like spec/docker_setup_spec.sh use /usr. Both work for syntax validation, but using /usr consistently across all specs would improve maintainability.

Not a blocking issue since true is a valid command/path for syntax checking purposes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@spec/pam_gnome_keyring_tpm_unlock_spec.sh` around lines 13 - 16, Update the
placeholder replacement in the spec that tests syntax after stripping
placeholders: in the example under "It 'passes bash syntax check after stripping
placeholders'" change the sed replacement value from "true" to "/usr" so the
command using bash -c "sed 's|@[a-z_]*@|true|g' '$SCRIPT' | bash -n" becomes
consistent with other specs (use '/usr' as the replacement for @[a-z_]*@ applied
to $SCRIPT).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@home-manager/programs/tmux/default.nix`:
- Around line 11-21: The tmux plugin load order is incorrect: move
tmux-resurrect to be listed before tmux-continuum and place tmux-continuum at or
near the end of the plugins array so resurrect is available when continuum
initializes and continuum's status-bar modifications are not overwritten; update
the plugins list (the array assigned to plugins using pkgs.tmuxPlugins that
currently contains continuum, resurrect, etc.) to ensure resurrect appears
before continuum and continuum is last (or near-last).

In `@home-manager/services/docker/setup-docker.sh`:
- Around line 16-20: The group membership check can match substrings (e.g.,
"dockerroot"); update the conditional that uses GROUPS_CMD and GREP so it
matches the exact group name "docker" (for example, pipe GROUPS_CMD output
through tr ' ' '\n' and use GREP -x -q docker, or use GREP -w/-x with an
anchored pattern) so the block that calls USERMOD -aG docker on USER only runs
when the exact "docker" group is absent; update the line that currently reads:
if ! "$GROUPS_CMD" | "$GREP" -q docker; then accordingly.
- Around line 25-31: The current check only tests for the presence of
/etc/systemd/system/docker.service and may overwrite or shadow a vendor-supplied
unit; update setup-docker.sh to query systemd for the actual installed unit
(e.g., use systemctl show -p FragmentPath docker.service) and only write
/etc/systemd/system/docker.service (using TEE and DOCKER_SERVICE_FILE, then
SYSTEMCTL daemon-reload/enable) when there is no existing fragment path or when
FragmentPath is empty/indicates no installed unit; if FragmentPath points to a
vendor/path, skip creating the override so you don't shadow the packaged unit.

---

Nitpick comments:
In `@home-manager/services/docker-postgres/start-postgres-wrapper.sh`:
- Around line 1-21: The Docker-access fallback logic is duplicated (see SCRIPT,
the `@start_script`@ substitution and the direct → NixOS sg → system sg → error
flow) and should be extracted into a shared wrapper template used by both
start-postgres-wrapper.sh and docker-start.sh; create a single reusable
script/template that accepts the start script path (parameterize `@start_script`@)
and performs the same checks (try `@docker@/bin/docker info`, then
`/run/wrappers/bin/sg docker -c`, then `/usr/bin/sg docker -c`, else error) and
update both callers to invoke that shared wrapper instead of duplicating the
logic.

In `@scripts/check-nix-inline-scripts.sh`:
- Around line 12-20: The current grep regex in check-nix-inline-scripts.sh
(searching for write(Shell)?(Script|ScriptBin)...) only matches when the Nix
literal delimiter '' appears on the same line and will miss multi-line usages;
either document this limitation in the script header/README or switch to a
multi-line search using grep -z and a PCRE pattern (e.g., use grep -z -P to
allow matching across newlines and a pattern like
write(Shell)?(Script|ScriptBin)\s*"[^"]+"\s*''.*?''), updating the violations
variable construction and tests accordingly so multi-line
writeShellScript/writeScript/writeScriptBin invocations are detected.

In `@spec/pam_gnome_keyring_tpm_unlock_spec.sh`:
- Around line 13-16: Update the placeholder replacement in the spec that tests
syntax after stripping placeholders: in the example under "It 'passes bash
syntax check after stripping placeholders'" change the sed replacement value
from "true" to "/usr" so the command using bash -c "sed 's|@[a-z_]*@|true|g'
'$SCRIPT' | bash -n" becomes consistent with other specs (use '/usr' as the
replacement for @[a-z_]*@ applied to $SCRIPT).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f244a4a7-cbe4-4efc-a355-f8647eb8924e

📥 Commits

Reviewing files that changed from the base of the PR and between bb6b421 and 0976ab1.

📒 Files selected for processing (38)
  • .github/workflows/python.yml
  • Makefile
  • devenv.nix
  • home-manager/modules/yek/default.nix
  • home-manager/modules/yek/install-yek-shim.sh
  • home-manager/modules/yek/yek-shim.sh
  • home-manager/programs/php/default.nix
  • home-manager/programs/tmux/default.nix
  • home-manager/services/cliproxyapi/default.nix
  • home-manager/services/cliproxyapi/scripts/docker-start.sh
  • home-manager/services/docker-postgres/default.nix
  • home-manager/services/docker-postgres/start-postgres-wrapper.sh
  • home-manager/services/docker/default.nix
  • home-manager/services/docker/docker-setup.sh
  • home-manager/services/docker/docker.service
  • home-manager/services/docker/setup-docker.sh
  • named-hosts/matic/default.nix
  • named-hosts/matic/falcon-init.sh
  • named-hosts/matic/falcon.nix
  • named-hosts/matic/falcon/default.nix
  • named-hosts/matic/pam-gnome-keyring-tpm-unlock.sh
  • named-hosts/matic/unlock-gnome-keyring.py
  • pyproject.toml
  • scripts/check-nix-inline-scripts.sh
  • scripts/fishtape-wrapper.sh
  • spec/check_nix_inline_scripts_spec.sh
  • spec/cliproxyapi_docker_start_spec.sh
  • spec/coverage_spec.sh
  • spec/docker_setup_spec.sh
  • spec/docker_setup_wrapper_spec.sh
  • spec/falcon_init_spec.sh
  • spec/fishtape_wrapper_spec.sh
  • spec/install_yek_shim_spec.sh
  • spec/pam_gnome_keyring_tpm_unlock_spec.sh
  • spec/start_postgres_wrapper_spec.sh
  • spec/unlock_gnome_keyring_spec.sh
  • spec/yek_shim_spec.sh
  • tests/test_unlock_gnome_keyring.py

Comment on lines 11 to 21
plugins = with pkgs.tmuxPlugins; [
continuum
extrakto
open
resurrect
sensible
yank
tmux-fzf
resurrect
continuum
tmux-sessionx
tmux-thumbs
open
extrakto
yank
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check tmux plugin dependencies and home-manager implementation

# Check home-manager's tmux module implementation for plugin ordering behavior
rg -n -C5 'tmux.*plugins' --type=nix --glob='**/modules/programs/tmux*'

# Check if continuum has explicit resurrect dependency
fd -e nix -e txt -e md 'continuum|resurrect' --exec rg -l 'continuum.*resurrect|resurrect.*continuum' {}

# Look for any plugin ordering documentation or comments
rg -n 'plugin.*order|load.*order|before.*after' --type=nix --glob='**/tmux*'

Repository: shunkakinoki/dotfiles

Length of output: 213


🏁 Script executed:

#!/bin/bash
# Check repository structure and locate the tmux configuration file
echo "=== Checking for tmux-related files ==="
find . -name "*tmux*" -type f | head -20

echo -e "\n=== Checking if home-manager directory exists ==="
ls -la home-manager/ 2>/dev/null || echo "home-manager not at root"

echo -e "\n=== Finding tmux configuration files ==="
fd -e nix . | rg -i tmux

Repository: shunkakinoki/dotfiles

Length of output: 762


🏁 Script executed:

#!/bin/bash
# Read the actual tmux configuration file mentioned in the review
cat -n home-manager/programs/tmux/default.nix 2>/dev/null || echo "File not found at specified path"

Repository: shunkakinoki/dotfiles

Length of output: 632


🌐 Web query:

home-manager tmux plugin loading order dependencies

💡 Result:

In Home Manager's programs.tmux module, the generated ~/.config/tmux/tmux.conf has a specific structure for plugin loading and dependencies. Structure (order in tmux.conf): 1. Module defaults (e.g., set -g escape-time 500, default-terminal "screen", etc.) using lib.mkBefore. 2. Plugins section: For each plugin in programs.tmux.plugins (in list order): - Optional plugin.extraConfig (must be before run-shell for plugin vars to be available). - run-shell ${plugin.rtp} (loads the plugin script). 3. Global extraConfig using lib.mkAfter (after plugins). Plugin loading order is the order in the plugins list. Order matters for dependencies: plugins that modify shared elements like status-right must come before dependent plugins (e.g., theme before resurrect/continuum). Use plugin.extraConfig for per-plugin config before its run-shell. To place config before all plugins, users can override with xdg.configFile."tmux/tmux.conf".text = lib.mkOrder 600 "..."; (between defaults priority 500 and plugins 1000). extraConfig after plugins can reference plugin variables but cannot affect pre-plugin-run settings. No built-in extraConfigBeforePlugins (proposed PRs #3801, #4670, #6486 open/stale as of 2025). Workarounds for dependencies: - Put theme/config in plugin.extraConfig. - Order plugins carefully (e.g., sensible on top via sensibleOnTop=true). - Custom tmux.conf override for full control. Examples: plugins = with pkgs.tmuxPlugins; [ { plugin = catppuccin; extraConfig = "set -g @catppuccin_flavour 'frappe'"; } resurrect # depends on prior status-right setup ];

Citations:


🏁 Script executed:

#!/bin/bash
# Check NixPkgs definition of tmux plugins to understand dependencies
echo "=== Searching for continuum and resurrect plugin definitions ==="
rg -A10 -B2 "continuum|resurrect" --type nix | head -100

echo -e "\n=== Check for any plugin dependency information ==="
rg "depends|require" --type nix | rg -i "continuum|resurrect"

Repository: shunkakinoki/dotfiles

Length of output: 967


🌐 Web query:

tmux-continuum depends on tmux-resurrect plugin loading order

💡 Result:

Yes, tmux-continuum depends on tmux-resurrect and requires specific attention to plugin loading order when using Tmux Plugin Manager (TPM). tmux-continuum is built on top of tmux-resurrect: it automates saving and restoring tmux environments by calling resurrect's functionality. The official tmux-continuum README explicitly states "Please make sure you have tmux-resurrect installed" before adding continuum, and all installation examples list resurrect first: set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' While TPM loads plugins in the order listed in .tmux.conf, continuum modifies the status-right (or status-left) to insert its periodic save hook (continuum_save.sh). If another plugin loaded after continuum overwrites status-right (common with themes), continuum's autosave stops working. The official docs recommend: "To fix this issue, place the plugin last in the TPM plugins list." Resurrect has no such status modifications, so the standard order (resurrect before continuum, continuum last or near-last) ensures: - Continuum can call resurrect functions (loaded earlier). - No later plugins break continuum's status hook. User reports confirm issues when continuum is not positioned correctly relative to status-altering plugins, but no explicit "continuum requires resurrect before it" beyond dependency and examples. Continuum restore calls also assume resurrect is available at runtime. Example working .tmux.conf snippet: set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # or other non-status plugins set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' # last, before run tpm set -g @continuum-restore 'on' run '~/.tmux/plugins/tpm/tpm' Press prefix+I to install.

Citations:


🌐 Web query:

tmux continuum plugin how it works resurrect dependency

💡 Result:

The tmux-continuum plugin provides continuous saving of the tmux environment every 15 minutes (configurable) in the background, automatic restoration of the last saved environment upon tmux server start (if enabled with set -g @continuum-restore 'on'), and optional automatic tmux startup after computer boot (if enabled with set -g @continuum-boot 'on'). It requires the tmux-resurrect plugin as a dependency, which handles the actual saving and restoring of tmux sessions, windows, panes, and running programs (manual save/restore via prefix + Ctrl-s / Ctrl-r). Continuum automates resurrect's functionality for seamless persistence across restarts. Installation via Tmux Plugin Manager: add set -g @plugin 'tmux-plugins/tmux-resurrect' and set -g @plugin 'tmux-plugins/tmux-continuum' to .tmux.conf, then prefix + I. Requires tmux 1.9+ and bash. Last updated 2024.

Citations:


Plugin load order breaks tmux-continuum functionality—resurrect must come before continuum, and continuum should be positioned near the end of the list.

The alphabetical reordering introduces a critical issue. The tmux-continuum plugin depends on tmux-resurrect and requires it to be loaded first. According to the official tmux-continuum documentation, continuum automates resurrect's save/restore functionality and will not work correctly if resurrect is not available at runtime. Additionally, continuum modifies the tmux status bar to insert its autosave hook; if status-altering plugins (like themes) load after continuum, they can overwrite this hook, breaking the automatic save feature.

The current order places continuum (line 12) before resurrect (line 15), and continuum is not positioned near the end of the list. This will break tmux session persistence. The correct ordering should be: resurrect before continuum, and continuum positioned last (or near-last) to prevent other plugins from overwriting its status modifications.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/programs/tmux/default.nix` around lines 11 - 21, The tmux plugin
load order is incorrect: move tmux-resurrect to be listed before tmux-continuum
and place tmux-continuum at or near the end of the plugins array so resurrect is
available when continuum initializes and continuum's status-bar modifications
are not overwritten; update the plugins list (the array assigned to plugins
using pkgs.tmuxPlugins that currently contains continuum, resurrect, etc.) to
ensure resurrect appears before continuum and continuum is last (or near-last).

Comment on lines +16 to +20
if ! "$GROUPS_CMD" | "$GREP" -q docker; then
echo "Adding user to docker group..."
sudo "$USERMOD" -aG docker "$USER"
echo "Added to docker group. Please log out and back in, or run: newgrp docker"
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use exact group-name matching for membership checks.

Line 16 uses grep -q docker, which can match partial names (e.g., dockerroot). This can skip required group enrollment.

Proposed fix
-if ! "$GROUPS_CMD" | "$GREP" -q docker; then
+if ! "$GROUPS_CMD" | "$GREP" -qw 'docker'; then
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if ! "$GROUPS_CMD" | "$GREP" -q docker; then
echo "Adding user to docker group..."
sudo "$USERMOD" -aG docker "$USER"
echo "Added to docker group. Please log out and back in, or run: newgrp docker"
fi
if ! "$GROUPS_CMD" | "$GREP" -qw 'docker'; then
echo "Adding user to docker group..."
sudo "$USERMOD" -aG docker "$USER"
echo "Added to docker group. Please log out and back in, or run: newgrp docker"
fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/services/docker/setup-docker.sh` around lines 16 - 20, The group
membership check can match substrings (e.g., "dockerroot"); update the
conditional that uses GROUPS_CMD and GREP so it matches the exact group name
"docker" (for example, pipe GROUPS_CMD output through tr ' ' '\n' and use GREP
-x -q docker, or use GREP -w/-x with an anchored pattern) so the block that
calls USERMOD -aG docker on USER only runs when the exact "docker" group is
absent; update the line that currently reads: if ! "$GROUPS_CMD" | "$GREP" -q
docker; then accordingly.

Comment on lines +25 to +31
if [ ! -f /etc/systemd/system/docker.service ]; then
echo "Installing Docker systemd service..."
# shellcheck disable=SC2024
sudo "$TEE" /etc/systemd/system/docker.service >/dev/null <"$DOCKER_SERVICE_FILE"
sudo "$SYSTEMCTL" daemon-reload
sudo "$SYSTEMCTL" enable docker
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Service-unit detection is too narrow and can incorrectly install an override.

Lines 25-31 only check /etc/systemd/system/docker.service. If Docker is already provided in another systemd unit path (e.g., vendor unit), this still installs a new /etc unit and may unintentionally shadow the packaged one.

Proposed fix
-  if [ ! -f /etc/systemd/system/docker.service ]; then
+  if ! "$SYSTEMCTL" cat docker >/dev/null 2>&1; then
     echo "Installing Docker systemd service..."
     # shellcheck disable=SC2024
     sudo "$TEE" /etc/systemd/system/docker.service >/dev/null <"$DOCKER_SERVICE_FILE"
     sudo "$SYSTEMCTL" daemon-reload
     sudo "$SYSTEMCTL" enable docker
   fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/services/docker/setup-docker.sh` around lines 25 - 31, The
current check only tests for the presence of /etc/systemd/system/docker.service
and may overwrite or shadow a vendor-supplied unit; update setup-docker.sh to
query systemd for the actual installed unit (e.g., use systemctl show -p
FragmentPath docker.service) and only write /etc/systemd/system/docker.service
(using TEE and DOCKER_SERVICE_FILE, then SYSTEMCTL daemon-reload/enable) when
there is no existing fragment path or when FragmentPath is empty/indicates no
installed unit; if FragmentPath points to a vendor/path, skip creating the
override so you don't shadow the packaged unit.

Sort package/plugin lists in tmux plugins, nix-ld libraries,
falcon buildInputs, and php packages for consistency.
@shunkakinoki
shunkakinoki force-pushed the chore/sort-nix-package-lists branch from 0976ab1 to 2c3d646 Compare March 19, 2026 13:03
@shunkakinoki
shunkakinoki merged commit d92e821 into main Mar 19, 2026
25 checks passed
@shunkakinoki
shunkakinoki deleted the chore/sort-nix-package-lists branch March 19, 2026 13:04
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