Infrastructure as Code for our home servers
|
||
---|---|---|
ansible | ||
.gitignore | ||
configuration.nix | ||
flake.lock | ||
flake.nix | ||
hardware-configuration.nix | ||
README.md |
nixos-servers
Nix definitions to configure our physical servers. Currently, only one physical server (named jefke) is implemented.
Deployment
Prerequisites
Before a NixOS definition can be deployed, some prerequite preparational steps must be performed.
- Manually install NixOS on the physical machine. This could potentially be automated in the future with nixos-anywhere, but for now this is a manual process.
- Enable SSH and install authorized keys.
- Ensure Python3 is installed for Ansible.
- Run Ansible playbook which deploys secrets
ansible-playbook deploy_secrets.yml
. - Deploy the NixOS definition:
nixos-rebuild switch -j auto --target-host root@jefke.hyp --flake ".#jefke"
.