Skip to content

refactor: move openclaw, paperclip, obsidian from modules to services - #1447

Merged
shunkakinoki merged 2 commits into
mainfrom
refactor/move-services-modules
Apr 12, 2026
Merged

refactor: move openclaw, paperclip, obsidian from modules to services#1447
shunkakinoki merged 2 commits into
mainfrom
refactor/move-services-modules

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move openclaw and paperclip from home-manager/modules/ to home-manager/services/ since they define systemd services
  • Consolidate obsidian module into its existing service (merged package install + service definition, moved obsidian-headless.sh to services dir)
  • Update all test specs to reference new paths

Test plan

  • make shell-test passes (1228 examples, 0 failures)
  • nix flake check --no-build evaluates successfully

Summary by cubic

Move openclaw, paperclip, and obsidian from home-manager/modules to home-manager/services and fold Obsidian’s module logic into its service to match the systemd service layout. Updates imports (now consistently formatted) and tests; no functional changes.

  • Refactors
    • Moved openclaw and paperclip to home-manager/services/; added and formatted imports in home-manager/services/default.nix.
    • Consolidated Obsidian by installing the headless obsidian wrapper and defining the user service in services/obsidian; switched pkgs.replaceVars to use ./obsidian-headless.sh in the service directory.
    • Removed module entries from home-manager/modules/default.nix and updated test specs to the new paths.

Written for commit 90254ce. Summary will update on new commits.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 12, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@coderabbitai

coderabbitai Bot commented Apr 12, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@shunkakinoki has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 45 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 20 minutes and 45 seconds.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e6e226b-bed5-47d6-a2c5-286fac592fd1

📥 Commits

Reviewing files that changed from the base of the PR and between d3c4382 and 90254ce.

📒 Files selected for processing (1)
  • home-manager/services/default.nix
📝 Walkthrough

Walkthrough

This PR reorganizes home-manager modules by removing obsidian, openclaw, and paperclip from the modules directory and migrating them to services. The obsidian-headless script is relocated from modules to services, and test paths are updated to reflect the new structure.

Changes

Cohort / File(s) Summary
Module List Configuration
home-manager/modules/default.nix
Removed three module entries (./obsidian, ./openclaw, ./paperclip) from the exported modules array.
Removed Module
home-manager/modules/obsidian/default.nix
Entire module file deleted; previously provided headless Obsidian launcher functionality for kyber hosts.
Service Configuration & Scripts
home-manager/services/default.nix, home-manager/services/obsidian/default.nix
Added openclaw and paperclip service imports to services list; moved obsidian-headless script logic from modules to services directory with updated template handling.
Test Path Updates
spec/activate_paperclip_openclaw_spec.sh, spec/obsidian_headless_spec.sh, spec/coverage_spec.sh
Updated test script paths to reference services directory instead of modules directory for obsidian, openclaw, and paperclip.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 Modules hop to services with grace,
Obsidian, Openclaw find their place,
Paperclip follows the moving tide,
Tests redirect with organized pride,
Organization blooms far and wide!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main refactoring change: moving three modules (openclaw, paperclip, obsidian) from modules to services.
Description check ✅ Passed The description clearly explains the refactoring objectives and provides details about what was moved and why, with test verification included.
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
  • Commit unit tests in branch refactor/move-services-modules

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.

@mesa-dot-dev

mesa-dot-dev Bot commented Apr 12, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Moved openclaw, paperclip, and obsidian configurations from home-manager/modules to home-manager/services to align with their systemd service definitions, consolidating Obsidian's module logic into its service.

What changed?

  • home-manager/modules/default.nix: Removed module imports for obsidian, openclaw, and paperclip.
  • home-manager/modules/obsidian/default.nix: Deleted.
  • home-manager/services/default.nix: Added imports for openclaw and paperclip services.
  • home-manager/services/obsidian/default.nix: Introduced and configured the obsidianHeadless package, defining the user service and updating the obsidian-headless.sh script path.
  • spec/activate_paperclip_openclaw_spec.sh: Updated test references from home-manager/modules/paperclip and home-manager/modules/openclaw to their new home-manager/services paths.
  • spec/coverage_spec.sh: Updated paths for obsidian-headless.sh, openclaw/activate.sh, and paperclip/activate.sh from home-manager/modules/ to home-manager/services/.
  • spec/obsidian_headless_spec.sh: Updated the script path for obsidian-headless.sh within the test description and variable.

Description generated by Mesa. Update settings

@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 12 files

@shunkakinoki
shunkakinoki merged commit 376c8a1 into main Apr 12, 2026
3 of 4 checks passed
@shunkakinoki
shunkakinoki deleted the refactor/move-services-modules branch April 12, 2026 11:48

@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 migrates the obsidian, openclaw, and paperclip modules from home-manager/modules to home-manager/services, consolidating service definitions, file paths, and test specifications. Feedback was provided to standardize the arguments passed to service imports across all modules to ensure consistency and improve maintainability.

Comment on lines +22 to +27
openclaw = import ./openclaw {
inherit
config
lib
pkgs
inputs

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.

medium

The imports for openclaw and paperclip are added here with config, lib, pkgs, and inputs passed as arguments. This matches the function signature in their respective default.nix files. However, note that obsidian and ollama (lines 20-21) only take pkgs and inputs. While this is currently correct based on the individual file requirements, maintaining a consistent interface for all service modules (e.g., always passing config, lib, pkgs, inputs) would improve maintainability and make it easier to add features like options to those modules in the future.

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