Removed pipe operator.
The pipe operator '<|' was added in Nix 2.24 as experimental. In typical nix community fashion, an eternity has passed, it's still experimental, and they're still arguing about it. Thus, in order not to burden any users of this flake, they have been removed. To get this done quickly a utility function has been added called 'compose'. It is 'lib.trivial.pipe' written in reverse. This eliminates any bugs and performance regressions from unnecessary thunk evaluation.
This commit is contained in:
parent
0f0c4c7727
commit
2a5ced3905
7 changed files with 115 additions and 89 deletions
|
|
@ -150,15 +150,16 @@ in
|
|||
|
||||
filterCookies =
|
||||
x:
|
||||
builtins.concatLists
|
||||
<| lib.mapAttrsToList (
|
||||
k: v:
|
||||
if builtins.elem v.cookies x then
|
||||
[ "https://${k}/" ] ++ lib.optional (!v.https-only) "http://${k}/"
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
<| site;
|
||||
sLib.compose [
|
||||
builtins.concatLists
|
||||
(lib.mapAttrsToList (
|
||||
k: v:
|
||||
if builtins.elem v.cookies x then
|
||||
[ "https://${k}/" ] ++ lib.optional (!v.https-only) "http://${k}/"
|
||||
else
|
||||
[ ]
|
||||
))
|
||||
] site;
|
||||
|
||||
makeUboConf = domain: config: {
|
||||
adminSettings = {
|
||||
|
|
@ -204,7 +205,8 @@ in
|
|||
true
|
||||
];
|
||||
};
|
||||
extensions.settings."uBlock0@raymondhill.net" =
|
||||
sLib.recursiveMergeAll <| [ (makeUboConf "*" default) ] ++ lib.mapAttrsToList makeUboConf site;
|
||||
extensions.settings."uBlock0@raymondhill.net" = sLib.recursiveMergeAll (
|
||||
[ (makeUboConf "*" default) ] ++ lib.mapAttrsToList makeUboConf site
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue