Remove `with` and `rec`
with and rec are considered anti-patterns:
-
withmakes it unclear where variables are assigned and what variables refer to.Instead of
with pkgs; [ foo ], write[ pkgs.foo ]directly. -
recalso makes it unclear what variables refer to and makes it easy to introduce subtle bugs.Instead of
rec { a = 1; b = a; }, use a let binding:let a = 1; b = a; in { inherit a b; }