···
authenticationMethod = mkOption {
102
-
type = types.enum [ "form" "http" "generic"];
102
+
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.
541
+
oauthClientId = mkOption {
542
+
type = with types; nullOr str;
544
+
description = "OAuth client ID";
547
+
oauthClientSecret = mkOption {
548
+
type = with types; nullOr str;
550
+
description = "OAuth client secret";
553
+
oauthCallback = mkOption {
554
+
type = with types; nullOr str;
556
+
description = "OAuth callback URL";
559
+
oauthAuthorizeEndpoint = mkOption {
560
+
type = with types; nullOr str;
562
+
description = "OAuth authorize endpoint";
565
+
oauthAccessTokenEndpoint = mkOption {
566
+
type = with types; nullOr str;
568
+
description = "OAuth access token endpoint";
571
+
githubOrg = mkOption {
572
+
type = with types; nullOr str;
574
+
description = "Github organization";
configFile = pkgs.writeText "gitit.conf" ''
···
pdf-export: ${toYesNo cfg.pdfExport}
pandoc-user-data: ${toString cfg.pandocUserData}
xss-sanitize: ${toYesNo cfg.xssSanitize}
628
+
oauthclientid: ${cfg.oauthClientId}
629
+
oauthclientsecret: ${cfg.oauthClientSecret}
630
+
oauthcallback: ${cfg.oauthCallback}
631
+
oauthauthorizeendpoint: ${cfg.oauthAuthorizeEndpoint}
632
+
oauthaccesstokenendpoint: ${cfg.oauthAccessTokenEndpoint}
633
+
github-org: ${cfg.githubOrg}
···