Skip to content

Add latest program to replace shell alias with AI-assisted commits#197

Merged
connerohnesorge merged 7 commits intomainfrom
add-latest-program
Dec 10, 2025
Merged

Add latest program to replace shell alias with AI-assisted commits#197
connerohnesorge merged 7 commits intomainfrom
add-latest-program

Conversation

@connerohnesorge
Copy link
Copy Markdown
Owner

@connerohnesorge connerohnesorge commented Dec 6, 2025

Summary

  • Replace the simple latest alias (git add . && git commit -m "latest" && git push) with a program that invokes cldk to generate meaningful AI-assisted commit messages
  • Create modules/programs/latest/ with Denix module pattern following existing conventions
  • Enable latest program in engineer.nix for both NixOS and Darwin platforms
  • Additional config updates: stowrc ignore list, conclaude cleanup, mouseless keyboard config

Test plan

  • Run nix flake check to validate module syntax
  • Run nixos-rebuild build --flake . to verify NixOS configuration builds
  • Verified latest program is included in the build output

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a cross-platform "latest" command to commit and push changes with AI-generated messages.
  • Configuration

    • Added comprehensive app/UI configuration (keyboard, grid, styling, behavior).
    • Enabled the "latest" feature in system profiles and expanded tool/library declarations.
  • Other

    • Removed the prior shell alias for "latest".
    • Removed Docker NVIDIA auto-enable flag.
    • Adjusted runtime library lookup for CUDA-enabled shells.
  • Cleanup

    • Removed configurable rounds option from stop settings.

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

connerohnesorge and others added 2 commits December 6, 2025 16:21
Replace the simple `latest` alias (git add . && git commit -m "latest" && git push)
with a program that invokes cldk to generate meaningful AI-assisted commit messages.

Changes:
- Create modules/programs/latest/ with Denix module pattern
- Enable latest program in engineer.nix for NixOS and Darwin
- Remove the old latest alias from .zshrc
- Add spectr change proposal for tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 'result' to stowrc ignore list
- Remove unused 'rounds' config section from conclaude.yaml
- Add mouseless keyboard config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 6, 2025

Warning

Rate limit exceeded

@connerohnesorge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 8bce9f5 and d2a4103.

⛔ Files ignored due to path filters (1)
  • templates/latex-shell/flake.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • templates/latex-shell/flake.nix (4 hunks)
  • templates/latex-shell/shell.nix (1 hunks)

Walkthrough

Adds a new "latest" program (Nix module + wrapper script) and enables it in the engineer feature; removes the prior shell alias. Also adds multiple configuration and documentation files and small edits to flake inputs, NVIDIA docker flag, CUDA shell library path, and stow ignore patterns.

Changes

Cohort / File(s) Summary
New program module
modules/programs/latest/default.nix, modules/programs/latest/latest.sh
Adds programs.latest Nix module (delib.module, singleEnableOption) and a shell script that runs cldk "commit and push all changes with good commit messages". When enabled, adds latest to environment.systemPackages.
Feature enablement & nix-ld
modules/features/engineer.nix
Enables latest.enable = true for both NixOS and Darwin; adds programs.nix-ld.dev.nix-ld.libraries entries (stdenv.cc.cc.lib, zlib).
Shell config change
.zshrc
Removed the latest alias (git add . && git commit -m "latest" && git push).
Spec, proposal, and tasks
spectr/changes/add-latest-program/proposal.md, spectr/changes/add-latest-program/specs/shell-utilities/spec.md, spectr/changes/add-latest-program/tasks.md
Adds proposal, spec, and implementation tasks for the latest program and its expected behavior and testing steps.
Mouseless / BTT config
.config/mouseless/config.yaml
Adds a comprehensive mouseless configuration (behavior_configs, grid_configs, keyboard_layout, keymaps, style_configs, monitor assignment, app_version 0.4.0-preview.2) — static YAML config only.
Misc. dotfiles/config edits
.conclaude.yaml, .stowrc
.conclaude.yaml: removed rounds under stop; .stowrc: added --ignore result ignore pattern.
Flake input change
flake.nix
Replaced spectr.url pinned commit with an unpinned repository URL (changes how the input is resolved).
NVIDIA module change
modules/features/nvidia.nix
Removed enableNvidia = true under virtualisation.docker (removes explicit Docker NVIDIA enable setting).
CUDA shell runtime tweak
templates/cuda-shell/flake.nix
Appends /run/opengl-driver/lib to the computed LD_LIBRARY_PATH.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Validate programs.latest module wiring (delib.module, singleEnableOption) and that latest is added to environment.systemPackages for both nixos and darwin.
  • Review latest.sh invocation of cldk for quoting/security and runtime assumptions.
  • Check .config/mouseless/config.yaml keys against any validation schema or tooling.
  • Verify flake.nix spectr input change and potential reproducibility impacts.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary change: replacing a shell alias with a new program that uses AI-assisted commits via cldk.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.config/mouseless/config.yaml (1)

1-79: Consider separating unrelated configuration changes.

While the PR description explicitly mentions this mouseless keyboard config update, mixing it with the "latest" program feature reduces PR cohesion. Keeping configuration updates in separate PRs improves reviewability, git history clarity, and rollback granularity.

modules/programs/latest/latest.sh (1)

1-3: Consider adding git repository validation.

The script will fail with error messages from cldk if not run in a git repository, but a quick upfront check would provide clearer feedback:

 #!/usr/bin/env bash
 
+if ! git rev-parse --git-dir > /dev/null 2>&1; then
+  echo "Error: Not in a git repository" >&2
+  exit 1
+fi
+
 cldk "commit and push all changes with good commit messages"

Note: writeShellApplication already provides set -euo pipefail, so basic error handling is covered.

modules/features/engineer.nix (1)

175-178: Consider separating unrelated infrastructure changes.

The nix-ld.libraries addition is unrelated to the "latest" program feature. While this is a useful infrastructure update, keeping it in a separate PR would improve git history clarity and make it easier to track when/why this library support was added.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b9e748 and 04fa62c.

📒 Files selected for processing (10)
  • .conclaude.yaml (0 hunks)
  • .config/mouseless/config.yaml (1 hunks)
  • .stowrc (1 hunks)
  • .zshrc (0 hunks)
  • modules/features/engineer.nix (3 hunks)
  • modules/programs/latest/default.nix (1 hunks)
  • modules/programs/latest/latest.sh (1 hunks)
  • spectr/changes/add-latest-program/proposal.md (1 hunks)
  • spectr/changes/add-latest-program/specs/shell-utilities/spec.md (1 hunks)
  • spectr/changes/add-latest-program/tasks.md (1 hunks)
💤 Files with no reviewable changes (2)
  • .conclaude.yaml
  • .zshrc
🧰 Additional context used
📓 Path-based instructions (9)
spectr/changes/**/specs/**/spec.md

📄 CodeRabbit inference engine (CLAUDE.md)

spectr/changes/**/specs/**/spec.md: Create spec delta files using ## ADDED|MODIFIED|REMOVED|RENAMED Requirements headers with at least one #### Scenario: per requirement
Use #### Scenario: header format (4 hashtags) for scenarios in spec files, not bullet points or bold formatting

spectr/changes/**/specs/**/spec.md: Write delta specs using ## ADDED|MODIFIED|REMOVED|RENAMED Requirements sections; include at least one #### Scenario: per requirement with WHEN/THEN format
Use #### Scenario: format (4 hashtags) with WHEN/THEN bullet structure for scenarios; do not use bullet points or bold for scenario headers, and do not use ### headers for scenarios
Ensure every requirement has at least one scenario; scenarios must use the #### Scenario: Name format exactly

Files:

  • spectr/changes/add-latest-program/specs/shell-utilities/spec.md
spectr/changes/**/*.md

📄 CodeRabbit inference engine (spectr/AGENTS.md)

Create design.md only when the change involves cross-cutting changes, new architectural patterns, new external dependencies, significant data model changes, security/performance complexity, or ambiguity requiring technical decisions

Files:

  • spectr/changes/add-latest-program/specs/shell-utilities/spec.md
  • spectr/changes/add-latest-program/proposal.md
  • spectr/changes/add-latest-program/tasks.md
modules/features/**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

modules/features/**/*.nix: Use the delib.module pattern with singleEnableOption false for feature modules in modules/features/
Define platform-specific configuration in separate sections using nixos.ifEnabled, darwin.ifEnabled, and home.ifEnabled for feature modules

In Nix module files, use the delib.module pattern with singleEnableOption false for feature modules with platform-specific sections: nixos.ifEnabled, darwin.ifEnabled, home.ifEnabled

Files:

  • modules/features/engineer.nix
**/*.{nix,rs,py}

📄 CodeRabbit inference engine (GEMINI.md)

Use nix fmt to format code using treefmt (alejandra for Nix, rustfmt for Rust, black for Python)

Files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
**/*.nix

📄 CodeRabbit inference engine (AGENTS.md)

**/*.nix: Use alejandra formatting for Nix files
Prefer let...in blocks in Nix code
Use kebab-case for Nix attributes

Files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
modules/**/*.nix

📄 CodeRabbit inference engine (AGENTS.md)

modules/**/*.nix: Use delib.module pattern for Nix modules
Use platform-specific sections: nixos.ifEnabled, darwin.ifEnabled, home.ifEnabled for multi-platform support

Files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
**/*.{py,nix}

📄 CodeRabbit inference engine (AGENTS.md)

Use snake_case for file and function names

Files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
modules/programs/**/default.nix

📄 CodeRabbit inference engine (CLAUDE.md)

Create custom program modules in modules/programs/ directories with source code and default.nix build expressions

Files:

  • modules/programs/latest/default.nix
modules/programs/*/default.nix

📄 CodeRabbit inference engine (GEMINI.md)

In custom program modules, create a directory in modules/programs/ with source code and default.nix, define the package derivation with cross-platform support, and export using delib.module pattern

Files:

  • modules/programs/latest/default.nix
🧠 Learnings (18)
📓 Common learnings
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Applies to modules/programs/*/default.nix : In custom program modules, create a directory in `modules/programs/` with source code and `default.nix`, define the package derivation with cross-platform support, and export using `delib.module` pattern
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to spectr/changes/**/specs/**/spec.md : Create spec delta files using `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` headers with at least one `#### Scenario:` per requirement

Applied to files:

  • spectr/changes/add-latest-program/specs/shell-utilities/spec.md
📚 Learning: 2025-11-28T14:26:10.600Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: spectr/AGENTS.md:0-0
Timestamp: 2025-11-28T14:26:10.600Z
Learning: Applies to spectr/changes/**/specs/**/spec.md : Write delta specs using `## ADDED|MODIFIED|REMOVED|RENAMED Requirements` sections; include at least one `#### Scenario:` per requirement with **WHEN**/**THEN** format

Applied to files:

  • spectr/changes/add-latest-program/specs/shell-utilities/spec.md
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Applies to modules/programs/*/default.nix : In custom program modules, create a directory in `modules/programs/` with source code and `default.nix`, define the package derivation with cross-platform support, and export using `delib.module` pattern

Applied to files:

  • spectr/changes/add-latest-program/proposal.md
  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to modules/programs/**/default.nix : Create custom program modules in `modules/programs/` directories with source code and `default.nix` build expressions

Applied to files:

  • spectr/changes/add-latest-program/proposal.md
  • modules/programs/latest/default.nix
  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Run program manual testing after editing any program in `modules/programs/` in addition to automated tests

Applied to files:

  • spectr/changes/add-latest-program/proposal.md
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Applies to modules/features/**/*.nix : In Nix module files, use the `delib.module` pattern with `singleEnableOption false` for feature modules with platform-specific sections: `nixos.ifEnabled`, `darwin.ifEnabled`, `home.ifEnabled`

Applied to files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to modules/features/**/*.nix : Use the `delib.module` pattern with `singleEnableOption false` for feature modules in `modules/features/`

Applied to files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to modules/features/**/*.nix : Define platform-specific configuration in separate sections using `nixos.ifEnabled`, `darwin.ifEnabled`, and `home.ifEnabled` for feature modules

Applied to files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: When creating new feature modules in Nix, consider both nixos and darwin platforms and define platform-specific configuration in separate conditional sections

Applied to files:

  • modules/features/engineer.nix
  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to hosts/**/*.nix : Enable features in host configurations using `myconfig.features.featureName = true` syntax

Applied to files:

  • modules/features/engineer.nix
📚 Learning: 2025-11-28T14:25:42.835Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T14:25:42.835Z
Learning: Applies to modules/**/*.nix : Use platform-specific sections: `nixos.ifEnabled`, `darwin.ifEnabled`, `home.ifEnabled` for multi-platform support

Applied to files:

  • modules/features/engineer.nix
  • modules/programs/latest/default.nix
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Run all commands using `nix develop -c <command>` to ensure the proper shell environment is loaded

Applied to files:

  • modules/features/engineer.nix
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Run all development commands using `nix develop -c <command>` to ensure the proper shell environment is loaded

Applied to files:

  • modules/features/engineer.nix
📚 Learning: 2025-11-28T14:25:42.835Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-28T14:25:42.835Z
Learning: Applies to modules/**/*.nix : Use `delib.module` pattern for Nix modules

Applied to files:

  • modules/programs/latest/default.nix
📚 Learning: 2025-11-28T14:24:35.117Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Test individual program builds by running `cd modules/programs/<program-name> && nix build`

Applied to files:

  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Each Nix module should be self-contained with minimal external dependencies

Applied to files:

  • spectr/changes/add-latest-program/tasks.md
📚 Learning: 2025-11-28T14:25:08.335Z
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Use `nix develop -c lint` to run linting tools (statix, deadnix, nix flake check); on NixOS, run `nixos-rebuild build --flake .` for better results

Applied to files:

  • spectr/changes/add-latest-program/tasks.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build (macos-aarch64)
  • GitHub Check: Build (linux-x86_64)
  • GitHub Check: Validate Templates (linux-x86_64)
  • GitHub Check: Validate Templates (macos-aarch64)
🔇 Additional comments (5)
.stowrc (1)

39-39: LGTM!

Adding result to the stow ignore list is appropriate, as this is the standard Nix build output symlink that should not be managed by stow.

modules/programs/latest/default.nix (2)

18-24: LGTM: Platform configuration follows established patterns.

The module correctly uses nixos.ifEnabled and darwin.ifEnabled sections to provide cross-platform support, with the program added to environment.systemPackages for both.

Based on learnings, this follows the expected pattern for custom program modules with cross-platform support.


8-11: Remove suggestion for runtimeInputs with cldk — not feasible with current architecture.

The concern about implicit runtime dependencies is valid in principle, but the proposed solution references config.myconfig.programs.cldk.package, which does not exist in the delib module system. Custom program modules (including cldk) cannot be referenced as derivations from within other program modules due to the module isolation design.

In this codebase's architecture, both cldk and latest are enabled together at the feature level via engineer.nix, making cldk available in the system PATH when latest runs. This implicit dependency model is consistent with how other custom programs work (e.g., xlaude, zlaude, klaude) and is by design. No cross-module derivation reference mechanism exists to make this self-contained without architectural changes.

Likely an incorrect or invalid review comment.

modules/features/engineer.nix (2)

38-38: LGTM: Correctly enables latest program for NixOS.

The addition of latest.enable = true properly activates the new latest program module, following the established pattern for program enablement.


221-221: LGTM: Correctly enables latest program for Darwin.

The addition of latest.enable = true for Darwin ensures cross-platform availability of the latest program, aligning with the NixOS configuration.

## 1. Implementation

- [x] 1.1 Create `modules/programs/latest/` directory
- [x] 1.2 Create `modules/programs/latest/latest.nix` with Denix module pattern
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.

⚠️ Potential issue | 🟡 Minor

Fix filename reference in documentation.

The task references latest.nix, but the actual implementation uses default.nix (following the standard pattern for program modules).

Apply this diff:

-- [x] 1.2 Create `modules/programs/latest/latest.nix` with Denix module pattern
+- [x] 1.2 Create `modules/programs/latest/default.nix` with Denix module pattern
📝 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
- [x] 1.2 Create `modules/programs/latest/latest.nix` with Denix module pattern
- [x] 1.2 Create `modules/programs/latest/default.nix` with Denix module pattern
🤖 Prompt for AI Agents
In spectr/changes/add-latest-program/tasks.md around line 4, the task item
references the wrong filename `modules/programs/latest/latest.nix` but the
implementation follows the standard module pattern and uses `default.nix`;
update the documentation to reference `modules/programs/latest/default.nix` (or
change the task wording to say "Create modules/programs/latest with a
default.nix Denix module") so the filename in the task matches the actual
implementation.

connerohnesorge and others added 3 commits December 7, 2025 10:15
- Convert mouseless config from JSON to YAML format for better readability and maintainability
- Update CUDA shell template LD_LIBRARY_PATH to properly include OpenGL driver library path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
modules/features/ollama.nix (1)

30-43: Package selection logic looks good; consider reusing it for both service and CLI.

Switching from an acceleration string to explicit pkgs.ollama-* packages with a CPU fallback is a solid improvement and matches the NixOS services.ollama.package pattern. One follow-up you might consider is using the same package for both the system ollama CLI and the service to avoid mismatches (e.g., CPU CLI with GPU service):

-    nixos.ifEnabled = {myconfig, ...}: {
-      environment.systemPackages = with pkgs; [
-        ollama
-      ];
-
-      services = {
-        ollama = {
-          enable = true;
-          loadModels = ["gpt-oss:20b"];
-          package =
-            if myconfig.features.amd.enable
-            then pkgs.ollama-rocm
-            else if myconfig.features.nvidia.enable
-            then pkgs.ollama-cuda
-            else pkgs.ollama-cpu;
-        };
-      };
-    };
+    nixos.ifEnabled = {myconfig, ...}: let
+      ollamaPackage =
+        if myconfig.features.amd.enable
+        then pkgs.ollama-rocm
+        else if myconfig.features.nvidia.enable
+        then pkgs.ollama-cuda
+        else pkgs.ollama-cpu;
+    in {
+      environment.systemPackages = [ollamaPackage];
+
+      services.ollama = {
+        enable = true;
+        loadModels = ["gpt-oss:20b"];
+        package = ollamaPackage;
+      };
+    };

Please double-check that your pinned nixpkgs provides pkgs.ollama-rocm, pkgs.ollama-cuda, and pkgs.ollama-cpu, and that the services.ollama.package option behaves as expected for these variants in your current NixOS release.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a828e8e and 8bce9f5.

📒 Files selected for processing (1)
  • modules/features/ollama.nix (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
modules/features/**/*.nix

📄 CodeRabbit inference engine (CLAUDE.md)

modules/features/**/*.nix: Use the delib.module pattern with singleEnableOption false for feature modules in modules/features/
Define platform-specific configuration in separate sections using nixos.ifEnabled, darwin.ifEnabled, and home.ifEnabled for feature modules

In Nix module files, use the delib.module pattern with singleEnableOption false for feature modules with platform-specific sections: nixos.ifEnabled, darwin.ifEnabled, home.ifEnabled

Files:

  • modules/features/ollama.nix
**/*.{nix,rs,py}

📄 CodeRabbit inference engine (GEMINI.md)

Use nix fmt to format code using treefmt (alejandra for Nix, rustfmt for Rust, black for Python)

Files:

  • modules/features/ollama.nix
**/*.nix

📄 CodeRabbit inference engine (AGENTS.md)

**/*.nix: Use alejandra formatting for Nix files
Prefer let...in blocks in Nix code
Use kebab-case for Nix attributes

Files:

  • modules/features/ollama.nix
modules/**/*.nix

📄 CodeRabbit inference engine (AGENTS.md)

modules/**/*.nix: Use delib.module pattern for Nix modules
Use platform-specific sections: nixos.ifEnabled, darwin.ifEnabled, home.ifEnabled for multi-platform support

Files:

  • modules/features/ollama.nix
**/*.{py,nix}

📄 CodeRabbit inference engine (AGENTS.md)

Use snake_case for file and function names

Files:

  • modules/features/ollama.nix
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-11-28T14:25:08.335Z
Learning: Applies to modules/programs/*/default.nix : In custom program modules, create a directory in `modules/programs/` with source code and `default.nix`, define the package derivation with cross-platform support, and export using `delib.module` pattern
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to modules/programs/**/default.nix : Create custom program modules in `modules/programs/` directories with source code and `default.nix` build expressions
Learnt from: CR
Repo: connerohnesorge/dotfiles PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-28T14:24:35.117Z
Learning: Applies to modules/features/**/*.nix : Use the `delib.module` pattern with `singleEnableOption false` for feature modules in `modules/features/`
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Validate Templates (macos-aarch64)
  • GitHub Check: Validate Templates (linux-x86_64)
  • GitHub Check: Build (macos-aarch64)
  • GitHub Check: Build (linux-x86_64)

@connerohnesorge connerohnesorge merged commit 19d789c into main Dec 10, 2025
6 checks passed
@connerohnesorge connerohnesorge deleted the add-latest-program branch December 10, 2025 11: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.

1 participant