Closed kamidon closed 6 years ago
@xeji , mentioning you on this issue since it looks like you made the most recent changes to the spice-gtk
package and I'm hoping you might have some context on what is required to fix the problem.
The polkitdir path change was done by me in 82f626702314928c9c8f4ea309430e3aa0680d57, for make-based projects, using $(out)
in the variable is acceptable solution (did the same e.g. in fe21f168572e7033257ddd83605a417ad3fa8954).
The path should be linked correctly with security.polkit.enable = true;
.
I if is not, spice-gtk
is probably not listed in systemPackages
, maybe we need to add it to gnome-boxes
’s propagatedUserEnvPkgs
.
Thanks for the quick response @jtojnar! I did have security.polkit.enable = true;
and I thought I had tried adding spice-gtk
directly to systemPackages
and that it hadn't worked. But, I must have done it while there was still some other problem in my override because when I added it directly to systemPackages
now the file was symlinked into /run/current-system/sw/share/polkit-1/actions
. Thanks for prompting me to try again.
As soon as I have enough time I'll try adding spice-gtk
to gnome-box
's propagatedUserEnvPkgs
and if that works I'll post a PR with a patch with those changes.
PR is here: https://github.com/NixOS/nixpkgs/pull/39133
In the NixOS community is the general practice to keep bugs open until the channel updates and they can be verified in the release or just close them once the commit has been merged? I'm fine with either in this case, just want to align what I do with the community.
They're usually closed when the pull request is merged.
Closing since the fix has been merged.
seems this problem is still here. my current setup is unstable and got absolutely the same problem with the same error message in error log
forgot to mention... i'm running on the kernel 5.8. everything else is the default from the unstable channel
i'm still having this issue with virt-manager, i have virtualisation.libvirtd.enable = true;
and virt-manager is installed via home-manager, is that perhaps an issue ?
Yes, you need to install the package through environment.systemPackages
for polkit rules to be picked up. Polkit rules allow you to grant privileged access so installing them through home manager would be insecure.
You should use virtualisation.spiceUSBRedirection.enable = true
in your NixOS config, which will install spice-gtk
polkit rules globally and create a suid helper.
Issue description
I'm trying to use USB redirection in gnome-boxes to attach a host device to a VM. When I do that gnome-boxes indicates that USB redirection has failed and I see the following messages in the system log:
Steps to reproduce
journalctl -b SYSLOG_IDENTIFIER=org.gnome.Boxes
to see the error output above.Technical details
Output of
nix-shell -p nix-info --run "nix-info -m"
:I did some digging and tried to solve this myself but get stuck. The immediate problem appeared to be that the required PolicyKit action file isn't available. It appeared to be provided by the
spice-gtk
. Inspecting the log for the current hydra build of that package seems to show it wasn't being installed into the store path correctly:Notice that the polkit file seems to be installed locally in the build directory instead of into a store path.
I tried working around this with the following overlay:
which did result in the file being written where I think it should be:
What I thought should happen at this point is that the following statement from the
polkit
NixOS module should cause this file to be linked into/run/current-system/sw/share/polkit-1/actions
whennixos-rebuild switch
is run:However, this is not happening:
I have tried to trace through how the linking is done but I've gotten lost and haven't been able to figure it out. I'd greatly appreciate help!