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

Flake support #1365

Merged
merged 4 commits into from Jun 11, 2020
Merged

Flake support #1365

merged 4 commits into from Jun 11, 2020

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Jun 11, 2020

Copied PR body from #1202

As we are now using Flakes for development on master the scope of this PR is much smaller than the original one.
It's only about adding Flakes support to NixOps, we are not touching the development workflow.


This PR adds flake support to NixOps, meaning that you can do things like

# nixops create -d hydra-ec2-demo --flake github:edolstra/hydra-ec2-demo
# nixops deploy

This will create an EC2 instance running Hydra, using exactly the configuration locked by flake.lock.

Currently evaluation is not as hermetic as we'd like since the NixOps-specific NixOS modules are provided impurely. Ideally, the flake would lock a particular version of the NixOps flake as input.

Likewise, NixOps needs to pass in the generated file physical.nix as an impure input. This is something of an inherent issue with the NixOps model. Maybe for flakes in local Git repositories, physical.nix could be auto-committed.

@adisbladis adisbladis mentioned this pull request Jun 11, 2020
@adisbladis adisbladis force-pushed the flake-support branch 2 times, most recently from 35cfe76 to 4efa709 Compare June 11, 2020 10:58
edolstra and others added 4 commits June 11, 2020 16:59
Example usage:

  $ nixops create -d hydra-ec2-demo --flake github:edolstra/hydra-ec2-demo
  $ nixops deploy

to get an EC2 instance running Hydra.

Evaluation currently doesn't use pure mode because we need access to
NixOps's NixOS modules, and to physical.nix.
It makes the code hard to reason about.
@adisbladis adisbladis merged commit 2072148 into NixOS:master Jun 11, 2020
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