[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: hydra: overdrive: Allow un-authenticated sudo to wheel group.
From: |
Maxim Cournoyer |
Subject: |
04/06: hydra: overdrive: Allow un-authenticated sudo to wheel group. |
Date: |
Sun, 25 Sep 2022 22:29:10 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository maintenance.
commit 8cd6fbee6d59f65c0099020f35a9f05dd59b7511
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Sep 23 14:15:15 2022 -0400
hydra: overdrive: Allow un-authenticated sudo to wheel group.
This enables reconfiguring the overdrive machines via 'guix deploy'.
* hydra/modules/sysadmin/overdrive.scm (overdrive-system)
[sudoers-file]: New field.
---
hydra/modules/sysadmin/overdrive.scm | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/hydra/modules/sysadmin/overdrive.scm
b/hydra/modules/sysadmin/overdrive.scm
index 43ad9dc..a74fea7 100644
--- a/hydra/modules/sysadmin/overdrive.scm
+++ b/hydra/modules/sysadmin/overdrive.scm
@@ -30,6 +30,8 @@
#:use-module (gnu services mcron)
#:use-module (gnu services ssh)
#:use-module (gnu services vpn)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
#:use-module ((sysadmin services) #:select (berlin-wireguard-peer))
#:export (overdrive-system))
@@ -167,4 +169,16 @@
'("--max-jobs=2" "--cores=3")))))))
(packages (cons* btrfs-progs screen openssh strace nss-certs
- %base-packages))))
+ %base-packages))
+
+ ;; Allow sysadmins (sudoers) to use 'sudo' without a password so
+ ;; they can 'guix deploy' these machines as their own user.
+ (sudoers-file
+ (plain-file "sudoers"
+ (string-join
+ (append (remove (cut string-prefix? "%wheel" <>)
+ (string-split
+ (string-trim-right (plain-file-content
+ %sudoers-specification))
+ #\newline))
+ (list "%wheel ALL = NOPASSWD: ALL\n")) "\n")))))
- branch master updated (af6d488 -> 9971141), Maxim Cournoyer, 2022/09/25
- 04/06: hydra: overdrive: Allow un-authenticated sudo to wheel group.,
Maxim Cournoyer <=
- 05/06: hydra: Turn overdrive1 config into a deployable machine config., Maxim Cournoyer, 2022/09/25
- 02/06: hydra: overdrive: Enable Btrfs compression., Maxim Cournoyer, 2022/09/25
- 06/06: hydra: overdrive: Use ZRAM., Maxim Cournoyer, 2022/09/25
- 03/06: hydra: build-machines: Enable non-authenticated sudo by group., Maxim Cournoyer, 2022/09/25
- 01/06: hydra: Adjust Btrfs balance jobs., Maxim Cournoyer, 2022/09/25