lib.modules
lib.modules:
Section titled “lib.modules:”lib.modules.mkService
Section titled “lib.modules.mkService”A module declaring a garden service and its defaults, for a service module’s imports. The defaults are mkOptionDefault, so anything a host sets wins, and they hold while the service is disabled.
Arguments
Section titled “Arguments”- [name]: The name of the service
- [defaults]: Its defaults, e.g.
{ port = 3033; }
mkService :: String -> AttrSet -> Modulelib.modules.mkSecret
Section titled “lib.modules.mkSecret”Create a sops.secrets entry for a file in secrets/services/.
Arguments
Section titled “Arguments”- [file] the name of the sops file, without
secrets/services/or.yaml - every other attribute (
key,owner,mode, …) is passed through tosops.secrets.<name>unchanged
mkSecret :: { file :: String, ... } -> AttrSetExample
Section titled “Example”mkSecret { file = "borg"; key = "forgejo-passphrase"; }=> { sopsFile = "${self}/secrets/services/borg.yaml"; key = "forgejo-passphrase";}lib.modules.web
Section titled “lib.modules.web”The ports a web jail bans on. quic is on, so a tcp-only ban leaves http/3 open
web :: AttrSetlib.modules.journalJail
Section titled “lib.modules.journalJail”A fail2ban jail that reads a systemd unit’s journal and bans on its web ports
Arguments
Section titled “Arguments”- [unit]: The systemd unit, without
.service - [regexes]: The failregexes, matched against each journal line
- [settings]: Extra jail settings, these override the defaults
journalJail :: String -> [String] -> AttrSet -> AttrSet