diff --git a/documentation_titlepage.md b/documentation_titlepage.md index ee020cf..eb7dbd6 100644 --- a/documentation_titlepage.md +++ b/documentation_titlepage.md @@ -171,6 +171,46 @@ Synchronizes local system changes back to the repository. This script: 5. Syncs changes from `/etc/nixos/modules` back to the repository 6. Stages, commits, and pushes changes to the remote git repository with a timestamped commit message +## Adding New Systems + +To add a new system configuration to the infrastructure: + +1. **Create the configuration file** in `nix-system-configs/modules/system/`: + ```bash + cp nix-system-configs/modules/system/blank_system_USE_THIS_AS_COPY.nix \ + nix-system-configs/modules/system/your-new-system.nix + ``` + +2. **Edit the configuration** to set your system's unique properties: + ```nix + config = { + local.hostname = "nixos-your-system"; + local.username = "yourusername"; + local.userDescription = "Your System Description"; + local.address = "10.XXX.XXX.XXX"; # Choose an available IP + + system.stateVersion = "25.11"; + }; + ``` + +3. **Register in `flake.nix`** to make it available for builds: + ```nix + nixosConfigurations = { + # ...existing configurations... + + "nixos-your-system" = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ./nix-system-configs/modules/system/your-new-system.nix ]; + }; + }; + ``` +4. ***IF YOU WANT TO CHECK IT MANUALLY*** - **Test the configuration** before deploying, change the `nixos-your-system` accordingly: + ```bash + nix build .#nixosConfigurations.nixos-your-system.config.system.build.toplevel + ``` + +Once the build succeeds, the configuration is ready for deployment using the `pull.zsh` script on the target machine. + ## How to maintain the local machines > [!NOTE] The following maintenance scripts should be made less unwieldy to use, so they will be changed in the next