Allow configuring git

This commit is contained in:
Manuel Thalmann 2024-07-15 14:11:44 +02:00
parent 8979ad11e4
commit 474ac2d94b
2 changed files with 42 additions and 0 deletions

41
lib/modules/git.nix Normal file
View 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;
};
};
}

View file

@ -8,6 +8,7 @@
cfg = config.valhalla;
in {
imports = [
./git.nix
./i18n.nix
./partition.nix
];