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

nixos/systemd: Explicitly put default path packages after othe… #77088

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

infinisil
Copy link
Member

Motivation for this change

This fixes the dhcpcd issue in #76969, which was exposed by #75031 introducing changes in the module ordering and therefore option ordering too.

The dhcpcd issue would also be fixable by explicitly putting
dhcpcd's paths before others, however it makes more sense for systemd's
default paths to be after all others by default, since they should only
be a fallback, which is how binary finding will work if they come after.

Ping @demokritos @izuk @karolchmist

Things done
  • Tested that this actually fixes the issue (checking cat /etc/resolv.conf)

Sorry, something went wrong.

This fixes the dhcpcd issue in NixOS#76969,
which was exposed by NixOS#75031
introducing changes in the module ordering and therefore option ordering
too.

The dhcpcd issue would also be fixable by explicitly putting
dhcpcd's paths before others, however it makes more sense for systemd's
default paths to be after all others by default, since they should only
be a fallback, which is how binary finding will work if they come after.
@worldofpeace
Copy link
Contributor

All the time has this caused an issue for me 👍
🎊 To a fix.

@infinisil
Copy link
Member Author

infinisil commented Jan 6, 2020

Not sure why ofborg doesn't start eval, trying manually..

@GrahamcOfBorg eval

Edit: Nope!

@worldofpeace
Copy link
Contributor

@infinisil ofborg hasn't made its 2020 comeback yet?
🏗️ guess it's time to get that going.

@infinisil
Copy link
Member Author

I asked graham what's up with that in #nixos-borg, haven't heard back yet

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jan 6, 2020

Intersting: this already happened once: #55886 (comment). I fixed it by lowering the priority of systemd (d16a243). I'm not sure why it happened last year. Also, do you know why/how did your PR affect priorities?

@infinisil
Copy link
Member Author

@rnhmjoj Ah that's something slightly different: In that case systemd and openresolv are installed into a single environment with buildEnv. This creates a single package out of multiple ones, such that you can have PATH=/run/current-system/sw/bin and have many packages available. This lead to a collision because multiple ones are providing the same binary. This can be fixed with priorities.

In this case however we have PATH=/nix/store/...-systemd/bin:/nix/store/...-openresolv/bin, so the packages are different in PATH, they're not joined into a single one. Instead now the ordering of them in PATH matters for which one gets chosen.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jan 6, 2020

@infinisil Ah, I see. Thank you for the explanation.

@karolchmist
Copy link
Member

It fixes #76969 for me 👍

@infinisil
Copy link
Member Author

Alright let's just merge even without the bot, what could go wrong with such a simple change! (famous last words..)

@infinisil infinisil changed the title nixos/systemd: Explicitly put default path packages after others nixos/systemd: Explicitly put default path packages after othe… Jan 6, 2020
@infinisil infinisil merged commit ff16d17 into NixOS:master Jan 6, 2020
@infinisil infinisil deleted the fix-systemd-path branch January 6, 2020 20:51
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/lib-types-anythings-merge-function-behavior-regarding-lists/51708/8

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

Successfully merging this pull request may close these issues.

None yet

5 participants