Update README.md

This commit is contained in:
Pim Kunis 2024-02-10 22:14:10 +00:00
parent cba31c7a65
commit 5b8c26f489

View file

@ -1,20 +1,27 @@
# nixos-servers
Nix definitions to configure our physical servers.
Currently, our three main servers are all Nixified!
Nix definitions to configure our server.
Currently, our three main machines and all virtual machines run NixOS!
## Additional documentation
## Acknowledgements
- [Kubernetes](docs/kubernetes.md)
- [deploy-rs](https://github.com/serokell/deploy-rs): NixOS deploy tool with rollback functionality
- [kubenix](https://kubenix.org/): Kubernetes management in Nix (usage planned for the future)
- [disko](https://github.com/nix-community/disko): declarative disk partitioning
- [agenix](https://github.com/ryantm/agenix): deployment of encrypted secrets to NixOS machines
- [dns.nix](https://github.com/kirelagin/dns.nix): A Nix DSL for defining DNS zones
- [microvm.nix](https://github.com/astro/microvm.nix): Declarative virtual machine management in NixOS
## Prerequisites
## Installation
### Prerequisites
1. Install the Nix package manager or NixOS ([link](https://nixos.org/download))
2. Enable flake and nix commands ([link](https://nixos.wiki/wiki/Flakes#Enable_flakes_permanently_in_NixOS))
3. Install Direnv ([link](https://direnv.net/))
4. Allow direnv for this repository: `direnv allow`
## Bootstrapping
### Bootstrapping
We bootstrap our physical server using [nixos-anywhere](https://github.com/nix-community/nixos-anywhere).
This reformats the hard disk of the server and installs a fresh NixOS.
@ -26,7 +33,7 @@ Additionally, it deploys an age identity, which is later used for decrypting sec
2. Ensure you have root SSH access to the server.
3. Run nixos-anywhere: `./bootstrap.sh <servername> <hostname>`
## Deployment
### Deployment
To deploy all servers at once: `deploy`
To deploy only one server: `deploy --targets .#<host>`
@ -39,3 +46,7 @@ A workaround is to deploy the share without `deploy-rs`'s rollback feature enabl
```
deploy --targets .#lewis --auto-rollback false --magic-rollback false
```
## Additional documentation
- [Kubernetes](docs/kubernetes.md)