summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/git.nix
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-29 19:02:59 +0200
committerlassulus <lass@blue.r>2018-09-29 19:02:59 +0200
commitb024b2e1ee80d8104f94d75360882bf340af4468 (patch)
tree30b9c4ca530aadc6c2d047dec609c33da05d43a3 /krebs/3modules/git.nix
parent56f80ba7a8397c7d9c057d3d81327ee932dcf4d4 (diff)
parent0c70e8fb51ea44b9a113efcb654463b792a5789c (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules/git.nix')
-rw-r--r--krebs/3modules/git.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 8a923efd2..f6b4e3c69 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -121,6 +121,10 @@ let
cgit-settings = types.submodule {
# A setting's value of `null` means cgit's default should be used.
options = {
+ about-filter = mkOption {
+ type = types.nullOr types.package;
+ default = null;
+ };
cache-root = mkOption {
type = types.absolute-pathname;
default = "/tmp/cgit";
@@ -166,6 +170,10 @@ let
types.nullOr (types.enum ["week" "month" "quarter" "year"]);
default = "year";
};
+ readme = mkOption {
+ type = types.listOf types.str;
+ default = [];
+ };
robots = mkOption {
type = types.nullOr (types.listOf types.str);
default = ["nofollow" "noindex"];
@@ -394,8 +402,14 @@ let
kv-to-cgitrc = k: v: getAttr (typeOf v) {
bool = kv-to-cgitrc k (if v then 1 else 0);
null = []; # This will be removed by `flatten`.
- list = "${k}=${concatStringsSep ", " v}";
+ list = {
+ readme = map (x: "readme=${x}") v;
+ }.${k} or "${k}=${concatStringsSep ", " v}";
int = "${k}=${toString v}";
+ set =
+ if subtypes.cgit-settings.check v
+ then "${k}=${v}"
+ else error "kv-to-cgitrc: unhandled type: set";
string = "${k}=${v}";
};
in