Allow configuring git
This commit is contained in:
parent
d3550592f1
commit
1037ace214
41
lib/modules/git.nix
Normal file
41
lib/modules/git.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
gitOptions = {
|
||||
defaultBranch = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "The name of the default branch in git.";
|
||||
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 = "Git command aliases to install.";
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
valhalla = {
|
||||
git = gitOptions;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,6 +8,7 @@
|
|||
cfg = config.valhalla;
|
||||
in {
|
||||
imports = [
|
||||
./git.nix
|
||||
./i18n.nix
|
||||
./partition.nix
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue