PortValhalla/lib/modules/programs/git.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2024-08-23 16:40:24 +00:00
{ lib, ... }:
2024-10-06 19:25:34 +00:00
let
inherit (lib) mkEnableOption mkOption types;
2024-08-23 16:40:24 +00:00
gitOption = {
enable = mkEnableOption "git";
2024-08-23 16:40:24 +00:00
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
flow = {
mainBranch = mkOption {
type = types.nullOr types.str;
description = "The name of the stable branch in git flow.";
default = null;
2024-10-06 19:25:34 +00:00
};
2024-08-23 16:40:24 +00:00
devBranch = mkOption {
type = types.nullOr types.str;
description = "The name of the development branch in git flow.";
default = null;
2024-10-06 19:25:34 +00:00
};
2024-07-15 12:11:44 +00:00
};
2024-08-23 16:40:24 +00:00
aliases = mkOption {
type = types.attrsOf types.str;
description = "The git command aliases to install.";
default = { };
};
2024-10-06 19:25:34 +00:00
};
in {
options = {
valhalla = {
2024-10-13 17:52:28 +00:00
programs.git = gitOption;
2024-10-06 19:25:34 +00:00
users = mkOption {
type = types.attrsOf (types.submodule (
{ ... }: {
options = {
2024-10-13 17:52:28 +00:00
programs.git = gitOption;
2024-10-06 19:25:34 +00:00
};
}));
2024-08-23 16:40:24 +00:00
};
};
2024-10-06 19:25:34 +00:00
};
}