diff --git a/metznet/aws.scm b/metznet/aws.scm index 1b04457..c77fa08 100644 --- a/metznet/aws.scm +++ b/metznet/aws.scm @@ -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)))