Revert "krebs git: refactor"

This reverts commit dbbf237393.
This commit is contained in:
lassulus 2018-08-04 11:48:42 +02:00
parent 809ded98e7
commit f00277e3ec

View File

@ -8,21 +8,6 @@
with import <stockholm/lib>; with import <stockholm/lib>;
let 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; cfg = config.krebs.git;
out = { out = {
@ -136,15 +121,42 @@ let
cgit-settings = types.submodule { cgit-settings = types.submodule {
# A setting's value of `null` means cgit's default should be used. # A setting's value of `null` means cgit's default should be used.
options = { options = {
cache-root = defaultAbsolutpath("/tmp/cgit"); cache-root = mkOption {
cache-size = defaultUint(1000); type = types.absolute-pathname;
css = defaultAbsolutpath("/static/cgit.css"); default = "/tmp/cgit";
enable-commit-graph = defaultBool(true); };
enable-index-links = defaultBool(true); cache-size = mkOption {
enable-index-owner = defaultBool(false); type = types.uint;
enable-log-filecount = defaultBool(true); default = 1000;
enable-log-linecount = defaultBool(true); };
enable-remote-branches = defaultBool(true); 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 { logo = mkOption {
type = types.absolute-pathname; type = types.absolute-pathname;
default = "/static/cgit.png"; default = "/static/cgit.png";