56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{ lib, ... }:
|
|
let
|
|
inherit (lib) mkOption types;
|
|
|
|
gitType = types.submodule ({ ... }: {
|
|
options = {
|
|
defaultBranch = mkOption {
|
|
type = types.nullOr types.str;
|
|
description = "The name of the default branch in newly created repositories.";
|
|
default = null;
|
|
};
|
|
|
|
flow = {
|
|
mainBranch = mkOption {
|
|
type = types.nullOr types.str;
|
|
description = "The name of the stable branch in git flow.";
|
|
default = null;
|
|
};
|
|
|
|
devBranch = mkOption {
|
|
type = types.nullOr types.str;
|
|
description = "The name of the development branch in git flow.";
|
|
default = null;
|
|
};
|
|
};
|
|
|
|
aliases = mkOption {
|
|
type = types.attrsOf types.str;
|
|
description = "The git command aliases to install.";
|
|
default = { };
|
|
};
|
|
};
|
|
});
|
|
|
|
gitOption = mkOption {
|
|
type = gitType;
|
|
description = "The git related options.";
|
|
default = { };
|
|
};
|
|
in {
|
|
options = {
|
|
valhalla = {
|
|
programs.git = gitOption;
|
|
|
|
users = mkOption {
|
|
type = types.attrsOf (types.submodule (
|
|
{ ... }: {
|
|
options = {
|
|
programs.git = gitOption;
|
|
};
|
|
}));
|
|
};
|
|
};
|
|
};
|
|
}
|