2024-08-23 16:40:24 +00:00
|
|
|
{ lib, ... }:
|
2024-10-06 19:25:34 +00:00
|
|
|
let
|
|
|
|
inherit (lib) mkOption types;
|
2024-08-23 16:40:24 +00:00
|
|
|
|
2024-10-06 19:25:34 +00:00
|
|
|
gitType = types.submodule ({ ... }: {
|
|
|
|
options = {
|
|
|
|
defaultBranch = mkOption {
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
description = "The name of the default branch in newly created repositories.";
|
|
|
|
default = null;
|
|
|
|
};
|
2024-08-23 16:40:24 +00:00
|
|
|
|
2024-10-06 19:25:34 +00:00
|
|
|
flow = {
|
|
|
|
mainBranch = mkOption {
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
description = "The name of the stable branch in git flow.";
|
|
|
|
default = null;
|
|
|
|
};
|
2024-08-23 16:40:24 +00:00
|
|
|
|
2024-10-06 19:25:34 +00:00
|
|
|
devBranch = mkOption {
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
description = "The name of the development branch in git flow.";
|
|
|
|
default = null;
|
2024-08-23 16:40:24 +00:00
|
|
|
};
|
2024-10-06 19:25:34 +00:00
|
|
|
};
|
2024-08-23 16:40:24 +00:00
|
|
|
|
2024-10-06 19:25:34 +00:00
|
|
|
aliases = mkOption {
|
|
|
|
type = types.attrsOf types.str;
|
|
|
|
description = "The git command aliases to install.";
|
|
|
|
default = { };
|
|
|
|
};
|
2024-07-15 12:11:44 +00:00
|
|
|
};
|
2024-10-06 19:25:34 +00:00
|
|
|
});
|
2024-08-23 16:40:24 +00:00
|
|
|
|
2024-10-06 19:25:34 +00:00
|
|
|
gitOption = mkOption {
|
|
|
|
type = gitType;
|
|
|
|
description = "The git related options.";
|
|
|
|
default = { };
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
valhalla = {
|
|
|
|
git = gitOption;
|
|
|
|
|
|
|
|
users = mkOption {
|
|
|
|
type = types.attrsOf (types.submodule (
|
|
|
|
{ ... }: {
|
|
|
|
options = {
|
|
|
|
git = gitOption;
|
|
|
|
};
|
|
|
|
}));
|
2024-08-23 16:40:24 +00:00
|
|
|
};
|
|
|
|
};
|
2024-10-06 19:25:34 +00:00
|
|
|
};
|
|
|
|
}
|