{"id":13837861,"url":"https://github.com/astro/skyflake","last_synced_at":"2025-04-09T11:30:57.934Z","repository":{"id":66098819,"uuid":"560149391","full_name":"astro/skyflake","owner":"astro","description":"NixOS Hyperconverged Infrastructure on Nomad/NixOS","archived":false,"fork":false,"pushed_at":"2023-10-13T11:41:44.000Z","size":2978,"stargazers_count":145,"open_issues_count":4,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-04-14T04:03:34.809Z","etag":null,"topics":["ceph","cluster","flakes","hyperconverged-infrastructure","microvm","nix","nixos","nomad"],"latest_commit_sha":null,"homepage":"https://astro.github.io/skyflake/","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["astro"]}},"created_at":"2022-10-31T20:55:17.000Z","updated_at":"2024-08-04T15:49:18.904Z","dependencies_parsed_at":"2024-08-04T15:49:16.828Z","dependency_job_id":"7699b994-d829-48d1-986b-994d7040fcc3","html_url":"https://github.com/astro/skyflake","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/astro%2Fskyflake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Fskyflake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Fskyflake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astro%2Fskyflake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astro","download_url":"https://codeload.github.com/astro/skyflake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031073,"owners_count":21036325,"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":["ceph","cluster","flakes","hyperconverged-infrastructure","microvm","nix","nixos","nomad"],"created_at":"2024-08-04T15:01:28.532Z","updated_at":"2025-04-09T11:30:55.855Z","avatar_url":"https://github.com/astro.png","language":"Nix","funding_links":["https://github.com/sponsors/astro"],"categories":["Nix","Infrastructure setup"],"sub_categories":["Automation and Infrastructure Management"],"readme":"# Skyflake: Hyperconverged Infrastructure for NixOS\n\n- No Docker, no Kubernetes\n- Hosts run NixOS, payloads are NixOS in [microvm.nix](https://github.com/astro/microvm.nix)\n- Static hosts, dynamic virtual machines managed by Nomad\n- Deploy machines by `git push` your Nix Flake\n\n## Running the example cluster\n\n- Have a bridge `virbr0`.\n- Provide Internet access.\n- Have 3x 4 GB RAM.\n- Have 3x 20 GB disk.\n\n- Put your SSH public key into `example-server.nix`\n- Run MicroVMs in parallel:\n\n  ```bash\n  nix run .#example1\n  nix run .#example2\n  nix run .#example3\n  ```\n- Login and check for the IP address.\n- Next, create your user flake:\n\n  ```nix\n  {\n    outputs = { self, nixpkgs }: {\n      nixosConfigurations =\n        let\n          mkHost = hostName:\n            nixpkgs.lib.nixosSystem {\n              modules = [ {\n                system.stateVersion = \"22.11\";\n                networking = { inherit hostName; };\n                services.openssh = {\n                  enable = true;\n                  permitRootLogin = \"yes\";\n                };\n                users.users.root.password = \"\";\n              } ];\n              system = \"x86_64-linux\";\n            };\n        in {\n          skytest1 = mkHost \"skytest1\";\n          skytest2 = mkHost \"skytest2\";\n          skytest3 = mkHost \"skytest3\";\n          skytest4 = mkHost \"skytest4\";\n        };\n    };\n  }\n  ```\n- Finally, deploy by pushing to a branch by hostname:\n\n  ```shell\n  git push test@10.23.23.43:example \\\n    HEAD:skytest1 HEAD:skytest2 \\\n    HEAD:skytest3 HEAD:skytest4\n  ```\n\n## How it works\n\nThe central component is a **nixosModule** that is configured for\nservers to be part of a cluster.\n\nUsers have a flat hierarchy of flake repositories they can push\nto. Their ssh interaction is forced into a custom script that lets\nonly `git push`, triggering a hook that does the following:\n\n1. Builds the NixOS system\n2. Copies the result into a cluster-shared binary cache\n3. Runs the job on the cluster through Nomad\n\n## Server configuration options\n\nThe nixosModule for the servers that make up the cluster provides the\nfollowing knobs:\n\n*TODO*\n\n## Deployment customization\n\nNetwork setup, storage integration and more options of the MicroVMs\nmust be customized for the environment.\n\nSee `default-customization.nix`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro%2Fskyflake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastro%2Fskyflake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastro%2Fskyflake/lists"}