summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-08-04 11:48:42 +0200
committerlassulus <lass@blue.r>2018-08-04 11:48:42 +0200
commitf00277e3ecaf322c88b6984df8e8a2849bc3be4a (patch)
tree939653a097a82f2ecca8ef4f6d7032b6b25255ad
parent809ded98e77eca001576ffdec4b4b1d85209e715 (diff)
Revert "krebs git: refactor"
This reverts commit dbbf237393468b49f07beaeea614e12bac35a6c2.
-rw-r--r--krebs/3modules/git.nix60
1 files changed, 36 insertions, 24 deletions
diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix
index 6311e88ab..5ae24b40b 100644
--- a/krebs/3modules/git.nix
+++ b/krebs/3modules/git.nix
@@ -8,21 +8,6 @@
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 = {
@@ -136,15 +121,42 @@ let
cgit-settings = types.submodule {
# A setting's value of `null` means cgit's default should be used.
options = {
- 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);
+ 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;
+ };
logo = mkOption {
type = types.absolute-pathname;
default = "/static/cgit.png";