diff options
author | EuAndreh <eu@euandre.org> | 2022-11-27 08:22:05 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-27 08:22:05 -0300 |
commit | 7f6d830c511b09f0f2b42b55f38dd9c6e0ef44ac (patch) | |
tree | b6c312f55481c11d57dd2cb1d4c63649132fe664 /src/infrastructure/guix/system.scm | |
parent | src/infrastructure/guix/system.scm: Disable verbose mode of smtpd processes (diff) | |
download | toph-7f6d830c511b09f0f2b42b55f38dd9c6e0ef44ac.tar.gz toph-7f6d830c511b09f0f2b42b55f38dd9c6e0ef44ac.tar.xz |
src/infrastructure/: Settle on euandre.org as host-name
Diffstat (limited to 'src/infrastructure/guix/system.scm')
-rw-r--r-- | src/infrastructure/guix/system.scm | 57 |
1 files changed, 11 insertions, 46 deletions
diff --git a/src/infrastructure/guix/system.scm b/src/infrastructure/guix/system.scm index de77ab5..43589a8 100644 --- a/src/infrastructure/guix/system.scm +++ b/src/infrastructure/guix/system.scm @@ -1165,17 +1165,6 @@ `(,alias "root")) root-aliases))) -(define (postfix-certificates config) - (match-record config <postfix-configuration> - (hostname) - (list - (certificate-configuration - (domains (list hostname)) - (deploy-hook - (program-file - "postfix-certbot-deploy-hook" - #~(with-shepherd-action 'postfix ('reload) result result))))))) - (define postfix-service-type (service-type (name 'postfix) @@ -1191,8 +1180,6 @@ postfix-activation) (service-extension mail-aliases-service-type postfix-aliases) - (service-extension certbot-service-type - postfix-certificates) (service-extension profile-service-type (compose list postfix-configuration-postfix)) (service-extension shepherd-root-service-type @@ -1426,20 +1413,6 @@ #$config-file "reload"))))))))))) -(define (dovecot2-certificates config) - (match-record config <dovecot2-configuration> - (config-name hostname) - (list - (certificate-configuration - (domains (list hostname)) - (deploy-hook - (program-file - "dovecot2-certbot-deploy-hook" - #~(invoke #$(file-append dovecot "/bin/doveadm") - "-c" - (string-append "/etc/dovecot2/" #$config-name) - "reload"))))))) - (define dovecot2-service-type (service-type (name 'dovecot2) @@ -1451,8 +1424,6 @@ dovecot2-accounts) (service-extension activation-service-type dovecot2-activation) - (service-extension certbot-service-type - dovecot2-certificates) (service-extension profile-service-type (compose list dovecot2-configuration-dovecot2)) (service-extension shepherd-root-service-type @@ -1644,11 +1615,10 @@ -(define host-name "toph") -(define tld "arrobaponto.org") -(define mail.tld (string-append "mail." tld)) +(define tld "euandre.org") (define whoami "andreh") (define me "eu") +(define public-me (format #f "~a@~a" me whoami)) (define gitconfig (plain-file "gitconfig" (format #f #"- [init] @@ -1659,13 +1629,13 @@ [advice] detachedHead = false "# - host-name - host-name))) + tld + tld))) (operating-system (locale "fr_FR.UTF-8") (timezone "America/Sao_Paulo") - (host-name host-name) + (host-name tld) (users (append (list @@ -1818,8 +1788,7 @@ '("groups" "mam") %default-modules-enabled)) (admins - (list - (format #f "~a@~a" me whoami))) + (list public-me)) (c2s-require-encryption? #t) (s2s-require-encryption? #t) (s2s-secure-auth? #t) @@ -1838,19 +1807,17 @@ (public-key "Mhv8KxB/QXQpNKNtqD57PoFv43TXJ1lg52PJd6TmtwI=") (allowed-ips '("10.0.0.0/24")) (keep-alive 25)))))) - (service dovecot2-service-type - (dovecot2-configuration - (hostname mail.tld))) + (service dovecot2-service-type) (service certbot-service-type (certbot-configuration - (email "eu@euandre.org") + (email public-me) (certificates (list (certificate-configuration (domains (list tld)) (deploy-hook (program-file - "prosody-certbot-deploy-hook" + (string-append tld "-deploy-hook") #~(begin (format (current-error-port) "Importing new TLS certificates for \"~a\" to Prosody via prosodyctl(8).~%" @@ -1868,15 +1835,13 @@ (name "smtpd.conf")))))) (service postfix-service-type (postfix-configuration - (hostname mail.tld) (main.cf-extra (format #f #"- - canonical_maps = inline:{ ~a=~a@~a } + canonical_maps = inline:{ ~a=~a } "# whoami - me - tld)))) + public-me)))) (service mail-aliases-service-type `(("root" ,whoami) (,me ,whoami))) |