fix(git): update from extraConfig to settings
This commit is contained in:
parent
d6f5f140d3
commit
d187b96054
1 changed files with 12 additions and 8 deletions
|
|
@ -13,24 +13,28 @@ let
|
||||||
user = config.${namespace}.user;
|
user = config.${namespace}.user;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.${namespace}.tools.git = {
|
options.${namespace} = {
|
||||||
|
tools.git = {
|
||||||
enable = mkEnableOption "Git";
|
enable = mkEnableOption "Git";
|
||||||
userName = mkOpt types.str "Philipp" "The name to configure git with.";
|
|
||||||
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
|
|
||||||
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
|
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
|
||||||
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
||||||
};
|
};
|
||||||
|
user = {
|
||||||
|
name = mkOpt types.str "Philipp" "The name to configure git with.";
|
||||||
|
email = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit (cfg) userName userEmail;
|
|
||||||
lfs = enabled;
|
lfs = enabled;
|
||||||
signing = {
|
signing = {
|
||||||
key = cfg.signingKey;
|
key = cfg.signingKey;
|
||||||
inherit (cfg) signByDefault;
|
inherit (cfg) signByDefault;
|
||||||
};
|
};
|
||||||
extraConfig = {
|
settings = {
|
||||||
|
inherit user;
|
||||||
init = {
|
init = {
|
||||||
defaultBranch = "main";
|
defaultBranch = "main";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue