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

idempotent installation #55

Merged
merged 1 commit into from Nov 2, 2020
Merged

idempotent installation #55

merged 1 commit into from Nov 2, 2020

Conversation

zimbatm
Copy link
Contributor

@zimbatm zimbatm commented Nov 2, 2020

Don't run the installer if Nix has already been installed on the host.
We assume that the installed Nix is already in the desired state.

This allows to share a given pipeline between hosted and self-hosted
runners. Usually the self-hosted runners are long-lived and already have
Nix installed.

Don't run the installer if Nix has already been installed on the host.
We assume that the installed Nix is already in the desired state.

This allows to share a given pipeline between hosted and self-hosted
runners. Usually the self-hosted runners are long-lived and already have
Nix installed.
@domenkozar
Copy link
Member

That's mostly needed for macos right, I think linux should just work as-is.

@zimbatm
Copy link
Contributor Author

zimbatm commented Nov 2, 2020

I remember the installer failing when invoked twice on Linux as well, but that was a long time ago.

Another nice property is that this allows reducing the permission set of the user if Nix is already installed. Which is probably a good thing for long-running machines.

@domenkozar
Copy link
Member

Linux should be fixed in last release. Some might use the installer to install twice with different settings, but I don't think that's a good use case to support since it should just use different jobs.

@domenkozar domenkozar merged commit 661bbdf into cachix:master Nov 2, 2020
@zimbatm zimbatm deleted the idempotent branch November 3, 2020 20:59
@zimbatm zimbatm restored the idempotent branch November 3, 2020 20:59
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

2 participants