Move in-tree MCP packages to packages/ and standardize on callPackage #273

Closed
opened 2026-10-06 20:08:15 +01:00 by nimmo · 0 comments
Owner

Context & Problem

Several package derivations and lockfiles are currently located in modules/common/ rather than the canonical packages/ directory:

  • modules/common/karakeep-mcp-package.nix
  • modules/common/karakeep-mcp-pnpm-lock.yaml
  • modules/common/bookstack-mcp-package.nix
  • modules/common/mcp-pangolin-package.nix
  • modules/common/trilium-mcp-package.nix

Furthermore, they are consumed via raw file imports instead of callPackage:

karakeepMcp = import ./karakeep-mcp-package.nix { inherit pkgs lib; };

In addition, packages/dwarf-fortress-full/default.nix and packages/moonlight-qt/default.nix take { pkgs }: rather than specific attributes, and are injected into every host via an overlay inside modules/common/nix-settings.nix.

Scope

  • modules/common/*-mcp-package.nix
  • modules/common/karakeep-mcp-pnpm-lock.yaml
  • modules/common/nix-settings.nix
  • packages/
  • flake.nix (if exposing via packages.<system>)

Implementation Checklist

  • Move modules/common/*-mcp-package.nix and karakeep-mcp-pnpm-lock.yaml into dedicated subdirectories under packages/ (e.g. packages/karakeep-mcp/, packages/bookstack-mcp/, packages/mcp-pangolin/, packages/trilium-mcp/).
  • Refactor the derivations to standard callPackage signatures ({ lib, stdenv, fetchurl, ... }:).
  • Migrate callers from raw import ./...-package.nix to pkgs.callPackage.
  • Refactor packages/dwarf-fortress-full and packages/moonlight-qt to standard callPackage patterns and remove the global overlay from modules/common/nix-settings.nix.

Completion Criteria

  • No package derivations or lockfiles reside in modules/common/.
  • All custom packages follow standard callPackage conventions.
  • nix flake check passes cleanly.
## Context & Problem Several package derivations and lockfiles are currently located in `modules/common/` rather than the canonical `packages/` directory: - `modules/common/karakeep-mcp-package.nix` - `modules/common/karakeep-mcp-pnpm-lock.yaml` - `modules/common/bookstack-mcp-package.nix` - `modules/common/mcp-pangolin-package.nix` - `modules/common/trilium-mcp-package.nix` Furthermore, they are consumed via raw file imports instead of `callPackage`: ```nix karakeepMcp = import ./karakeep-mcp-package.nix { inherit pkgs lib; }; ``` In addition, `packages/dwarf-fortress-full/default.nix` and `packages/moonlight-qt/default.nix` take `{ pkgs }:` rather than specific attributes, and are injected into every host via an overlay inside `modules/common/nix-settings.nix`. ## Scope - `modules/common/*-mcp-package.nix` - `modules/common/karakeep-mcp-pnpm-lock.yaml` - `modules/common/nix-settings.nix` - `packages/` - `flake.nix` (if exposing via `packages.<system>`) ## Implementation Checklist - [ ] Move `modules/common/*-mcp-package.nix` and `karakeep-mcp-pnpm-lock.yaml` into dedicated subdirectories under `packages/` (e.g. `packages/karakeep-mcp/`, `packages/bookstack-mcp/`, `packages/mcp-pangolin/`, `packages/trilium-mcp/`). - [ ] Refactor the derivations to standard `callPackage` signatures (`{ lib, stdenv, fetchurl, ... }:`). - [ ] Migrate callers from raw `import ./...-package.nix` to `pkgs.callPackage`. - [ ] Refactor `packages/dwarf-fortress-full` and `packages/moonlight-qt` to standard `callPackage` patterns and remove the global overlay from `modules/common/nix-settings.nix`. ## Completion Criteria - No package derivations or lockfiles reside in `modules/common/`. - All custom packages follow standard `callPackage` conventions. - `nix flake check` passes cleanly.
nimmo closed this issue 2026-10-07 13:00:25 +01:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#273
No description provided.