Moved aws account to aws-service-type

master
noah metz 2023-12-04 01:00:47 -07:00
parent 425b1738c9
commit 0b4cedc5b7
1 changed files with 13 additions and 0 deletions

@ -5,6 +5,8 @@
#:use-module (guix modules)
#:use-module (gnu services shepherd)
#:use-module (gnu packages certs)
#:use-module (gnu packages shells)
#:use-module (gnu system shadow)
#:use-module (guix build download)
#:export (aws-service-type))
@ -79,12 +81,23 @@
(respawn? #t)
(start #~(make-forkexec-constructor (list #$aws-pubkey-prog))))))
(define (aws-account-service config)
(list (user-group
(system? #t)
(name "aws"))
(user-account
(name "aws")
(group "aws")
(password (crypt "aws" "$6$change"))
(shell (file-append zsh "/bin/zsh")))))
(define-public aws-service-type
(service-type (name 'aws)
(description "AWS public key service")
(extensions (list (service-extension profile-service-type
(lambda (val)
val))
(service-extension account-service-type aws-account-service)
(service-extension
shepherd-root-service-type
aws-pubkey-service)))