@@ -99,7 +99,7 @@ let
101 authenticationMethod = mkOption {
101 authenticationMethod = mkOption {
102− type = types.enum [ "form" "http" "generic"];
102+ type = types.enum [ "form" "http" "generic" "github" ];
103 default = "form";
103 default = "form";
104 description = ''
104 description = ''
105 'form' means that users will be logged in and registered using forms
105 'form' means that users will be logged in and registered using forms
@@ -537,6 +537,42 @@ video/x-ms-wmx wmx
537 through xss-sanitize. Set to no only if you trust all of your users.
537 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";
542 configFile = pkgs.writeText "gitit.conf" ''
578 configFile = pkgs.writeText "gitit.conf" ''
@@ -587,6 +623,14 @@ video/x-ms-wmx wmx
587 pdf-export: ${toYesNo cfg.pdfExport}
623 pdf-export: ${toYesNo cfg.pdfExport}
588 pandoc-user-data: ${toString cfg.pandocUserData}
624 pandoc-user-data: ${toString cfg.pandocUserData}
589 xss-sanitize: ${toYesNo cfg.xssSanitize}
625 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}
@@ -681,4 +725,3 @@ NAMED