Allow configuring git

This commit is contained in:
Manuel Thalmann 2024-07-15 14:11:44 +02:00
parent d3550592f1
commit 1037ace214
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; cfg = config.valhalla;
in { in {
imports = [ imports = [
./git.nix
./i18n.nix ./i18n.nix
./partition.nix ./partition.nix
]; ];