-
Notifications
You must be signed in to change notification settings - Fork 0
feat: improve Hyprland keybindings, add /bin shell symlinks, fix clipboard #799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||||||||||
| { lib, pkgs, ... }: | ||||||||||||||
| let | ||||||||||||||
| inherit (pkgs.stdenv) isLinux; | ||||||||||||||
| in | ||||||||||||||
| { | ||||||||||||||
| config = lib.mkIf isLinux { | ||||||||||||||
| home.activation.binShells = lib.hm.dag.entryAfter [ "writeBoundary" ] '' | ||||||||||||||
| SUDO_CMD="" | ||||||||||||||
| if command -v sudo >/dev/null 2>&1; then | ||||||||||||||
| SUDO_CMD="sudo" | ||||||||||||||
| elif [ -x /run/wrappers/bin/sudo ]; then | ||||||||||||||
| SUDO_CMD="/run/wrappers/bin/sudo" | ||||||||||||||
| elif [ -x /usr/bin/sudo ]; then | ||||||||||||||
| SUDO_CMD="/usr/bin/sudo" | ||||||||||||||
| elif [ "$(id -u)" -ne 0 ]; then | ||||||||||||||
| echo "Creating /bin shell symlinks requires root privileges, but sudo is not available." >&2 | ||||||||||||||
| exit 1 | ||||||||||||||
|
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If sudo isn't available and the user isn't root, 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
fiNote: home-manager activation entries are wrapped in functions, so 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| fi | ||||||||||||||
|
|
||||||||||||||
| run_root_cmd() { | ||||||||||||||
| if [ -n "$SUDO_CMD" ]; then | ||||||||||||||
| ''${DRY_RUN_CMD:-} "$SUDO_CMD" "$@" | ||||||||||||||
| else | ||||||||||||||
| ''${DRY_RUN_CMD:-} "$@" | ||||||||||||||
| fi | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| run_root_cmd mkdir -p /bin | ||||||||||||||
| run_root_cmd ln -sf ${pkgs.bash}/bin/bash /bin/bash | ||||||||||||||
| run_root_cmd ln -sf ${pkgs.fish}/bin/fish /bin/fish | ||||||||||||||
| run_root_cmd ln -sf ${pkgs.zsh}/bin/zsh /bin/zsh | ||||||||||||||
| ''; | ||||||||||||||
|
Comment on lines
+7
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This activation runs 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 ( 🤖 Prompt for AI Agents |
||||||||||||||
| }; | ||||||||||||||
| } | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| [ | ||
| ./bin-shells | ||
| ./cargo-globals | ||
| ./openclaw | ||
| ./local-binaries | ||
|
|
||
There was a problem hiding this comment.
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 useconfig.lib.dag.entryAfter. Aligning with that pattern avoids surprises and keeps the module interface consistent (also addconfigto the arg set if you switch).