Skip to content

Extend beyond Flakes #329

@roberth

Description

@roberth

Something I've been considering for a while.
Flakes serves flake-parts well, but there's untapped potential in what's currently called perSystem.

Concept and Terminology

Old perSystem

A very useful framing of this option, which is more broad, is:

module that constructs a possible world for some software to exist in

or more succinctly, a configuration of multiple things.
From the perspective of a thing (e.g. a package), this would be considered the environment, containing such things as build and host platform, and perhaps a small handful of choices that may or may not affect it.

Old toplevel

This doesn't mean that toplevel is going anywhere. It has earned a solid place as the location to define things that have already been subjected to the act of or never were subject of the act of to configure, and are instead the result of configuring: a configuration.

Concrete example: if you want your host to have one configuration, put it in toplevel. If you want your host to be cross compiled from potentially multiple build platforms, put it in whatever we'll call perSystem after this.

Babel

So we have a bunch of contention on the terms configure/configuration, which are far too similar for the very distinct usages proposed here.
It sure doesn't help that functions are often named for their result, so the confusion goes in all directions.
Brainstorming

Category 1
old toplevel, absolute space, configured, configuration, configurations, concrete, real, determined, definite

Category 2
configurable, configure, function, possible world, world, abstract, relative frame, platonic, undetermined

Implementation

Circumstance

  • Currently largely flake-based ecosystem
  • Very few changes could make perSystem usable outside the Flakes context
  • A few more would make it first-class

Risks

  • Things like inputs' are somewhat flakes-oriented.
    • Mitigation: make them opt-in, have module that configures flake-parts to behave more portably
    • Solution: achieve parity. inputs' is already a mechanism that solves a flaw in flakes, which is that these configurable spaces don't link together naturally except through the flawed ${system}
  • Confusion.
    • Needs good docs
    • bring nix.parts online.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions