diff options
author | EuAndreh <eu@euandre.org> | 2022-11-27 08:39:05 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-27 08:42:08 -0300 |
commit | 4aecd68aa556472e76f9d083cebd3907a2262be8 (patch) | |
tree | dc83df81d56db702a2631dc5b88730971bcd95fb | |
parent | src/infrastructure/ssh.conf: Enable persistent SSH connections (diff) | |
download | toph-4aecd68aa556472e76f9d083cebd3907a2262be8.tar.gz toph-4aecd68aa556472e76f9d083cebd3907a2262be8.tar.xz |
src/infrastructure/guix/system.scm: WIP setup Prosody auth via SASL
-rw-r--r-- | src/infrastructure/guix/system.scm | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/src/infrastructure/guix/system.scm b/src/infrastructure/guix/system.scm index 43589a8..be67fde 100644 --- a/src/infrastructure/guix/system.scm +++ b/src/infrastructure/guix/system.scm @@ -19,11 +19,13 @@ (guix build-system gnu) (guix build-system trivial) (guix download) + (guix git-download) (guix packages) (guix records) (guix utils) (xyz euandreh queue)) (use-package-modules + lua web) (use-service-modules certbot @@ -597,6 +599,47 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-public lua-cyrussasl + (package + (name "lua-cyrussasl") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/JorjBauer/lua-cyrussasl") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14kzm3vk96k2i1m9f5zvpvq4pnzaf7s91h5g4h4x2bq1mynzw2s1")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" %output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) + (inputs + (list cyrus-sasl + git-minimal + lua)) + (home-page "https://github.com/JorjBauer/lua-cyrussasl") + (synopsis " Cyrus SASL library for Lua 5.1+") + (description + #"- + Bugs: + + @itemize + @item Prompts aren't implemented in the client functions. + @item Server/Client first is essentially hard-coded (it's server-first). + @item It's not clear that encode/decode are useful as + implemented (and tests do not cover encode/decode). + @end itemize"#) + (license license:bsd-1))) (define-record-type* <cyrus-service-configuration> cyrus-service-configuration @@ -1683,7 +1726,8 @@ dkimproxy prosody cgit)) - (list (script "rc" rc.sh) + (list ;; lua-cyrussasl + (script "rc" rc.sh) (script "backup" backup.sh) (script "cronjob" cronjob.sh) (script "reconfigure" reconfigure.sh) @@ -1792,7 +1836,7 @@ (c2s-require-encryption? #t) (s2s-require-encryption? #t) (s2s-secure-auth? #t) - (authentication "internal_hashed") + (authentication "cyrus") (virtualhosts (list (virtualhost-configuration @@ -1832,7 +1876,9 @@ (services (list (cyrus-service-configuration - (name "smtpd.conf")))))) + (name "smtpd.conf")) + (cyrus-service-configuration + (name "prosody.conf")))))) (service postfix-service-type (postfix-configuration (main.cf-extra |