Infrastructure as Code for our home servers
Find a file
Pim Kunis 37f1e07e74 create helpers for creating nixos system and deploy nodes
move machine definitions to separate directory
2023-11-15 13:06:59 +01:00
machines create helpers for creating nixos system and deploy nodes 2023-11-15 13:06:59 +01:00
secrets remove ansible 2023-11-14 23:53:04 +01:00
.envrc improve nixos anywhere script: 2023-11-15 11:41:45 +01:00
.gitignore update README 2023-11-05 19:03:44 +01:00
agenix.nix create top-level machine definition that is used by both deploy-rs and 2023-11-15 12:55:57 +01:00
bootstrap.sh create top-level machine definition that is used by both deploy-rs and 2023-11-15 12:55:57 +01:00
configuration.nix create top-level machine definition that is used by both deploy-rs and 2023-11-15 12:55:57 +01:00
disk-config.nix initial nixos-anywhere 2023-11-13 22:44:43 +01:00
flake.lock improve nixos anywhere script: 2023-11-15 11:41:45 +01:00
flake.nix create helpers for creating nixos system and deploy nodes 2023-11-15 13:06:59 +01:00
hardware-configuration.nix initial nixos-anywhere 2023-11-13 22:44:43 +01:00
nftables.conf add firewall! 2023-11-08 21:16:51 +01:00
README.md initial nixos-anywhere 2023-11-13 22:44:43 +01:00

nixos-servers

Nix definitions to configure our physical servers. Currently, only one physical server (named jefke) is implemented.

Deployment

NEW

nix run github:numtide/nixos-anywhere -- --flake .#hypervisor root@jefke.hyp

Prerequisites

Before a NixOS definition can be deployed, some prerequite preparational steps must be performed.

  1. 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.
  2. Enable SSH and install authorized keys.
  3. Ensure Python3 is installed for Ansible.
  4. Run Ansible playbook which deploys secrets ansible-playbook deploy_secrets.yml.

NixOS deployment

Finally, the NixOS definition can be deployed as follows: nix run github:serokell/deploy-rs.