{"id":13688556,"url":"https://github.com/lukebfox/nixops-hetznercloud","last_synced_at":"2025-09-26T19:31:08.491Z","repository":{"id":45260818,"uuid":"298667928","full_name":"lukebfox/nixops-hetznercloud","owner":"lukebfox","description":"A NixOps plugin supporting Hetzner Cloud deployments.","archived":false,"fork":false,"pushed_at":"2023-02-19T18:30:58.000Z","size":286,"stargazers_count":27,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-12T12:47:41.897Z","etag":null,"topics":["cloud","deployment","devops","hetzner-cloud","nix","nixops","nixops-plugin","nixos"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukebfox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-25T19:58:42.000Z","updated_at":"2023-12-06T10:40:57.000Z","dependencies_parsed_at":"2024-01-14T15:26:11.748Z","dependency_job_id":"16b18b59-ad4d-488b-8154-74d31e732aae","html_url":"https://github.com/lukebfox/nixops-hetznercloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukebfox%2Fnixops-hetznercloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukebfox%2Fnixops-hetznercloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukebfox%2Fnixops-hetznercloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukebfox%2Fnixops-hetznercloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukebfox","download_url":"https://codeload.github.com/lukebfox/nixops-hetznercloud/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234334052,"owners_count":18815874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","deployment","devops","hetzner-cloud","nix","nixops","nixops-plugin","nixos"],"created_at":"2024-08-02T15:01:16.522Z","updated_at":"2025-09-26T19:31:08.129Z","avatar_url":"https://github.com/lukebfox.png","language":"Python","funding_links":[],"categories":["Python","devops"],"sub_categories":[],"readme":"[![CI](https://github.com/lukebfox/nixops-hetznercloud/workflows/CI/badge.svg)](https://github.com/lukebfox/nixops-hetznercloud/actions)\n# NixOps Hetzner Cloud Plugin\n\n[NixOps][1] is a tool for deploying [NixOS][2] machines to a local network or cloud provider. \n\nThis repo contains a NixOps Plugin enabling [Hetzner Cloud][3] deployments. While you can already provision resources with the [Terraform provider][4], this will do nothing for automating your NixOS deployment. The alternative, NixOps, offers a more integrated solution. The goal is to automate the entire process of provisioning and deploying your NixOS box with one tool. There is second Hetzner Cloud plugin at `nix-community/nixops_hcloud`, although it does not support as many features as this plugin, and requires bootstrapping.\n\n## Installing NixOps with plugins\n\nSimply use `nixopsUnstable` from nixpkgs to get a handle on a nixops bundled with all the plugins including this one. Here is an [example][5] from my own configs.\n\n## Usage\n\nBefore you can use NixOps to manage Hetzner Cloud Resources you must have a Hetzner Cloud account. You'll need to manually create any project which you want to be managed with NixOps, and generate a project-specific API token which NixOps will use for authentication (security\u003eapi tokens\u003egenerate api token).\n\nCurrently supported resources are as follows:\n\n| Resource      | State |\n|:--------------|:-----:|\n| Server        | :heavy_check_mark: |\n| Volume        | :heavy_check_mark: |\n| Network       | :heavy_check_mark: |\n| FloatingIP    | :heavy_check_mark: |\n| Certificate   | :heavy_check_mark: |\n| SSHKey        | :x: |\n| LoadBalancer  | :x: |\n| Firewall      | :x: |\n\nThe SSH key resource on Hetzner cloud exists purely to allow access to linux boxes when you first provision them. As this functionality is completely subsumed by Nix there's no point supporting this resource. The other resources could be supported although these are things which you can configure your NixOS boxes to handle using the array of packages/services in nixpkgs, so I'm open for contributions but I won't likely be writing these myself. \n\nAll NixOps deployment options specific to Hetzner Cloud are declared in the nix files at `nixops_hetznercloud/nix`.\n\nThe example code introduces Hetzner Cloud resource management with NixOps.\n\n## Developing\n\nTo start developing on the NixOps Hetzner Cloud plugin, you can run:\n\n```bash\nλ cd nixops-hetznercloud\nλ nix develop # or `nix-shell`, if you have the old version of nix\nλ poetry install\nλ poetry shell\n```\n\n## Testing\n\nFrom inside the development shell above, execute `pytest`. Remember to set the environmental variable `HCLOUD_API_TOKEN` to the token for the hetzner cloud project you're using asfor testing.\n\n## Updating Dependencies\nThere are times when you may want to update this project's dependencies.\n- To get a more recent poetry/poetry2nix, you need to repin the nixpkgs flake input to the latest upstream commit by running `nix flake update`.\n- To use your own local version of NixOps or modify any python dependencies, edit `pyproject.toml` and run `poetry lock`.\n\n---\nCredit to the maintainers of the nixops-aws plugin which was a really useful model for nixops plugins and elitak for the original nixos-infect script.\n\n[1]: https://github.com/nixos/nixops\n[2]: https://nixos.org/\n[3]: https://www.hetzner.com/cloud\n[4]: https://github.com/hetznercloud/terraform-provider-hcloud\n[5]: https://github.com/lukebfox/nix-configs/blob/master/flake.nix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukebfox%2Fnixops-hetznercloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukebfox%2Fnixops-hetznercloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukebfox%2Fnixops-hetznercloud/lists"}