Skip to content

Conversation

@toastal
Copy link
Contributor

@toastal toastal commented Jan 30, 2025

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 analysis1.

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

Footnotes

  1. https://nix.dev/guides/best-practices#with-scopes

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[*].

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.

.. [*] https://nix.dev/guides/best-practices#with-scopes

Format: text/x-rst
@benjamb
Copy link

benjamb commented Mar 25, 2025

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

Copy link
Contributor

@Pandapip1 Pandapip1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pandapip1
Copy link
Contributor

Also bump!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants