mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-07 02:07:54 +00:00
[General+Flake] convert "default" module directory to subflake
Also move flatpak config from packages to desktop
This commit is contained in:
parent
397282c7c6
commit
6d061dce0e
12 changed files with 577 additions and 78 deletions
17
lib/attrsets.nix
Normal file
17
lib/attrsets.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{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 ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue