mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
fix(lint): nixfmt the whole tree
This commit is contained in:
parent
643b136863
commit
bf219a30c2
69 changed files with 2605 additions and 1726 deletions
|
|
@ -1,17 +1,25 @@
|
|||
{lib, myLib, ...}:
|
||||
{ lib, myLib, ... }:
|
||||
with lib;
|
||||
rec {
|
||||
mergeAttrsRecursive = a: b: foldAttrs (item: acc:
|
||||
if (isNull acc) then
|
||||
item
|
||||
else if (isList item) then
|
||||
if isList acc then
|
||||
acc ++ item
|
||||
else [ acc ] ++ item
|
||||
else if (isString item) then
|
||||
acc + item
|
||||
else if (isAttrs item) then
|
||||
mergeAttrsRecursive acc item
|
||||
else item
|
||||
) null [ b a ];
|
||||
mergeAttrsRecursive =
|
||||
a: b:
|
||||
foldAttrs
|
||||
(
|
||||
item: acc:
|
||||
if (isNull acc) then
|
||||
item
|
||||
else if (isList item) then
|
||||
if isList acc then acc ++ item else [ acc ] ++ item
|
||||
else if (isString item) then
|
||||
acc + item
|
||||
else if (isAttrs item) then
|
||||
mergeAttrsRecursive acc item
|
||||
else
|
||||
item
|
||||
)
|
||||
null
|
||||
[
|
||||
b
|
||||
a
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue