Skip to content

fix(make-updater): restore nix build evaluation - #1215

Merged
shunkakinoki merged 1 commit into
mainfrom
fix/make-build-make-updater-home-dir
Mar 19, 2026
Merged

fix(make-updater): restore nix build evaluation#1215
shunkakinoki merged 1 commit into
mainfrom
fix/make-build-make-updater-home-dir

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Restore make build after the recent make-updater regression.

The service module started reading config.home.homeDirectory during evaluation. In the NixOS plus Home Manager path used by make build, that attribute is not available at that point, so evaluation fails before the system configuration can build.

This switches RUSTUP_HOME and CARGO_HOME to systemd %h runtime expansion and removes the now-unused config wiring from the parent service import. I considered recomputing the path from the username again, but %h keeps the module runtime-scoped and avoids reintroducing evaluation-time coupling.

Verified by rerunning make build.


Summary by cubic

Fixes make build evaluation errors by removing eval-time use of config.home.homeDirectory in the make-updater service. Uses systemd %h for RUSTUP_HOME and CARGO_HOME and stops passing config into the module import.

  • Bug Fixes
    • Removed config from make-updater import to avoid reading config.home.homeDirectory during evaluation.
    • Set RUSTUP_HOME and CARGO_HOME to %h/... so paths resolve at runtime; make build works again.

Written for commit 40a4e09. Summary will update on new commits.

@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: 16e51dce-f807-4a67-9bec-fe52c2f77b2d

📥 Commits

Reviewing files that changed from the base of the PR and between 41ece98 and 40a4e09.

📒 Files selected for processing (2)
  • home-manager/services/default.nix
  • home-manager/services/make-updater/default.nix

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Simplified the updater service module configuration by removing unused dependencies and updating home directory references to use standard environment variable placeholders instead of absolute paths. This improves configuration portability and maintainability.

Walkthrough

Removed the config argument from the make-updater module import and updated the module signature to depend only on pkgs. Environment variables RUSTUP_HOME and CARGO_HOME now use the %h home directory placeholder instead of deriving the path from config.home.homeDirectory.

Changes

Cohort / File(s) Summary
Module Import
home-manager/services/default.nix
Removed config argument from ./make-updater import, passing only pkgs.
Module Definition
home-manager/services/make-updater/default.nix
Removed config parameter from module signature and homeDir binding. Updated RUSTUP_HOME and CARGO_HOME environment variables to use %h placeholder instead of absolute path derivation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #1212: Directly modifies the same import statement in home-manager/services/default.nix, affecting the config argument passing to ./make-updater.
  • PR #710: Updates environment variable configuration in home-manager/services/make-updater/default.nix by adjusting systemd PATH construction.

Suggested labels

bug

Poem

🐰 Config's gone, simplicity prevails,
No homeDir dance, just %h in our tales,
One less parameter to pass around,
Cleaner paths where home is found! 🏠

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/make-build-make-updater-home-dir
📝 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 addresses a critical regression that prevented make build from functioning correctly in NixOS and Home Manager environments. The issue stemmed from the make-updater service attempting to read config.home.homeDirectory during evaluation, which is not available at that stage. The fix involves refactoring the make-updater module to remove its dependency on the global config object and instead utilizes systemd's %h variable for dynamic home directory resolution, ensuring proper evaluation and restoring build capabilities.

Highlights

  • Build Regression Fix: Resolved a regression in the make build process where the make-updater service was attempting to read config.home.homeDirectory during evaluation, causing failures in NixOS and Home Manager environments.
  • Decoupling Configuration: Decoupled the make-updater service from the main configuration by removing the config parameter from its import and definition, preventing evaluation-time coupling.
  • Dynamic Home Directory Resolution: Switched the RUSTUP_HOME and CARGO_HOME environment variables within the make-updater service to use systemd's %h runtime expansion for the home directory, ensuring paths are resolved dynamically at runtime.
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

Fix make build failures by decoupling the make-updater service from config.home.homeDirectory during NixOS evaluation.

What changed?

  • home-manager/services/default.nix: Refactored the makeUpdater module import to only inherit pkgs, removing the config variable inheritance.
  • home-manager/services/make-updater/default.nix: Simplified the make-updater service definition by removing config and homeDir arguments. RUSTUP_HOME and CARGO_HOME environment variables now use the systemd %h shortcut for the home directory.

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki marked this pull request as ready for review March 19, 2026 18:57
Copilot AI review requested due to automatic review settings March 19, 2026 18:57
@shunkakinoki
shunkakinoki merged commit 72ca381 into main Mar 19, 2026
24 of 29 checks passed
@shunkakinoki
shunkakinoki deleted the fix/make-build-make-updater-home-dir branch March 19, 2026 18:57
@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.

@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 addresses a Nix build evaluation failure in the make-updater service. The fix involves removing the evaluation-time dependency on config.home.homeDirectory by using systemd's %h runtime specifier for RUSTUP_HOME and CARGO_HOME. The associated config dependency is also correctly removed from the module's imports and definition. The changes are logical and effectively resolve the described regression.

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

No issues found across 2 files

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

Restores make build evaluation for the make-updater Home Manager service by removing evaluation-time dependence on config.home.homeDirectory and switching to systemd runtime home expansion.

Changes:

  • Remove config/homeDir usage from make-updater module evaluation.
  • Use systemd %h specifier for RUSTUP_HOME and CARGO_HOME in the Linux user service environment.
  • Simplify the parent services import to stop passing config into make-updater.

Reviewed changes

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

File Description
home-manager/services/make-updater/default.nix Drops evaluation-time homeDirectory lookup; uses %h in systemd env to keep paths runtime-resolved.
home-manager/services/default.nix Stops wiring config into the make-updater import since it’s no longer needed.

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

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