fix(xremap): suppress enable=false warning on non-desktop hosts - #995
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe xremap module configuration is restructured from a single conditional block to a merged list approach. A default-disabled flag is added as the first element, followed by the conditional xremap configuration for desktop Linux systems, with systemd service customizations preserved in the merged structure. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
Summary of ChangesHello, 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 addresses an evaluation warning in the xremap module that appeared on non-desktop hosts. By explicitly defaulting the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Home Manager xremap module configuration to explicitly set services.xremap.enable to a default of false on all hosts, while still enabling xremap on desktop Linux hosts. The intent is to prevent an upstream evaluation warning on non-desktop hosts where enable would otherwise be left implicit.
Changes:
- Wrap xremap config in
lib.mkMergeto apply an unconditionalservices.xremap.enable = lib.mkDefault false. - Preserve the existing desktop Linux behavior via
lib.mkIf (isDesktop && isLinux)whereenable = trueand related xremap settings are applied. - Keep systemd user service overrides scoped to desktop Linux only.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the warning for xremap on non-desktop hosts by providing a default value for services.xremap.enable. The use of lib.mkMerge and lib.mkDefault is the appropriate way to handle this in Nix, ensuring that the service is explicitly disabled by default while still being enabled on desktop hosts as intended. The implementation is clean and effective.
Summary
lib.mkMergeto explicitly setservices.xremap.enable = lib.mkDefault falseenableis left at its implicit default on non-desktop hosts (e.g.ubuntu)lib.mkIfblock'senable = truestill takes precedence via NixOS module priorityTest plan
make buildon a non-desktop host (e.g.ubuntu) produces no xremap evaluation warningmake buildon a desktop host (e.g.kyber) still enables and activates xremap correctlySummary by cubic
Suppress the xremap warning on non-desktop hosts by explicitly defaulting enable=false, while keeping desktop Linux behavior unchanged.
Written for commit 99a5b68. Summary will update on new commits.