diff --git a/hosts/vm/belenios/belenios.nix b/hosts/vm/belenios/belenios.nix index 04618ac..ba51db8 100644 --- a/hosts/vm/belenios/belenios.nix +++ b/hosts/vm/belenios/belenios.nix @@ -1,4 +1,95 @@ { ... }: +let + domain = "belenios.crans.org"; + email.from = "root@crans.org"; + email.contact = "contact@crans.org"; + cas.name = "CAS Cr@ns"; + cas.server = "https://cas.crans.org/"; +in { + services.belenios = { + enable = true; + config = '' + + + + + + 8001 + + /var/log/belenios + /var/lib/belenios/data + + /var/lib/belenios/upload + + + 1024kB + 500 + + /var/run/ocsigenserver_command + + utf-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ''; + }; } diff --git a/pkgs/belenios/services.nix b/pkgs/belenios/services.nix index 1296def..44165dc 100644 --- a/pkgs/belenios/services.nix +++ b/pkgs/belenios/services.nix @@ -3,10 +3,127 @@ let cfg = config.belenios; - inherit (lib) mkEnableOption mkIf; + inherit (lib) mkEnableOption mkOption mkIf; in { - options.belenios = { - enable = mkEnableOption "Whether to enable Belenios Web server"; + options.services.belenios = { + enable = mkEnableOption "Whether to enable the Belenios Web server."; + config = mkOption { + types = lib.types.str; + description = '' + The Belenios Web server configuration. + See + + for documentation. + ''; + example = '' + + + + + + 127.0.0.1:8001 + + _SHAREDIR_/mime.types + + _VARDIR_/log + _VARDIR_/lib + + _VARDIR_/upload + + + 5120kB + 500 + + _RUNDIR_/ocsigenserver_command + + utf-8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +