style: split doas-service in thematic services

pull/1/head
anemofilia 2023-09-24 10:25:01 -03:00
parent 66c0dcc480
commit a09a647e7f
No known key found for this signature in database
GPG Key ID: 5A8F3D62C87A2B33
1 changed files with 32 additions and 34 deletions

View File

@ -241,36 +241,34 @@
(respawn? #f)))
#|Doas configuration services|#
(service doas-service-type
(append #|Miscellaneous|#
(simple-service 'miscellaneous-permissions doas-service-type
(list (permit (identity ":wheel")
(setenv `("GUILE_LOAD_PATH")))
(permit (identity ":wheel")
(nopass? #t)
(command "guix")
(args `("pull")))
(permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args `("status"
"detailed-status"))))
#|Text editors|#
(args `("pull")))))
(simple-service 'text-editors-permissions doas-service-type
(map (lambda (cmd)
(permit (identity ":wheel")
(keepenv? #t)
(command cmd)))
`("kak" "emacsclient"))
#|Power management|#
`("kak" "emacsclient")))
(simple-service 'power-management-permissions doas-service-type
(map (lambda (cmd)
(permit (identity ":wheel")
(nopass? #t)
(command cmd)
(args '())))
`("zzz" "halt" "reboot"))
#|Service management|#
`("zzz" "halt" "reboot")))
(simple-service 'shepherd-status-permissions doas-service-type
(map (lambda (arglist)
(permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args (list arg))))
`("status" "detailed-status")))
(simple-service 'service-management-permissions doas-service-type
(flatmap (lambda (service action)
(permit (identity ":wheel")
(nopass? #t)
@ -279,7 +277,7 @@
`("tlp" "tor" "thermald" "thinkfan"
"wpa-supplicant")
`("doc" "stop" "start" "enable"
"status" "restart" "disable"))))
"status" "restart" "disable")))
#|Special file services|#
(service special-files-service-type