integrate libvirtd group support + document in install guide + remove NixOS patch

This commit is contained in:
Rohan Barar
2025-08-02 22:41:32 +10:00
parent 88f1e4e96e
commit c25ea7c2fc
7 changed files with 5 additions and 14 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

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

View File

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

BIN
packages/.DS_Store vendored Normal file

Binary file not shown.

BIN
packages/winapps/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -37,7 +37,6 @@ stdenv.mkDerivation rec {
];
patches = [
./winapps.patch
./setup.patch
];

View File

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