Set credentials for hda gitlab

This commit is contained in:
SebastianStork 2025-04-17 15:03:52 +02:00
parent a3472bb822
commit 32315b4885
3 changed files with 27 additions and 9 deletions

View file

@ -3,7 +3,10 @@
options.myConfig.git.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.git.enable {
sops.secrets."github-ssh-key".path = "${config.home.homeDirectory}/.ssh/github";
sops.secrets = {
"github-ssh-key".path = "${config.home.homeDirectory}/.ssh/github";
"hda-gitlab-ssh-key".path = "${config.home.homeDirectory}/.ssh/hda-gitlab";
};
programs = {
git = {
@ -11,14 +14,27 @@
userName = "SebastianStork";
userEmail = "sebastian.stork@pm.me";
extraConfig.init.defaultBranch = "main";
};
lazygit.enable = true;
includes = [
{
condition = "gitdir:~/Projects/h-da/**";
contents = {
user.email = "sebastian.stork@stud.h-da.de";
init.defaultBranch = "main";
};
}
];
};
ssh = {
enable = true;
matchBlocks."github.com".identityFile = "~/.ssh/github";
matchBlocks = {
"github.com".identityFile = "~/.ssh/github";
"code.fbi.h-da.de".identityFile = "~/.ssh/hda-gitlab";
};
};
lazygit.enable = true;
};
};
}