# Numbus Server Configuration ## Project Overview Welcome to the **numbus server** project ! This **repository** contains the numbus server **NixOS configuration**. It uses the **Nix** package manager and the **NixOS** operating system to declaratively **manage** the **entire system** configuration. The goal of this project is to be able to **deploy** a server with a **large set** of services **in minutes**. This make **homelabbing** very **accessible** and **easy** and allows non-very-technical users to **take control over their data**. #### Features - Fully **free**, **libre** and **open-source** project. - **Easy** to deploy. - **Set** and **forget** solution. - Highly **reliable**. - **Secure**. - Plenty of **popular** services **available**. #### Key Technologies - **NixOS:** The declarative Linux distribution. For an easy management of Linux systems. Deploy, maintain, and update your system like a breeze. - **Nix Flakes:** Used for reproducible builds and dependency management. - **Docker & Docker Compose:** For running containerised services with the Traefik reverse proxy. - **Sops-nix:** For managing secrets. - **NixOS-anywhere:** For the first deployment of the NixOS configuration to a remote machine. - **Disko:** For declarative disk partitioning. ## Get started The primary workflow for this project is centred around the **`deploy.sh`** script. This script automates the entire process of deploying the **`numbus-server`** configuration to a new machine. NixOS does the **heavy lifting** when it comes to system configuration but there are still **changes** that need to be made **dynamically** to adapt to your system : for example, your **hardware** configuration, **keys** and **secrets**, **network** environment, etc. #### Deployment modes The deployment process is handled by the **`deploy.sh`** script. This script can be run in three modes: 1. **Interactive Mode:** The script will prompt for all necessary configuration values, such as the target host's IP address, the disk to install on, domain names, and API tokens. 2. **Non-interactive automated Mode:** The script can read configuration values from a file, allowing for non-interactive deployments. 3. **Update and maintain mode**: The script will update a remote system on which this NixOS configuration has already been deployed. #### To run the deployment: 1. Get the repository by cloning it: ```bash git clone https://git.numbus.eu/raphael/numbus-server.git ``` 2. Run the deployment script: ```bash sudo bash deploy.sh ``` 3. Follow the on-screen prompts to choose the deployment mode and provide the required information. The script will then perform the following actions: - Adapt the configuration to the current machine. - Generate SSH and `sops` keys. - Gather secrets locally and encrypt them on the remote machine. - Generate configuration files for Docker services. - Use `nixos-anywhere` to deploy the NixOS configuration from the `flake.nix` file to the target machine. - Check that the deployment succeeded by SSHing into the new installation. - Guiding the user through the (pretty easy) setup of all the web UIs.