Skip to content

fix(xremap): suppress enable=false warning on non-desktop hosts - #995

Merged
shunkakinoki merged 1 commit into
mainfrom
fix/xremap-suppress-warning
Mar 4, 2026
Merged

fix(xremap): suppress enable=false warning on non-desktop hosts#995
shunkakinoki merged 1 commit into
mainfrom
fix/xremap-suppress-warning

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wraps the xremap config in lib.mkMerge to explicitly set services.xremap.enable = lib.mkDefault false
  • Suppresses the upstream module warning emitted when enable is left at its implicit default on non-desktop hosts (e.g. ubuntu)
  • On desktop Linux, the lib.mkIf block's enable = true still takes precedence via NixOS module priority

Test plan

  • make build on a non-desktop host (e.g. ubuntu) produces no xremap evaluation warning
  • make build on a desktop host (e.g. kyber) still enables and activates xremap correctly

Summary by cubic

Suppress the xremap warning on non-desktop hosts by explicitly defaulting enable=false, while keeping desktop Linux behavior unchanged.

  • Bug Fixes
    • Wrapped config in lib.mkMerge and set services.xremap.enable = lib.mkDefault false to silence the upstream warning on non-desktop hosts.
    • Preserved desktop Linux behavior with lib.mkIf (isDesktop && isLinux) where enable = true still wins via module priority, keeping systemd tweaks intact.

Written for commit 99a5b68. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 4, 2026 15:45
@coderabbitai

coderabbitai Bot commented Mar 4, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82358c60-b447-4f50-907b-63d0ac6c53e5

📥 Commits

Reviewing files that changed from the base of the PR and between 5e4be5f and 99a5b68.

📒 Files selected for processing (1)
  • home-manager/modules/xremap/default.nix

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Reorganized xremap configuration structure for better modularity. All existing functionality and settings are preserved.

Walkthrough

The 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

Cohort / File(s) Summary
xremap Configuration Restructuring
home-manager/modules/xremap/default.nix
Converts config from single conditional block to merged list with lib.mkMerge. Adds default-disabled flag (services.xremap.enable = lib.mkDefault false), preserves conditional xremap settings (enable, withWlroots, watch, deviceNames, keymap) and systemd.user.services.xremap customizations within merged structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A config once straight, now merges with care,
Default-disabled flags float through the air,
Conditional branches wrapped tight in arrays,
Xremap hops forward in reorganized ways! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: suppressing an xremap warning on non-desktop hosts, which directly corresponds to the core change in reorganizing configuration with lib.mkMerge and lib.mkDefault.
Description check ✅ Passed The description thoroughly explains the changeset, detailing the lib.mkMerge wrapper, the lib.mkDefault false setting to suppress warnings, and how desktop Linux behavior is preserved.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/xremap-suppress-warning

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@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 1 file

@shunkakinoki
shunkakinoki enabled auto-merge (squash) March 4, 2026 15:47
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enable option to false using lib.mkDefault within a lib.mkMerge block, the warning is silenced without altering the intended behavior or configuration of xremap on desktop Linux systems. The change ensures a cleaner build process across different environments while preserving existing functionality.

Highlights

  • Warning Suppression: Suppressed an upstream xremap module warning that occurred when enable was left at its implicit default on non-desktop hosts (e.g., Ubuntu).
  • Configuration Refinement: Wrapped the xremap configuration in lib.mkMerge to explicitly set services.xremap.enable = lib.mkDefault false for non-desktop environments.
  • Desktop Linux Compatibility: Ensured that on desktop Linux systems, the lib.mkIf block's enable = true still takes precedence via NixOS module priority, maintaining correct xremap activation and systemd tweaks.
Changelog
  • home-manager/modules/xremap/default.nix
    • Wrapped the existing lib.mkIf (isDesktop && isLinux) configuration block within a lib.mkMerge list.
    • Added a new configuration entry { services.xremap.enable = lib.mkDefault false; } to the lib.mkMerge list, ensuring enable is explicitly set to false by default, which can be overridden by higher-priority modules.
Activity
  • No specific activity (comments, reviews, etc.) was provided in the context for this pull request.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copilot AI 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.

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.mkMerge to apply an unconditional services.xremap.enable = lib.mkDefault false.
  • Preserve the existing desktop Linux behavior via lib.mkIf (isDesktop && isLinux) where enable = true and 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.

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

@shunkakinoki
shunkakinoki merged commit a2e11b4 into main Mar 4, 2026
40 checks passed
@shunkakinoki
shunkakinoki deleted the fix/xremap-suppress-warning branch March 4, 2026 16:48
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.

2 participants