diff options
author | lassulus <lass@blue.r> | 2018-08-04 11:37:56 +0200 |
---|---|---|
committer | lassulus <lass@blue.r> | 2018-08-04 11:37:56 +0200 |
commit | 7824d67d94d198b2376213f9756af2b3c574a263 (patch) | |
tree | b96ac9df4219eb21526543cb5d785defbe8d01fe /krebs/3modules/git.nix | |
parent | 2adea5b2cc789a2dd86a417cc47e0cc6adc80b5f (diff) | |
parent | ca73603b2588df6a8c2f4de30b1e83bf88a5d258 (diff) |
Merge remote-tracking branch 'prism/staging/jeschli'
Diffstat (limited to 'krebs/3modules/git.nix')
-rw-r--r-- | krebs/3modules/git.nix | 60 |
1 files changed, 24 insertions, 36 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix index 5ae24b40b..6311e88ab 100644 --- a/krebs/3modules/git.nix +++ b/krebs/3modules/git.nix @@ -8,6 +8,21 @@ with import <stockholm/lib>; let + defaultBool = o: mkOption { + type = types.bool; + default = option; + }; + + defaultUint = o: mkOption { + type = types.uint; + default = o; + }; + + defaultAbsolutpath = o: mkOption { + type = types.absolute-pathname; + default = o; + }; + cfg = config.krebs.git; out = { @@ -121,42 +136,15 @@ let cgit-settings = types.submodule { # A setting's value of `null` means cgit's default should be used. options = { - cache-root = mkOption { - type = types.absolute-pathname; - default = "/tmp/cgit"; - }; - cache-size = mkOption { - type = types.uint; - default = 1000; - }; - css = mkOption { - type = types.absolute-pathname; - default = "/static/cgit.css"; - }; - enable-commit-graph = mkOption { - type = types.bool; - default = true; - }; - enable-index-links = mkOption { - type = types.bool; - default = true; - }; - enable-index-owner = mkOption { - type = types.bool; - default = false; - }; - enable-log-filecount = mkOption { - type = types.bool; - default = true; - }; - enable-log-linecount = mkOption { - type = types.bool; - default = true; - }; - enable-remote-branches = mkOption { - type = types.bool; - default = true; - }; + cache-root = defaultAbsolutpath("/tmp/cgit"); + cache-size = defaultUint(1000); + css = defaultAbsolutpath("/static/cgit.css"); + enable-commit-graph = defaultBool(true); + enable-index-links = defaultBool(true); + enable-index-owner = defaultBool(false); + enable-log-filecount = defaultBool(true); + enable-log-linecount = defaultBool(true); + enable-remote-branches = defaultBool(true); logo = mkOption { type = types.absolute-pathname; default = "/static/cgit.png"; |