From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AKKtMgALdWRQvQAASxT56A (envelope-from ) for ; Mon, 29 May 2023 22:28:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mEbMMQALdWRbVwAAG6o9tA (envelope-from ) for ; Mon, 29 May 2023 22:28:48 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6F6C63A37E for ; Mon, 29 May 2023 22:28:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3jTR-0002PR-Fk; Mon, 29 May 2023 16:28:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3jTQ-0002PG-GN for help-guix@gnu.org; Mon, 29 May 2023 16:28:12 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3jTO-0007bZ-GA for help-guix@gnu.org; Mon, 29 May 2023 16:28:12 -0400 X-GND-Sasl: contact@robbyzambito.me Received: by mail.gandi.net (Postfix) with ESMTPSA id 92907240007 for ; Mon, 29 May 2023 20:28:05 +0000 (UTC) User-agent: mu4e 1.10.2; emacs 28.2 From: Robby Zambito To: help-guix Subject: Adding PolicyKit actions Date: Mon, 29 May 2023 16:27:11 -0400 Message-ID: <87edmyhoh9.fsf@robbyzambito.me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=contact@robbyzambito.me; helo=relay1-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685392128; a=rsa-sha256; cv=none; b=Q6z0TmJmWZx6SGeBQYkUYci8LwZIPtDx8/JhDzFxgALcgVcd6JuI8w5C2v3f4Lrd7poPzs 3P8EWZM21tGtTua37T2v2cJ/8UiLdKs97w4y9E4C2NNjev+Q3i9YaEdQVo4F1VoEgZFx5Q H6b9l6aGFEBIVrBencX4NqqwH20RwgIMpDAXOF6PhMZlDFA1vM2CWbHhsAaaWvJQnc0EgI eE8yFeenvIzhTuKYXLNtyWkGl6ywqQAa853yL673kHZXGVZ94HBxrEBquh+x2hTcnFRf8e ZcnGDi9/PXJ6RV3mKVbRmexdDr7AyOCr7p1KhW1XluNGPfc+FoFt++Rh8l81IA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685392128; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=PBFCHer6Re9ORcO4+xpk50F++FcikSJC+9x/5h4OzPY=; b=LJx1yEOV3ZguV40gVau8rO6eBa/yTEeIkBg8Lr/9Z8nOYsNWk1s7E5DMi4xQtQTkFu7fdD W5UQJ8Th4psdya6vzuiZJWZMZfkUiFkuel3/QP8mlaTRrdL+EqB3Li+YdsEj2ET+KCLaDT p0PN26YDwWcEXMkqtRxhoEImdw69WEPZrC0z9WxDZBwDlrACDWAorSk828ItMrHgBfcvbT 74629PBc849743JWV3qcN5bOf1HifJ/NcMhfFTEv4zwppzE/N5enaT702aksIObclyxPgl 6CLH+zVVj/2NkZqC7VI7T8yImzOOvtTsjtYTNQxqpfanNGcHwdbs9nSN2H9z4A== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.04 X-Spam-Score: -3.04 X-Migadu-Queue-Id: 6F6C63A37E X-TUID: cjawXhUrQDt6 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" " The Spice Project http://spice-space.org/ spice Low level USB device access Privileges are required for low level USB device access (for usb device pass through). yes no yes "))))) ``` 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 # ?) 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