mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
Another saturday another useless formatter change. It's my dotfiles, after all alejandra doesn't handle c-style inline comments well.
20 lines
428 B
Nix
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
|