Skip to content

feat: add node program configuration - #684

Merged
shunkakinoki merged 1 commit into
mainfrom
feat/node-program
Jan 29, 2026
Merged

feat: add node program configuration#684
shunkakinoki merged 1 commit into
mainfrom
feat/node-program

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jan 29, 2026

Copy link
Copy Markdown
Owner

Changes

  • Added node program configuration to home-manager
  • Created new module at home-manager/programs/node/default.nix

Technical Details

  • Node.js package added to home.packages
  • Module imported in home-manager/programs/default.nix

Testing

  • Configuration builds successfully with make build

Generated with Claude Code by claude-opencode


Note

Low Risk
Low risk Home Manager configuration change that only adds a new node module to install Node.js. Main risk is misconfiguration (the module is imported but not included in the exported module list, so it may not take effect).

Overview
Adds a new home-manager/programs/node module that installs the node package via home.packages.

Updates home-manager/programs/default.nix to import the new node module (note: it is imported but not added to the returned module list).

Written by Cursor Bugbot for commit 96e627d. Configure here.


Summary by cubic

Adds a Node.js program module to Home Manager so Node is installed via home.packages. The new module lives at home-manager/programs/node/default.nix and is imported in home-manager/programs/default.nix.

Written for commit 96e627d. Summary will update on new commits.

Copilot AI review requested due to automatic review settings January 29, 2026 00:27
@mesa-dot-dev

mesa-dot-dev Bot commented Jan 29, 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

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 integrates Node.js program configuration into the existing home-manager setup. It establishes a dedicated module for Node.js, ensuring that the necessary packages are included in the user's environment, thereby streamlining the management of Node.js development tools.

Highlights

  • Node.js Configuration: Introduced a new configuration for Node.js programs within the home-manager setup.
  • New Module Creation: A dedicated Nix module was created at home-manager/programs/node/default.nix to encapsulate the Node.js configuration.
  • Module Integration: The newly created Node.js module is now imported into the main home-manager/programs/default.nix file, making it available for use.
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.

@mesa-dot-dev

mesa-dot-dev Bot commented Jan 29, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Added Node.js program configuration to home-manager.

What changed?

  • Added Node.js program configuration to home-manager
  • Created new module at home-manager/programs/node/default.nix
  • Node.js package added to home.packages
  • Module imported in home-manager/programs/default.nix

Description generated by Mesa. Update settings

@coderabbitai

coderabbitai Bot commented Jan 29, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Node.js is now available as an installable package in home-manager. Users can easily add Node.js to their home environment configuration for consistent runtime installation and management. This enhancement simplifies development environment setup and ensures Node.js availability across multiple systems.

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

Walkthrough

Adds Node.js support to home-manager by introducing a new node module. The changes consist of exposing a node binding in the programs directory and defining a configuration module that installs Node.js into the user's home-manager environment.

Changes

Cohort / File(s) Summary
Node.js Module Integration
home-manager/programs/default.nix, home-manager/programs/node/default.nix
Introduces node module by importing ./node and exposing it in the exported package list. New node/default.nix module defines the home-manager configuration snippet that sets home.packages to include Node.js from pkgs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A little hop, a module so neat,
Node.js bundled, the feature's complete!
Through home-manager's garden we plant,
JavaScript runtime—the developer's chant! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add node program configuration' accurately describes the main change: adding a Node.js program configuration to home-manager.
Description check ✅ Passed The description clearly outlines the changes made, including the new node module, technical implementation details, and testing verification. It is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/node-program

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

The pull request successfully introduces a new Home Manager module for Node.js configuration. The new module home-manager/programs/node/default.nix correctly defines the node package to be installed. However, the newly imported node module in home-manager/programs/default.nix is not included in the final list of enabled programs, which means the configuration will not be applied.

lazygit = import ./lazygit;
lsd = import ./lsd;
neovim = import ./neovim;
node = import ./node;

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

The node module is correctly imported here. However, for the configuration to be applied, you also need to add node to the list of enabled programs in the in block further down in this file (around lines 37-65). Without this, the Node.js configuration will not be active.

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 adds a new Node.js program configuration module to home-manager, providing a simple way to install Node.js directly as a system package.

Changes:

  • Created a new node program module that adds Node.js to home.packages
  • Added the module import to the programs/default.nix file

Reviewed changes

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

File Description
home-manager/programs/node/default.nix New module that adds Node.js package to home.packages
home-manager/programs/default.nix Import statement for the new node module

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

{ pkgs, ... }:
{
home.packages = with pkgs; [
node

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

The package name "node" does not exist in nixpkgs. Node.js packages are named "nodejs_22", "nodejs_20", "nodejs_18", etc., or you can use "nodejs" for the default version. Consider using "nodejs" or a specific version like "nodejs_22" to match the versioning in the fnm module which uses versions 22 and 20.

Suggested change
node
nodejs

Copilot uses AI. Check for mistakes.
lazygit = import ./lazygit;
lsd = import ./lsd;
neovim = import ./neovim;
node = import ./node;

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

The node module is imported but not added to the list of modules returned by this file. All imported modules need to be included in the returned list (lines 37-65). The node module should be added to maintain consistency with other program modules.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
{ pkgs, ... }:
{
home.packages = with pkgs; [
node
];
}

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

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

This module may conflict with or be redundant to the existing fnm (Fast Node Manager) module at home-manager/programs/fnm/default.nix, which already manages Node.js installation through version management. Consider whether this module is needed, or if it should be used as an alternative to fnm for users who prefer a direct Node.js installation. If both modules are meant to coexist, add documentation explaining when to use each approach.

Copilot uses AI. Check for mistakes.

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

lazygit = import ./lazygit;
lsd = import ./lsd;
neovim = import ./neovim;
node = import ./node;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Node module imported but not included in returned list

High Severity

The node module is imported on line 26 but is not added to the returned list of modules at the end of the file. All other imported modules (like python, rust, go) are included in the returned list, but node is missing. This means the node configuration will never be loaded or applied, making the feature completely non-functional.

Fix in Cursor Fix in Web

{ pkgs, ... }:
{
home.packages = with pkgs; [
node

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong package name: node should be nodejs

High Severity

The package is specified as node but the correct nixpkgs package name for Node.js is nodejs. Using pkgs.node will fail to build because this package doesn't exist in nixpkgs. The package reference needs to be nodejs (or a versioned variant like nodejs_20).

Fix in Cursor Fix in Web

home.packages = with pkgs; [
node
];
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant Node.js module duplicates fnm functionality

Low Severity

The new node module adds Node.js directly via home.packages, but the existing fnm module already provides comprehensive Node.js management. The fnm module pre-installs Node.js versions 22 and 20, sets up version switching, and creates symlinks. Having both modules enabled would result in redundant installations and potential confusion about which Node.js is being used.

Fix in Cursor Fix in Web

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

Caution

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

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

55-57: Node module imported but not exported.

The node module is imported at line 26 but is missing from the exported array. This means Node.js will not be installed—the import is dead code.

🐛 Proposed fix: Add `node` to the exported list (alphabetically between `neovim` and `python`)
   neovim
+  node
   python
🤖 Fix all issues with AI agents
In `@home-manager/programs/node/default.nix`:
- Around line 3-5: Replace the incorrect package attribute name in the
home.packages list: change the reference to node to the correct nixpkgs
attribute nodejs so home.packages = with pkgs; [ nodejs ]; ensuring the Node.js
package resolves properly during evaluation.

Comment on lines +3 to +5
home.packages = with pkgs; [
node
];

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:

# First, let's check the actual file content
cat -n home-manager/programs/node/default.nix

Repository: shunkakinoki/dotfiles

Length of output: 170


🏁 Script executed:

# Verify nixpkgs packages - check if both 'node' and 'nodejs' exist
# and what they point to
rg -i "node" --type nix | head -20

Repository: shunkakinoki/dotfiles

Length of output: 1698


🌐 Web query:

home-manager nodejs programs module

💡 Result:

Home Manager does not have a programs.nodejs module; for Node.js you typically just install a Node package via home.packages, and (optionally) manage npm configuration via programs.npm.*. Home Manager program modules usually live under programs.<name>, but many tools (like Node.js) are just installed as packages instead. [4]

Example (home.nix)

{ pkgs, ... }:
{
  home.packages = [
    pkgs.nodejs_24  # or pkgs.nodejs, pkgs.nodejs_22, etc.
  ];

  programs.npm = {
    enable = true;              # manage ~/.npmrc [3]
    package = pkgs.nodejs_24;   # which nodejs provides npm [1]
    settings = {
      prefix = "${HOME}/.npm";  # default, example override [2]
    };
  };
}

If your goal is just “install Node”, home.packages = [ pkgs.nodejs_<version> ]; is the key piece. [4]


🌐 Web query:

nixpkgs nodejs node package name

💡 Result:

In nixpkgs, Node-related packages typically show up under these attribute names:

  • Node.js runtime

    • nodejs = alias for the latest LTS Node.js in nixpkgs (manually updated in nixpkgs). [2]
    • Versioned runtimes are named like nodejs_20, nodejs_24, etc. (and nodejs_latest tracks the latest “current” release; e.g., release notes mention nodejs_latest moving to 24.x and nodejs_24 existing). [1][3]
    • Discover exact names on your channel with: nix search nixpkgs nodejs. [2]
  • npm “end-user” CLI tools packaged in nixpkgs

    • These are in the generated set nodePackages (and a “current” variant nodePackages_latest). [3]
    • Naming:
      • Unscoped: nodePackages.<name> (example: nodePackages.typescript)
      • Scoped npm names use quotes: nodePackages."@scope/name" (example from release notes: nodePackages."@commitlint/config-conventional"). [1]

If you tell me the exact npm package name (e.g. eslint, @angular/cli, etc.), I can tell you the most likely nixpkgs attribute and a nix search command to confirm it.


Incorrect package name: node should be nodejs.

In nixpkgs, the Node.js package is named nodejs, not node. Using node will cause a build failure because this attribute does not exist in nixpkgs.

Proposed fix
   home.packages = with pkgs; [
-    node
+    nodejs
   ];
📝 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
home.packages = with pkgs; [
node
];
home.packages = with pkgs; [
nodejs
];
🤖 Prompt for AI Agents
In `@home-manager/programs/node/default.nix` around lines 3 - 5, Replace the
incorrect package attribute name in the home.packages list: change the reference
to node to the correct nixpkgs attribute nodejs so home.packages = with pkgs; [
nodejs ]; ensuring the Node.js package resolves properly during evaluation.

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

2 issues 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/programs/default.nix">

<violation number="1" location="home-manager/programs/default.nix:26">
P2: `node` module is imported but never added to the returned module list, so its configuration is never applied.</violation>
</file>

<file name="home-manager/programs/node/default.nix">

<violation number="1" location="home-manager/programs/node/default.nix:4">
P0: Incorrect package name: `node` does not exist in nixpkgs. The correct package name for Node.js is `nodejs`. This will cause a build failure.</violation>
</file>

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

{ pkgs, ... }:
{
home.packages = with pkgs; [
node

@cubic-dev-ai cubic-dev-ai Bot Jan 29, 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.

P0: Incorrect package name: node does not exist in nixpkgs. The correct package name for Node.js is nodejs. This will cause a build failure.

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

<comment>Incorrect package name: `node` does not exist in nixpkgs. The correct package name for Node.js is `nodejs`. This will cause a build failure.</comment>

<file context>
@@ -0,0 +1,6 @@
+{ pkgs, ... }:
+{
+  home.packages = with pkgs; [
+    node
+  ];
+}
</file context>
Fix with Cubic

lazygit = import ./lazygit;
lsd = import ./lsd;
neovim = import ./neovim;
node = import ./node;

@cubic-dev-ai cubic-dev-ai Bot Jan 29, 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: node module is imported but never added to the returned module list, so its configuration is never applied.

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

<comment>`node` module is imported but never added to the returned module list, so its configuration is never applied.</comment>

<file context>
@@ -23,6 +23,7 @@ let
   lazygit = import ./lazygit;
   lsd = import ./lsd;
   neovim = import ./neovim;
+  node = import ./node;
   python = import ./python;
   rust = import ./rust;
</file context>
Fix with Cubic

@shunkakinoki
shunkakinoki merged commit 9323178 into main Jan 29, 2026
43 checks passed
@shunkakinoki
shunkakinoki deleted the feat/node-program branch January 29, 2026 01:15
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