Compare commits

..

2 Commits

Author SHA1 Message Date
3349c8ecad feat(git): Use builtin include option and add gitea instance 2025-12-21 00:29:33 +01:00
f588b7d389 feat(zsh): Add gitea remote icon 2025-12-21 00:29:04 +01:00
2 changed files with 30 additions and 8 deletions

View File

@@ -24,6 +24,7 @@
url = { url = {
"ssh://git@gitlab.uni-ulm.de".insteadOf = "https://gitlab.uni-ulm.de"; "ssh://git@gitlab.uni-ulm.de".insteadOf = "https://gitlab.uni-ulm.de";
"ssh://git@github.com".insteadOf = "https://github.com"; "ssh://git@github.com".insteadOf = "https://github.com";
"ssh://git@gitea.demenik.dev".insteadOf = "https://gitea.demenik.dev";
}; };
user = { user = {
@@ -32,16 +33,34 @@
signingkey = "${config.home.homeDirectory}/.ssh/id_rsa"; signingkey = "${config.home.homeDirectory}/.ssh/id_rsa";
}; };
"includeIf \"hasconfig:remote.*.url:git@gitlab.uni-ulm.de:*/**\"" = {
path = "${pkgs.writeText ".gitconfig-gitlab.uni-ulm.de" ''
[user]
email = "dominik.bernroider@uni-ulm.de"
name = "Dominik Bernroider"
''}";
};
init.defaultBranch = "main"; init.defaultBranch = "main";
}; };
includes = let
mkRemoteSsh = {
user ? "git",
url,
config,
}: {
condition = "hasconfig:remote.*.url:${user}@${url}:*/**";
path = "${pkgs.writeText "gitconfig-${url}" (pkgs.lib.generators.toGitINI config)}";
};
in [
(mkRemoteSsh {
url = "gitlab.uni-ulm.de";
config.user = {
email = "dominik.bernroider@uni-ulm.de";
name = "Dominik Bernroider";
};
})
(mkRemoteSsh {
url = "gitea.demenik.dev";
config.user = {
email = "mail@demenik.dev";
name = "demenik";
};
})
];
}; };
gpg.enable = true; gpg.enable = true;
}; };

View File

@@ -57,6 +57,9 @@ final_space = true
fetch_upstream_icon = true fetch_upstream_icon = true
fetch_status = true fetch_status = true
[blocks.segments.properties.upstream_icons]
"gitea.demenik.dev" = ""
[[blocks]] [[blocks]]
type = 'prompt' type = 'prompt'
alignment = 'left' alignment = 'left'