diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d24f42c Binary files /dev/null and b/.DS_Store differ diff --git a/bin/winapps b/bin/winapps index fc90efa..306890b 100755 --- a/bin/winapps +++ b/bin/winapps @@ -301,9 +301,10 @@ function waGetFreeRDPCommand() { function waCheckGroupMembership() { # Identify groups the current user belongs to. # shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment. - local USER_GROUPS=$(groups "$(whoami)") + local USER_GROUPS=$(id -nG "$(whoami)") - if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirt\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then + if ! echo "$USER_GROUPS" | grep -qE '\b(libvirt|libvirtd)\b' || \ + ! echo "$USER_GROUPS" | grep -qE '\bkvm\b'; then waThrowExit "$EC_NOT_IN_GROUP" fi } diff --git a/docs/libvirt.md b/docs/libvirt.md index d32ef37..1b41038 100644 --- a/docs/libvirt.md +++ b/docs/libvirt.md @@ -46,6 +46,8 @@ Together, these components form a powerful and flexible virtualization stack, wi sudo reboot # Reboot the system to ensure the user is added to the relevant groups. ``` + Note: On NixOS, the group name for libvirt is `libvirtd` and not `libvirt`. In addition, user and group management on NixOS is handled through the Nix configuration files and not via traditional tools like `usermod`. Please see "Adding User to a group" on [this NixOS Wiki page](https://wiki.nixos.org/wiki/User_management). + Note: Due to a known bug in `rpm-ostree`, which affects various distributions such as Silverblue, Bazzite, Bluefin, Kinoite, Aurora, UCore, and others, the commands provided earlier may not properly add your user to all required groups. If the `groups $USER` command does not show your user as being part of the necessary groups, you'll need to manually add these groups to `/etc/group` if they are present in `/usr/lib/group`. To resolve this: diff --git a/packages/.DS_Store b/packages/.DS_Store new file mode 100644 index 0000000..b6729e2 Binary files /dev/null and b/packages/.DS_Store differ diff --git a/packages/winapps/.DS_Store b/packages/winapps/.DS_Store new file mode 100644 index 0000000..0539676 Binary files /dev/null and b/packages/winapps/.DS_Store differ diff --git a/packages/winapps/default.nix b/packages/winapps/default.nix index 75b7b64..8a48b25 100644 --- a/packages/winapps/default.nix +++ b/packages/winapps/default.nix @@ -37,7 +37,6 @@ stdenv.mkDerivation rec { ]; patches = [ - ./winapps.patch ./setup.patch ]; diff --git a/packages/winapps/winapps.patch b/packages/winapps/winapps.patch deleted file mode 100644 index 478d0ac..0000000 --- a/packages/winapps/winapps.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/bin/winapps -+++ b/bin/winapps -@@ -295,7 +295,7 @@ function waCheckGroupMembership() { - # shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment. - local USER_GROUPS=$(groups "$(whoami)") - -- if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirt\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then -+ if ! (echo "$USER_GROUPS" | grep -q -E "\blibvirtd\b") || ! (echo "$USER_GROUPS" | grep -q -E "\bkvm\b"); then - waThrowExit "$EC_NOT_IN_GROUP" - fi - }