Can/should options share a "namespace"? #76
Replies: 2 comments 2 replies
-
Certainly not nonsensical, but I'm currently leaning towards using { withSystem, ... }: {
options.foo.package = mkOption {
type = types.functionTo types.package;
};
config.foo.package = system: withSystem system ({ config, ... }: config.packages.foo);
} Arguably this is exactly like putting the option in
What if there's an issue with erlang on one
Awesome :) Would you like it to be listed on https://flake.parts? |
Beta Was this translation helpful? Give feedback.
-
I am working on a reusable library-style flake for managing BEAM (Elixir/Erlang) applications using flakes + flake-parts, and want to expose some configuration knobs around the conventions I have in mind.
Some of the configuration settings I have imagined make sense to be a top-level option (not perSystem), and some make more sense as perSystem instead.
Is it nonsensical for me to want to structure the consuming side like so?
Will this mindset cause me technical problems on the implementation side? As a specific example, will the current mechanics permit me to have
config.beamWorkspace
mingle both top-level options and perSystem options? So far I've stumbled a few times and I'm wondering if I'm holding it wrong or if the design is in some way unsuitable.Beta Was this translation helpful? Give feedback.
All reactions