hosts icon indicating copy to clipboard operation
hosts copied to clipboard

nix flake refactor: avoid `with lib;` & use `lib.optional*`

Open toastal opened this issue 11 months ago • 2 comments

Upstream Nixpkgs has been pushing the style of removing with lib; with the reasoning of clarity around where variables in scope come that hurt readability & static analysis^1.

While on the topic of lib, introduce lib.optional & lib.optionalString in a few more places to tidy up the code while using common library patterns.


Also has been open @ https://gitlab.com/StevenBlack/hosts/-/merge_requests/2

toastal avatar Jan 30 '25 14:01 toastal

Looks good to me! I tested on my local system as well, to ensure the build succeeded with these changes.

benjamb avatar Mar 25 '25 15:03 benjamb

Also bump!

Pandapip1 avatar Aug 07 '25 13:08 Pandapip1