Skip to content
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

eliminate userFlakeNixOS #257

Closed
blaggacao opened this issue Apr 22, 2021 · 1 comment
Closed

eliminate userFlakeNixOS #257

blaggacao opened this issue Apr 22, 2021 · 1 comment
Labels
APIv1 related to 1.0 api stabilization

Comments

@blaggacao
Copy link
Contributor

this issue targets the develop branch

Currently userFlakeNixOS is explicitly passed around as the "main" nixpkgs version.

However, with the new API, we afford the notion of channels and each host defines (or falls back) to a well known channel name.

We can ensure that the channel input is aquired by scanning inputs for ones named after the channel name.
in this case, we can use channelName attributes to recover the correct nixpkgs to use in those occasions.

Not implementing this would lead to an incorrect implementation since a host selected channel might end up with the wrong nixpkgs in those places.

rg userFlakeNixOS

[...]

# goes away with usage of `fup`
devos/mkPkgs.nix
3:{ userFlakeNixOS, userFlakeSelf, userFlakeInputs }:
25:    { pkgs = lib.os.pkgImport userFlakeNixOS overlays system; }

# would better use fup-evaluated `host.chanelName` to derive the nixpkgs from `inputs.<channelName>` (presuming they are ensured to be named the same)
devos/devosSystem.nix
3:{ userFlakeNixOS, userFlakeSelf, userFlakeInputs }:
18:            "${userFlakeNixOS}/${modpath}/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"

# use defaults from `hostDefaults.<channelName>`
mkFlake/evalArgs.nix
3:{ userFlakeSelf, userFlakeNixOS }:
54:            default = userFlakeNixOS;
195:                input = userFlakeNixOS;

# same as devosSystem
devos/mkHosts.nix
3:{ userFlakeNixOS, userFlakeInputs, userFlakeSelf }:
41:        "nixpkgs=${userFlakeNixOS}"
50:        nixos.flake = userFlakeNixOS;
100:      inherit userFlakeNixOS userFlakeInputs userFlakeSelf;
@blaggacao blaggacao added the APIv1 related to 1.0 api stabilization label Apr 22, 2021
@blaggacao
Copy link
Contributor Author

Implememted in api-next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIv1 related to 1.0 api stabilization
Projects
None yet
Development

No branches or pull requests

1 participant