services: fail2ban: Extend profile with fail2ban package.

* gnu/services/security.scm (fail2ban-service-type): Register
profile-service-type extension.

Change-Id: Ia7d908ba68c82fb7b5f016d4d246112679c49415
This commit is contained in:
Maxim Cournoyer 2025-09-23 21:30:37 +09:00
parent 6a57156e97
commit 7d10553db7
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -378,13 +378,17 @@ provided as a list of file-like objects."))
(service-type (name 'fail2ban)
(extensions
(list (service-extension shepherd-root-service-type
fail2ban-shepherd-service)))
fail2ban-shepherd-service)
;; For the fail2ban-client and fail2ban-regex commands.
(service-extension
profile-service-type
(compose list fail2ban-configuration-fail2ban))))
(compose concatenate)
(extend (lambda (config jails)
(fail2ban-configuration
(inherit config)
(jails (append (fail2ban-configuration-jails config)
jails)))))
(inherit config)
(jails (append (fail2ban-configuration-jails config)
jails)))))
(default-value (fail2ban-configuration))
(description "Run the fail2ban server.")))