Skip to content

Commit

Permalink
feat: add alternative priv escalation
Browse files Browse the repository at this point in the history
  • Loading branch information
Liassica committed Aug 18, 2024
1 parent c34f93a commit 294b97f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nix/package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ writeShellScriptBin "glim" ''
exit 1
fi
# Use alternative if sudo is not found
if [[ ! `which sudo &>/dev/null` ]]; then
if which doas &>/dev/null; then
alias sudo=doas
else
sudo () {
su -c "$*"
}
fi
fi
# Find GLIM device (use the first if multiple found, you've asked for trouble!)
USBDEV1=`blkid -L GLIM | head -n 1`
Expand Down

0 comments on commit 294b97f

Please sign in to comment.