zero/operating-systems/buer/rules.scm

50 lines
1.7 KiB
Scheme
Raw Normal View History

(define-module (buer rules)
#:use-module (radix services admin)
#:use-module (radix utils)
#:export (general
text-editors
power-management
service-management))
(define general
(list (permit (identity ":wheel")
(setenv
`(("GUILE_LOAD_PATH" . #t)
("GUILE_LOAD_COMPILED_PATH" . #t)
("TERM" . "linux"))))))
(define text-editors
(map (lambda (cmd)
(permit (identity ":wheel")
(keepenv? #t)
(command cmd)))
`("kak" "emacsclient")))
(define power-management
(map (lambda (cmd)
(permit (identity ":wheel")
(nopass? #t)
(command cmd)
(args '())))
`("zzz" "halt" "reboot")))
(define service-management
(append (map (lambda (action)
(permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args (list action))))
`("status" "detailed-status"))
(list (permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args (list "trigger" "snapshot-@home"))))
(flat-map (lambda (service action)
(permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args (map symbol->string
(list action service)))))
'(networking wpa-supplicant)
'(doc stop start enable status restart disable))))