|
|
|
@ -8,7 +8,20 @@ |
|
|
|
|
|
|
|
|
|
}: let |
|
|
|
|
|
|
|
|
|
config = (import ./config/default.nix) // hostConfig ; |
|
|
|
|
recursiveMerge = with pkgs.lib; attrList: |
|
|
|
|
let f = attrPath: |
|
|
|
|
zipAttrsWith (n: values: |
|
|
|
|
if tail values == [] |
|
|
|
|
then head values |
|
|
|
|
else if all isList values |
|
|
|
|
then unique (concatLists values) |
|
|
|
|
else if all isAttrs values |
|
|
|
|
then f (attrPath ++ [n]) values |
|
|
|
|
else last values |
|
|
|
|
); |
|
|
|
|
in f [] attrList; |
|
|
|
|
|
|
|
|
|
config = recursiveMerge [ (import ./config/default.nix) hostConfig ]; |
|
|
|
|
|
|
|
|
|
in rec { |
|
|
|
|
|
|
|
|
|