]> git.ekhem.eu.org Git - guix.git/commitdiff
[system] Add passwordless sudo for guix system reconfigure.
authorJakub Czajka <jakub@ekhem.eu.org>
Sun, 21 Jun 2026 22:03:46 +0000 (00:03 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Wed, 24 Jun 2026 22:53:20 +0000 (00:53 +0200)
Allow AI agents to build the system without asking for password.

Co-Authored-By: Claude <noreply@anthropic.com>
system.scm

index c25220d1e917f9d2098e97e2b3907335e5dc5c75..21e2755ee8f02edd264ef5019bff27758a2e754d 100644 (file)
                        (cons* (setuid-program (program xsecurelock-auth))
                               %setuid-programs)))
 
+    (sudoers-file (let ((content (string-append "root ALL=(ALL) ALL\n"
+                                  "%wheel ALL=(ALL) ALL\n"
+                                  "dak ALL=(ALL) NOPASSWD: "
+                                  "/run/current-system/profile/bin/guix "
+                                  "system reconfigure *\n")))
+                    (plain-file "sudoers" content)))
+
     (packages (append (list gnu-make bluez pulseaudio volume)
                       dwm-desktop-packages %base-packages))