Replies: 1 comment 1 reply
-
Good question. This looks related: juspay/nixos-unified-template#93 You could put your |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey !
I am very new to nixos-unified, and I am rewriting all my configuration with it.
I would like to include a custom library of functions in my setup. Specifically, I have a custom
lib
folder containing custom nix functions (e.g. color conversions: hex to decimal, decimal to RGBA, etc.).My goal is to make these functions available across my Nix files so that I can use them globally in my configurations. Could you provide some guidance on the best way to achieve this within the nixos-unified setup?
Here’s what I’m aiming for:
lib/color/
contains the color conversion utilities (e.g., hex to RGB, RGB to hex, etc.)I want these functions to be accessible across my Nix files, so I can call them as needed in any part of my configuration, ideally without duplicating or importing the library explicitly each time.
Eg.
Questions :
What’s the recommended approach for exposing custom libraries globally in nixos-unified?
Is there a way to make this lib directory a part of nixos-unified's config.lib (or equivalent) so that these functions are easily accessible everywhere?
If there's a specific place in the flake configuration where I should reference this lib directory ?
Thanks for this awesome project !
Beta Was this translation helpful? Give feedback.
All reactions