.files/nix/git-identities/git-compat.nix
Léana 江 ebf8468807
tree-wide: format with nixfmt
Another saturday another useless formatter change.
It's my dotfiles, after all

alejandra doesn't handle c-style inline comments well.
2025-11-08 10:15:58 +08:00

20 lines
428 B
Nix

let
hasconfigRemoteCondition =
{
# Custom arguments
url,
path ? "*/**",
...
}@cfg:
let
cfg' = builtins.removeAttrs cfg [
"url"
"path"
];
in
[
(cfg' // { condition = "hasconfig:remote.*.url:git@${url}:${path}"; })
(cfg' // { condition = "hasconfig:remote.*.url:https://${url}/${path}"; })
];
in
builtins.concatMap hasconfigRemoteCondition