Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

NixOps is a tool for deploying to NixOS machines in a network or cloud.

License

NotificationsYou must be signed in to change notification settings

NixOS/nixops

Warning

NixOps is in low-maintenance mode and probably not suited for new projects. Use at your own risks.

Note

An experimental rewrite of NixOps is happening underhttps://github.com/nixops4/nixops4

Test

NixOps is a tool for deploying toNixOS machines in a network or the cloud. Key features include:

  • Declarative: NixOps determines and carries out actions necessary to realise a deployment configuration.
  • Testable: Try your deployments onVirtualBox orlibvirtd.
  • Multi Cloud Support: Currently supports deployments toAWS,Hetzner, andGCE
  • Separation of Concerns: Deployment descriptions are divided intological andphysical aspects. This makes it easy to separate parts that saywhat a machine should do fromwhere they should do it.
  • Extensible:NixOps is extensible through a plugin infrastructure which can be used to provide additional backends.

For more information, please refer to theNixOps manual.

Running

NixOps is included in nixpkgs and can be executed in a shell as follows:

$ nix-shell -p nixops

or for a bleeding edge version, including many fixes relative to the 1.7 series,

$ nix-shell -p nixopsUnstable

You may need access to a Nix remote builder if your system does not support the deployment'ssystem builds directly. MacOS users may use a virtual machine with NixOS for this purpose.

It is also possible to use cross-compilation with NixOps, by settingnixpkgs.localSystem andnixpkgs.crossSystem. A mix of remote, emulated and cross builds is also possible; seethis writeup on eno.space.

Building And Developing

Building The Nix Package

You can build the Nix package by simply invokingnix-build on the project root:

$ nix-build

Development Shell

shell.nix provides an environment with all dependencies required for working onNixOps. You can usenix-shell toenter a shell suitable for working onNixOps which will contain all Python dependencies specified inpyproject.toml

$ nix-shell

Executing Tests

Inside the development shell the tests can be executed as follows:

$ pytest

Documentation

NixOps' documentation uses reStructuredText. When editing the docs,get a live-reloading, rendered version of the docs:

nixops$ ./live-docs.pyServing on http://127.0.0.1:5500

and verify its lints before committing:

nixops$ lint-docs

Contributing

Contributions to the project are welcome in the form of GitHub PRs. Please consider the following guidelines before creating PRs:

  • Please make sure to format your code usingblack.
  • Please add type signatures usingmypy.
  • If you are planning to make any considerable changes, you should first present your plans in a GitHub issue so it can be discussed.
  • If you are adding features, please also add reasonable tests.

License

Licensed underLGPL-3.0.


[8]ページ先頭

©2009-2025 Movatter.jp