Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions home-manager/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ let
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 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.

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

@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

python = import ./python;
rust = import ./rust;
ssh = import ./ssh;
Expand Down
6 changes: 6 additions & 0 deletions home-manager/programs/node/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,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.

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.

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

@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

];
Comment on lines +3 to +5

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.

}
Comment on lines +1 to +6

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.

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

Loading