* Adding PolicyKit actions
@ 2023-05-29 20:27 Robby Zambito
2023-05-29 22:09 ` Felix Lechner via
2023-05-30 18:21 ` Robby Zambito
0 siblings, 2 replies; 4+ messages in thread
From: Robby Zambito @ 2023-05-29 20:27 UTC (permalink / raw)
To: help-guix
Hello,
The root issue I am trying to solve right now is allowing USB
redirection to virtual machines. I've tracked down a promising solution
here: https://serverfault.com/a/1073230 which involves adding a new
PolicyKit action for low level USB access. Digging into the Guix source
I was able to find the definition of polkit-configuration (the manual
merely mentions that it exists; I may be able to help write more
documentation here if I figure this out :) ) and I'm hitting a wall
trying to figure out what I am doing wrong.
Here is the configuration I have added to my polkit-service in my system
configuration:
```
(service polkit-service-type
(polkit-configuration
(actions (list
(plain-file "org.spice-space.lowlevelusbaccess.policy"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE policyconfig PUBLIC
\"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN\"
\"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd\">
<policyconfig>
<vendor>The Spice Project</vendor>
<vendor_url>http://spice-space.org/</vendor_url>
<icon_name>spice</icon_name>
<action id=\"org.spice-space.lowlevelusbaccess\">
<description>Low level USB device access</description>
<message>Privileges are required for low level USB device access (for usb device pass through).</message>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
</policyconfig>")))))
```
Looking at the code it looks like `polkit-configuration` has an
`actions` field that should be a list of file-like objects, which I
think is what my code should be doing.
However, I get this error when I build my system:
```
Backtrace:
5 (primitive-load "/gnu/store/avr2qvlgydsvny8dkjl5mvjc0b6?")
In guix/build/union.scm:
192:6 4 (union-of-directories "/gnu/store/dikmqs3qk5x4v5lhz417?" ?)
In srfi/srfi-1.scm:
634:9 3 (for-each #<procedure 7ffff77dc6a0 at guix/build/union?> ?)
In guix/build/union.scm:
194:28 2 (_ "/gnu/store/hvq9rhwkslc9kqhyjaa6mzb61i069jyd-lowleve?")
56:13 1 (files-in-directory "/gnu/store/hvq9rhwkslc9kqhyjaa6mzb?")
In unknown file:
0 (opendir "/gnu/store/hvq9rhwkslc9kqhyjaa6mzb61i069jyd-l?")
ERROR: In procedure opendir:
In procedure opendir: Not a directory
```
Not very helpful to me :/
Any help would be appreciated!
Thanks,
Robby
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-31 11:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 20:27 Adding PolicyKit actions Robby Zambito
2023-05-29 22:09 ` Felix Lechner via
2023-05-29 22:19 ` Robby Zambito
2023-05-30 18:21 ` Robby Zambito
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.