-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sharing model #12
Comments
Just to clarify, why is it passed globally like so:
|
Nice! ad 1. ad 3. No interference with sharing model, here. ad. 2. Are there known use cases where inputs bring additional attributes that cannot be captured via |
|
If I had a crazy idea and needed a package from inputs somewhere and did: {
nativeBuildInputs = [
inputs.some.packages.${pkgs.stdenv.system}.mypkgs
];
} Does this have potential serious odds? It is a somewhat hyper-namespaced alternative to namespacing To understand my concerns, one has to understand that I'm mainly concerned with the sharing model, not if it "works for me". Nixos sharing model has potential, since traditionally everyone cooked their own soup and users where just proficient enough to plug things together. But that model clearly fails for less proficient users, so I'm trying to figure out what is it that we should strongly encourage and strongly discourage so that people present a nice sharing interface effortlessly, by default. Currently, I just want to put that egg on the table. I have no clear vision or concept, yet, myself. |
Maybe we have indeed to fall back to Problem:
|
I've seen users do As for sharing issue - this is what I do: Also, may I add that I am exporting In case overlay overwrites something like in the example above - this solution pops into my mind: final: prev: {
alice = inputs.alice.overlay final prev;
} this way we can install alice's kakoune by simply typing |
Nice context you give! final: prev: {
alice = inputs.alice.overlay final prev;
} Unfortunately, if alice also defines a module using one of her packages, we would break that, if we also tried to use it. |
I don't think that I caught the issue. Can you elaborate on the use case that this does not cover? |
So we also do: sharedModules = [ inputs.alice.nixosModules."modules/services/development/kakoune" ] within alice's world, this modules access It's a non-sensical module that starts This module also depends on alice's coustom |
Currently, On the other hand, it might promote the overall sharing model.between fup uswrs, if fup would adopt sane packges outputs by defult. To lay the foundations on package filtering, I opened an upstream issue numtide/flake-utils#27 For fup, the task would be to re-export overlays per system as packages, similar to what |
So now there is a +- usable version There is also None of them are currently "activated" by default. We could discuss doing soe once they are completely stable and validated. |
flake-utils-plus/systemFlake.nix
Line 5 in 51cb739
What is the rational of defaulting to
inputs
rather than have people make use of inputs in their top level flake?The
inputs
thought model asextraArgs
neglects the "receptionist" thought model of the flake.nix.I think
flake.nix
as receptionist is an important feature of the distributed future of flakes, "to show new guests around": Hans visit's James' repo on github. flake.nix gives him the map and tells at least the outline of the story.What cases cannot be covered by receiving inputs in flake.nix and dispatching eg overlays via
input.otherflake.overlay
orinputs.otherflake.nixosModules
?I think it was not an afterthought to make those two public static api of flakes themselves, in the first place by the designers of flakes.
One thing that comes to my mind ...
In a sharing model based on
overlay
it is not always trivial to pull in the following:flake-utils.lib.simpleFlake
solves this by implicitly doing a namespacing of overlays.Should we really go down that route and just globally pass through inputs, by default?
→ What this does not do is expose and promote encapsulation via the top level flake api.
/cc @Pacman99 @nrdxp
The text was updated successfully, but these errors were encountered: