diff --git a/src/procedures/skynet/new_server.md b/src/procedures/skynet/new_server.md index b347178..7ec7a89 100644 --- a/src/procedures/skynet/new_server.md +++ b/src/procedures/skynet/new_server.md @@ -144,9 +144,35 @@ This key is used to decrypt secrets stored in our Nixos repo and as such needs t 4. Commit all the changed files +## Push new configuration +### Create config +An example server config for nixos is [available here][nixos_template]. +Copy it to a new file and name it ``name.nix``. +Fill in all relevant details (name/ip/name details/its purpose/...). + +Finally add it to the bottom of the [``flake.nix``][nixos_flake]. +Save and commit the files. + +### Push Config +There are two ways to test out the config, manual and pipeline. +Each has pros and cons. + +#### Manually +This requires your key to be added the the keys for the [root account][nixos_root] and your ``~/.ssh/config`` to be set up properly (TODO: SSH tutorial) + +1. Build it with ``colmena build --on name`` +2. If it builds ye can test deployment +3. Deploy it using ``colmena apply --on name`` + +#### Pipeline +Just push it to the repo and the pipeline will handle building and deployment. +The disadvantage of this is you cannot fix any mistakes before they are pushed. [server_name_skynet]: https://2009.skynet.ie/history.html [server_names]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/Possible_Server_Names.md [server_inventory]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/ITD/Server_Inventory.csv [proxmox_lxc]: https://pve.proxmox.com/wiki/Linux_Container -[nixos_secrets]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/secrets/secrets.nix#L35 \ No newline at end of file +[nixos_secrets]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/secrets/secrets.nix#L35 +[nixos_template]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/machines/_template.nix +[nixos_flake]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/flake.nix#L156 +[nixos_root]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/machines/_base.nix#L75 \ No newline at end of file