···
authenticationMethod = mkOption {
+
type = types.enum [ "form" "http" "generic" "github" ];
'form' means that users will be logged in and registered using forms
···
through xss-sanitize. Set to no only if you trust all of your users.
+
oauthClientId = mkOption {
+
type = with types; nullOr str;
+
description = "OAuth client ID";
+
oauthClientSecret = mkOption {
+
type = with types; nullOr str;
+
description = "OAuth client secret";
+
oauthCallback = mkOption {
+
type = with types; nullOr str;
+
description = "OAuth callback URL";
+
oauthAuthorizeEndpoint = mkOption {
+
type = with types; nullOr str;
+
description = "OAuth authorize endpoint";
+
oauthAccessTokenEndpoint = mkOption {
+
type = with types; nullOr str;
+
description = "OAuth access token endpoint";
+
type = with types; nullOr str;
+
description = "Github organization";
configFile = pkgs.writeText "gitit.conf" ''
···
pdf-export: ${toYesNo cfg.pdfExport}
pandoc-user-data: ${toString cfg.pandocUserData}
xss-sanitize: ${toYesNo cfg.xssSanitize}
+
oauthclientid: ${cfg.oauthClientId}
+
oauthclientsecret: ${cfg.oauthClientSecret}
+
oauthcallback: ${cfg.oauthCallback}
+
oauthauthorizeendpoint: ${cfg.oauthAuthorizeEndpoint}
+
oauthaccesstokenendpoint: ${cfg.oauthAccessTokenEndpoint}
+
github-org: ${cfg.githubOrg}
···