Skip to content

feat: improve Hyprland keybindings, add /bin shell symlinks, fix clipboard - #799

Merged
shunkakinoki merged 2 commits into
mainfrom
feat/hyprland-keybinds-and-shell-compat
Feb 14, 2026
Merged

feat: improve Hyprland keybindings, add /bin shell symlinks, fix clipboard#799
shunkakinoki merged 2 commits into
mainfrom
feat/hyprland-keybinds-and-shell-compat

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change movewindow h/l to movetoworkspace r-1/r+1 for cross-workspace window movement
  • Move lock screen binding from Super+Shift+L to Framework+L to resolve conflict with workspace movement
  • Exclude l from xremap so Framework+L passes through as Hyper to Hyprland
  • Switch fullscreen toggle to maximize mode (fullscreen 1) to fix Chrome overlapping hyprpanel
  • Remove clipse clipboard manager in favor of cliphist only (fixes clipboard history not working)
  • Add /bin/{bash,fish,zsh} symlinks via home-manager activation for script compatibility on NixOS

Test plan

  • Super+Shift+H/L moves windows between workspaces
  • Framework+L locks screen via hyprlock
  • Super+Ctrl+F maximizes without overlapping panel
  • Super+Shift+V opens cliphist clipboard history
  • /bin/bash, /bin/fish, /bin/zsh symlinks exist after switch

🤖 Generated with Claude Code


Summary by cubic

Improved Hyprland window movement and lock screen shortcut, fixed fullscreen overlap and clipboard persistence, and added /bin shell symlinks with portable sudo detection for Linux.

  • New Features

    • Super+Shift+H/L now move windows to previous/next workspace (movetoworkspace r-1/r+1).
    • Lock screen moved to Hyper+L (Framework+L); xremap now passes Hyper+L through.
    • Added /bin/bash, /bin/fish, /bin/zsh symlinks via home-manager; uses portable sudo detection (works on non-NixOS).
  • Bug Fixes

    • Fullscreen bind uses maximize mode (fullscreen 1) to prevent Chrome overlapping hyprpanel.
    • Removed clipse and its binds/rules; rely on cliphist with wl-clip-persist for stable clipboard history.

Written for commit 8578c8a. Summary will update on new commits.

Copilot AI review requested due to automatic review settings February 13, 2026 22:36
@mesa-dot-dev

mesa-dot-dev Bot commented Feb 13, 2026

Copy link
Copy Markdown

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

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, 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 refines the Hyprland desktop environment configuration by optimizing keybindings for window management and the lock screen, and by streamlining the clipboard management setup. It also addresses system compatibility by introducing necessary shell symlinks for NixOS. These changes aim to improve user experience, resolve keybinding conflicts, and ensure proper application behavior.

Highlights

  • Hyprland Keybindings Improved: Window movement between workspaces was updated from Super+Shift+H/L to movetoworkspace r-1/r+1 for better cross-workspace navigation. The lock screen binding was moved from Super+Shift+L to Framework+L to prevent conflicts, and the fullscreen toggle now uses fullscreen 1 to ensure applications like Chrome maximize correctly without overlapping the panel.
  • Clipboard Manager Streamlined: The clipse clipboard manager and its associated configurations were removed, with the system now relying solely on cliphist for clipboard history management, resolving previous issues with history functionality.
  • xremap Configuration Adjusted: The 'l' key was explicitly excluded from xremap processing to allow the Framework+L key combination to pass through directly to Hyprland for the lock screen functionality.
  • Shell Symlinks Added: New Home-Manager activation scripts were introduced to create /bin/bash, /bin/fish, and /bin/zsh symlinks, enhancing script compatibility on NixOS environments.
Changelog
  • config/hyprland/hyprland.conf
    • Removed clipse clipboard manager execution and its window rules.
    • Updated the fullscreen toggle command to use fullscreen 1 instead of fullscreen 0.
    • Modified window movement keybindings ($mod SHIFT, H/L) to use movetoworkspace for cross-workspace navigation.
    • Changed the lock screen keybinding from $mod SHIFT, L to CTRL ALT SHIFT SUPER, L.
  • home-manager/modules/bin-shells/default.nix
    • Added a new Nix module to create /bin/bash, /bin/fish, and /bin/zsh symlinks during Home-Manager activation.
  • home-manager/modules/default.nix
    • Included the newly created bin-shells module in the list of Home-Manager modules.
  • home-manager/modules/xremap/default.nix
    • Excluded the 'l' key from the letters list to allow Framework+L to pass through to Hyprland.
    • Added a comment explaining the exclusion of 'l' for the Hyprland lock screen bind.
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.

@coderabbitai

coderabbitai Bot commented Feb 13, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Linux module for automatic shell binary symlink management (Bash, Fish, Zsh).
  • Changes

    • Updated window manager key bindings: fullscreen behavior, window movement controls, and lock screen activation shortcut.
    • Removed clipboard manager UI integration and window rules.
    • Adjusted key remapping configuration.

Walkthrough

Configuration edits: Hyprland keybinding and clipboard cleanup, replacement of movewindow with movetoworkspace mappings, lock-screen modifier changed, removal of clipse TUI rules; added a new Linux-only home-manager activation module to create /bin symlinks for shells; xremap remap list excludes "l".

Changes

Cohort / File(s) Summary
Hyprland Configuration
config/hyprland/hyprland.conf
Removed clipse clipboard manager window rules and TUI binding; changed clipboard persistence invocation; updated fullscreen flag (0 → 1); replaced movewindow H/L mappings with movetoworkspace using r-1/r+1; changed lock-screen binding modifiers; removed related bindings/comments.
Home-Manager — bin-shells module
home-manager/modules/bin-shells/default.nix
New Linux-only activation module added. Registers home.activation.binShells to run after writeBoundary, detects sudo wrapper, defines run_root_cmd, creates /bin, and symlinks /bin/bash, /bin/fish, /bin/zsh to Nix-store binaries; supports dry-run wrapper.
Home-Manager module index
home-manager/modules/default.nix
Added ./bin-shells to the exported module list so the new activation runs on Linux.
Home-Manager — xremap
home-manager/modules/xremap/default.nix
Removed the letter l from the remap keys list to avoid conflicting with the Hyprland lock-screen binding; updated comments to document exclusion.

Sequence Diagram(s)

sequenceDiagram
    participant HM as Home-Manager activation
    participant SUDO as Sudo wrapper (/run/wrappers/bin/sudo or /usr/bin/sudo)
    participant FS as Filesystem (/bin and symlinks)
    participant NIX as Nix store binaries

    HM->>SUDO: probe for sudo wrapper (multiple paths)
    alt sudo available
        HM->>SUDO: run_root_cmd wraps commands with sudo
    else running as root or dry-run set
        HM->>HM: run commands directly or via DRY_RUN_CMD
    end
    HM->>FS: create /bin directory
    HM->>NIX: resolve shell binaries paths
    HM->>FS: create symlinks `/bin/bash`, `/bin/fish`, `/bin/zsh` -> NIX binaries (via run_root_cmd)
    FS-->>HM: symlink creation result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through configs, nibbling at keys,

Clipse took a bow, shells forged symlinks with ease.
H/L now travel workspaces, L kept safe and sound,
My whiskers twitch — a cleaner mapping found.
✨🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (5 files):

⚔️ bun.lock (content)
⚔️ config/hyprland/hyprland.conf (content)
⚔️ home-manager/modules/default.nix (content)
⚔️ home-manager/modules/xremap/default.nix (content)
⚔️ package.json (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the three main aspects of the changeset: Hyprland keybindings improvements, addition of /bin shell symlinks, and clipboard fixes.
Description check ✅ Passed The description is directly related to the changeset, providing clear context for each modification including the technical rationale and test plan verification.
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 feat/hyprland-keybinds-and-shell-compat
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch feat/hyprland-keybinds-and-shell-compat
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

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.

@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 aims to improve Hyprland configuration with better keybindings, fix fullscreen behavior for Chrome, switch to cliphist for clipboard management, and enhance script compatibility on NixOS by adding shell symlinks in /bin. However, the introduction of the bin-shells module using sudo in Home Manager activation scripts poses a significant security risk, creating a privilege escalation vector and bypassing NixOS's declarative system configuration. It is strongly recommended to address this vulnerability by managing /bin symlinks at the system level.

Comment on lines +8 to +11
/run/wrappers/bin/sudo mkdir -p /bin
/run/wrappers/bin/sudo ln -sf ${pkgs.bash}/bin/bash /bin/bash
/run/wrappers/bin/sudo ln -sf ${pkgs.fish}/bin/fish /bin/fish
/run/wrappers/bin/sudo ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh

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.

security-medium medium

The use of sudo in Home Manager activation scripts for managing /bin symlinks is a critical security vulnerability. This approach introduces a privilege escalation vector, as a compromised Nix configuration could lead to malicious binaries being installed in /bin, potentially resulting in a full system compromise. It also violates the principle of least privilege and bypasses the declarative nature of NixOS system configuration. System-wide symlinks should be managed declaratively in the system configuration (e.g., configuration.nix) using native options like environment.binsh, services.envfs, or system.activationScripts. While grouping sudo commands could improve efficiency, the fundamental issue is the use of sudo in this context, which should be avoided.

       /run/wrappers/bin/sudo sh -c "mkdir -p /bin && ln -sf ${pkgs.bash}/bin/bash /bin/bash && ln -sf ${pkgs.fish}/bin/fish /bin/fish && ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh"

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@home-manager/modules/bin-shells/default.nix`:
- Around line 7-12: The activation uses /run/wrappers/bin/sudo (in
home.activation.binShells) which can prompt or be missing on non-NixOS systems;
change the activation to run only on NixOS or avoid sudo: wrap
home.activation.binShells with a conditional check (e.g., if
config.system.build?.isNixos or lib.isNixos equivalent in your codebase) so the
mkdir/ln commands only run on NixOS, or remove sudo and instead implement these
links as a system-level module (environment.etc or system.activationScripts) if
you need them globally; update references to home.activation.binShells and
lib.hm.dag.entryAfter accordingly.
🧹 Nitpick comments (1)
config/hyprland/hyprland.conf (1)

279-283: H/L and K/J now perform different operations under the same "Move windows" heading.

H/L use movetoworkspace (cross-workspace) while K/J use movewindow (within-workspace). Consider splitting these into two sub-sections or updating the comment to clarify the distinction, so the next reader doesn't assume all four keys do the same type of operation.

📝 Suggested comment clarification
-# Move windows (vim keys)
-bind = $mod SHIFT, H, movetoworkspace, r-1
-bind = $mod SHIFT, L, movetoworkspace, r+1
-bind = $mod SHIFT, K, movewindow, u
-bind = $mod SHIFT, J, movewindow, d
+# Move window to adjacent workspace (vim H/L)
+bind = $mod SHIFT, H, movetoworkspace, r-1
+bind = $mod SHIFT, L, movetoworkspace, r+1
+
+# Move window within workspace (vim K/J)
+bind = $mod SHIFT, K, movewindow, u
+bind = $mod SHIFT, J, movewindow, d

Comment on lines +7 to +12
home.activation.binShells = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
/run/wrappers/bin/sudo mkdir -p /bin
/run/wrappers/bin/sudo ln -sf ${pkgs.bash}/bin/bash /bin/bash
/run/wrappers/bin/sudo ln -sf ${pkgs.fish}/bin/fish /bin/fish
/run/wrappers/bin/sudo ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh
'';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

sudo in home-manager activation may prompt interactively or fail in non-interactive contexts.

This activation runs sudo on every home-manager switch, which could prompt for a password or fail in automated/CI contexts. Also, /run/wrappers/bin/sudo is NixOS-specific — on other Linux distros this path won't exist despite isLinux being true.

If this repo only targets NixOS, this is fine in practice. Otherwise, consider guarding with a NixOS-specific check or using a NixOS system-level module (environment.etc or system.activationScripts) which wouldn't need sudo from user space.

🤖 Prompt for AI Agents
In `@home-manager/modules/bin-shells/default.nix` around lines 7 - 12, The
activation uses /run/wrappers/bin/sudo (in home.activation.binShells) which can
prompt or be missing on non-NixOS systems; change the activation to run only on
NixOS or avoid sudo: wrap home.activation.binShells with a conditional check
(e.g., if config.system.build?.isNixos or lib.isNixos equivalent in your
codebase) so the mkdir/ln commands only run on NixOS, or remove sudo and instead
implement these links as a system-level module (environment.etc or
system.activationScripts) if you need them globally; update references to
home.activation.binShells and lib.hm.dag.entryAfter accordingly.

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

1 issue found across 4 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="home-manager/modules/bin-shells/default.nix">

<violation number="1" location="home-manager/modules/bin-shells/default.nix:8">
P2: The activation script hardcodes `/run/wrappers/bin/sudo` and runs commands directly, which fails on non-NixOS Linux and bypasses home-manager’s dry-run behavior. Resolve the sudo command dynamically and wrap calls with `$DRY_RUN_CMD` (as done in other modules).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread home-manager/modules/bin-shells/default.nix Outdated

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 updates the Linux desktop (Hyprland + xremap) configuration to refine keybindings, simplify clipboard management, and improve script compatibility by adding /bin/* shell symlinks.

Changes:

  • Adjust Hyprland keybindings (cross-workspace window movement, lock-screen binding, fullscreen behavior).
  • Remove clipse usage from Hyprland config in favor of cliphist + wl-clip-persist.
  • Add a new home-manager module that creates /bin/{bash,fish,zsh} symlinks during activation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
home-manager/modules/xremap/default.nix Excludes l from remapping so Hyper+L can reach Hyprland for locking.
home-manager/modules/default.nix Registers the new bin-shells module.
home-manager/modules/bin-shells/default.nix Adds activation logic intended to create /bin shell symlinks.
config/hyprland/hyprland.conf Updates binds, removes clipse rules/binds, and adjusts clipboard + fullscreen behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +11
/run/wrappers/bin/sudo mkdir -p /bin
/run/wrappers/bin/sudo ln -sf ${pkgs.bash}/bin/bash /bin/bash
/run/wrappers/bin/sudo ln -sf ${pkgs.fish}/bin/fish /bin/fish
/run/wrappers/bin/sudo ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

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

home.activation.binShells hard-codes /run/wrappers/bin/sudo and writes to /bin. This will fail for this repo’s homeConfigurations on generic Linux (e.g. Ubuntu) and for users without that NixOS wrapper path. Consider gating this to NixOS-only, and/or resolving an elevated command dynamically (sudo/doas/root) like the existing root-helper pattern in home-manager/modules/tailscale/default.nix, while also respecting $DRY_RUN_CMD to avoid mutating the system during dry runs.

Suggested change
/run/wrappers/bin/sudo mkdir -p /bin
/run/wrappers/bin/sudo ln -sf ${pkgs.bash}/bin/bash /bin/bash
/run/wrappers/bin/sudo ln -sf ${pkgs.fish}/bin/fish /bin/fish
/run/wrappers/bin/sudo ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh
ROOT_CMD="''${DRY_RUN_CMD:-}"
# If no dry-run command is set, choose an appropriate root helper.
if [ -z "$ROOT_CMD" ]; then
if [ "$(id -u)" -eq 0 ]; then
ROOT_CMD=""
elif command -v sudo >/dev/null 2>&1; then
ROOT_CMD="sudo"
elif command -v doas >/dev/null 2>&1; then
ROOT_CMD="doas"
else
echo "binShells activation: need sudo or doas (or run as root) to manage /bin shell links" >&2
exit 1
fi
fi
''${ROOT_CMD} mkdir -p /bin
''${ROOT_CMD} ln -sf ${pkgs.bash}/bin/bash /bin/bash
''${ROOT_CMD} ln -sf ${pkgs.fish}/bin/fish /bin/fish
''${ROOT_CMD} ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +7
{ lib, pkgs, ... }:
let
inherit (pkgs.stdenv) isLinux;
in
{
config = lib.mkIf isLinux {
home.activation.binShells = lib.hm.dag.entryAfter [ "writeBoundary" ] ''

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

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

This activation entry uses lib.hm.dag.entryAfter, but the other home-manager modules in this repo consistently use config.lib.dag.entryAfter. Aligning with that pattern avoids surprises and keeps the module interface consistent (also add config to the arg set if you switch).

Suggested change
{ lib, pkgs, ... }:
let
inherit (pkgs.stdenv) isLinux;
in
{
config = lib.mkIf isLinux {
home.activation.binShells = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
{ config, lib, pkgs, ... }:
let
inherit (pkgs.stdenv) isLinux;
in
{
config = lib.mkIf isLinux {
home.activation.binShells = config.lib.dag.entryAfter [ "writeBoundary" ] ''

Copilot uses AI. Check for mistakes.
@mesa-dot-dev

mesa-dot-dev Bot commented Feb 13, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Improved Hyprland keybindings and window management, fixed fullscreen overlap and clipboard persistence, and added /bin shell symlinks for NixOS compatibility.

What changed?

  • config/hyprland/hyprland.conf: Removed clipse clipboard manager and its settings; refined keybindings including changing fullscreen toggle to maximize mode, reassigning $mod SHIFT, H/L to move windows between relative workspaces, and updating hyprlock keybinding to CTRL ALT SHIFT SUPER, L.
  • home-manager/modules/bin-shells/default.nix: New Home Manager module added to create /bin directory and symlink bash, fish, and zsh from their Nix store paths.
  • home-manager/modules/default.nix: Imports the new ./bin-shells module.
  • home-manager/modules/xremap/default.nix: xremap configuration updated to exclude 'l' from the letters list, allowing Hyper+L to pass through for a Hyprland lock screen bind.

Description generated by Mesa. Update settings

…board

- Change movewindow h/l to movetoworkspace r-1/r+1 for cross-workspace movement
- Move lock screen from Super+Shift+L to Framework+L to avoid conflict
- Exclude "l" from xremap so Framework+L passes through as Hyper
- Switch fullscreen toggle to maximize mode (fullscreen 1) to fix Chrome panel overlap
- Remove clipse clipboard manager in favor of cliphist only
- Add /bin/{bash,fish,zsh} symlinks via home-manager activation for script compatibility
@shunkakinoki
shunkakinoki force-pushed the feat/hyprland-keybinds-and-shell-compat branch from a36321a to e3ef43d Compare February 13, 2026 22:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@home-manager/modules/bin-shells/default.nix`:
- Around line 15-17: The current activation step aborts the entire home-manager
activation by calling exit 1 in the branch that checks elif [ "$(id -u)" -ne 0
]; instead log the warning ("Creating /bin shell symlinks requires root
privileges, but sudo is not available.") to stderr and replace exit 1 with a
return so only this activation entry is skipped; update the conditional branch
that performs the /bin symlink creation to return after logging when not root
and sudo is unavailable.

Comment on lines +15 to +17
elif [ "$(id -u)" -ne 0 ]; then
echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

exit 1 aborts the entire home-manager activation, not just this step.

If sudo isn't available and the user isn't root, exit 1 will halt all remaining activation entries (config writes, service restarts, etc.). For a non-critical convenience feature like /bin symlinks, prefer logging a warning and continuing.

Proposed fix
       elif [ "$(id -u)" -ne 0 ]; then
         echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
-        exit 1
+        return 0
       fi

Note: home-manager activation entries are wrapped in functions, so return is valid here and will skip only this activation step.

📝 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
elif [ "$(id -u)" -ne 0 ]; then
echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
exit 1
elif [ "$(id -u)" -ne 0 ]; then
echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2
return 0
🤖 Prompt for AI Agents
In `@home-manager/modules/bin-shells/default.nix` around lines 15 - 17, The
current activation step aborts the entire home-manager activation by calling
exit 1 in the branch that checks elif [ "$(id -u)" -ne 0 ]; instead log the
warning ("Creating /bin shell symlinks requires root privileges, but sudo is not
available.") to stderr and replace exit 1 with a return so only this activation
entry is skipped; update the conditional branch that performs the /bin symlink
creation to return after logging when not root and sudo is unavailable.

@shunkakinoki
shunkakinoki merged commit 9bd51ac into main Feb 14, 2026
31 of 33 checks passed
@shunkakinoki
shunkakinoki deleted the feat/hyprland-keybinds-and-shell-compat branch February 14, 2026 23:11
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