Skip to content

Gripes with nilla #9

@nrabulinski

Description

@nrabulinski

I started migrating my config over to nilla, while using flakes for dependency management and because that's currently the only way to get pure evaluation.
I'll be updating this issue with my thoughts and gripes I encounter
If you want to follow my journey, I'll be pushing my changes here https://git.rab.lol/nrabulinski/settei/src/branch/experiments/nilla

COMPLAINT - solved/acknowledged and not applicable

Thoughts so far:

  • It'd be nice to have a default set of systems a'la flake-parts. It's good you started out with having each package and shell say explicitly which systems it's compatible with, I think that's a better approach than a single perSystem attr like how flake-parts does it, but I also shouldn't have to repeat the same set of systems for every attribute.
  • 1000 nixpkgs instances is back - it seems like you're importing and evaling a new nixpkgs instance for every shell, package, etc. This seems very unnecessary unless a package has special requirements. It's also easily solvable with a custom builder, but it shouldn't be the default IMO
  • But speaking of perSystem being a bad design choice: I just migrated my wrapper-manager packages to use nilla (https://git.rab.lol/nrabulinski/settei/commit/265fba390834b131743b1c673d7d75257db3cb11) and I had to use a bad hack to re-export all of my wrappers under packages. Turns out having some way to do a single evaluation per system could be nice
  • I'd like nilla modules to be shorthanded by default so I don't have to prefix everything with config.
  • Not about nilla specifically but about the module system you've got - even when you do define a shorthand submodule, if there's config attribute it's by default treated as non-shorthand which in practice means you can't really define a submodule where one of the options is called config. (Well, you can, but then there's no point in making it a shorthand since you need to use config.config anyway
  • I'm not sure if your module system has something akin to _module.args but if it does, reexporting _module.args.inputs = builtins.mapAttrs (_: input: input.result) config.inputs would be very nice
  • First-class formatter package - pretty self-explanatory. While that, again, is currently possible, having a special formatter output (or at least having the cli with fmt subcommand which would look for packages.formatter) would be nice

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions