From 49bbde8d56363c6dad91c1cb464c922d086f4e15 Mon Sep 17 00:00:00 2001 From: cosmeak Date: Wed, 8 Jul 2026 13:36:26 +0200 Subject: [PATCH] docs: update readme documentation --- README.md | 83 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 08bbbbe..6674dc6 100644 --- a/README.md +++ b/README.md @@ -34,25 +34,42 @@ This repository want this to be multi-user and multi-host so there is some worka - [ ] Disk configuration (disko) - [ ] Encrypted disks (?) - [ ] Home management (hjem) -- [-] Automatic updates (*cannot be entirely done, since tangled does not support pipeline based on time.*) -- Network topology (nix-topology) +- [ ] Automatic updates (*cannot be entirely done, since tangled does not support pipeline based on time.*) +- [ ] Network topology (nix-topology) ## Installation -> TODO: write the documentation to install easely a new host with a few steps +### NixOS + +1. Boot the NixOS ISO, partition/format/mount your disks manually (no disko yet). +2. Clone the repo onto the target: `git clone /mnt/etc/asgard && cd /mnt/etc/asgard` +3. `mkdir -p configurations/` +4. `just generate-hardware` → generates facter.json +5. Write configurations//configurations.nix (copy an existing host as a template), including your fileSystems entries matching step 1. +6. Install: `sudo nixos-install --flake .#` +7. Reboot, then use `nix develop && just switch` for future rebuilds. + +### nix-darwin + +1. Install Nix on macOS (e.g. the Lix installer). +2. Clone the repo: `git clone ~/asgard && cd ~/asgard` +3. `mkdir -p configurations/`, write configurations.nix (use njord as a reference — no facter.json needed on Darwin). +4. Bootstrap once: `nix run nix-darwin -- switch --flake .#` +5. From then on: `nix develop && just switch` ## Machines -| Hostname | Motherboard | CPU | GPU | RAM | OS | Usage | Status | -| :------------- | :-------------------------------- | :------------------- | :------------ | :--: | :-: | :------: | :----: | -| `andhrimnir` | Aorus B450 Elite | AMD Ryzen 3 3300X | Nvidia 1060 | 16Go | ❄️ | 🖥️ - 🎮️ | 🟢️ | -| `elli` | HP ProDesk 400 G1 DM | Intel Pentium G3250T | - | 8Go | ❄️ | 💾️ | 🟠 | -| `loki` | ASUS ROG STRIX B760-I GAMING WIFI | Intel i5 13600kf | Nvidia 4070ti | 32Go | ❄️ | 🎮️ | 🟢️ | -| `nanna` | Lenovo Legion Y530 15ICH | Intel i5 | Nvidia 1050ti | 16Go | ❄️ | 🖥️ - 🎮️ | 🟢️ | -| `njord` | - | Apple M2 Pro | Apple M2 Pro | 32Go | 🍎️ | 🖥️ | 🟢️ | -| `sunna` | ASUS ROG STRIX G15 | Intel i7 10870H | Nvidia 2060 | 16Go | ❄️ | 🖥️ | 🔴 | -| `syn` | Raspberry Pi3 b+ | - | - | 1Go | ❄️ | 💾️ | 🔴 | -| `vali` | WSL | - | - | - | ❄️ | 💾️ | 🔴 | +| Hostname | Motherboard | CPU | GPU | RAM | OS | Usage | Status | +| :------------- | :-------------------------------- | :------------------- | :-------------- | :--: | :-: | :-----: | :----: | +| `andhrimnir` | MSI PRO B850-P WIFI | AMD Ryzen 5 5500X 3D | AMD RX 9060 XT | 32Go | ❄️ | 🎮️ | 🟢️ | +| `elli` | HP ProDesk 400 G1 DM | Intel Pentium G3250T | - | 8Go | ❄️ | 💾️ | 🟠 | +| `loki` | ASUS ROG STRIX B760-I GAMING WIFI | Intel i5 13600kf | Nvidia 4070ti | 32Go | ❄️ | 🎮️ | 🟢️ | +| `nanna` | Lenovo Legion Y530 15ICH | Intel i5 | Nvidia 1050ti | 16Go | ❄️ | 🖥️/🎮️ | 🟢️ | +| `njord` | - | Apple M2 Pro | Apple M2 Pro | 32Go | 🍎️ | 🖥️ | 🟢️ | +| `nott` | Aorus B450 Elite | AMD Ryzen 3 3300X | Nvidia 1060 | 16Go | ❄️ | 🎮️ | 🟢️ | +| `sunna` | ASUS ROG STRIX G15 | Intel i7 10870H | Nvidia 2060 | 16Go | ❄️ | 🖥️ | 🔴 | +| `syn` | Raspberry Pi3 b+ | - | - | 1Go | ❄️ | 💾️ | 🔴 | +| `vali` | WSL | - | - | - | ❄️ | 💾️ | 🔴 |
Annotations @@ -69,28 +86,29 @@ This repository want this to be multi-user and multi-host so there is some worka ## Folder structure -This repository use a `dentritic pattern` to make everything work with ease. With this pattern, every file is a modules (modules, configurations, ...), so everything needs to be inside the modules folders and imported as it. - -The only things not treated as it are the custom packages inside the packages folder. - -> [!NOTE] -> This is my current idea of what will look the folders, it can change in the future. +This repository use a `dentritic pattern` combined with the logic of the flake output to make everything work with ease and easy to find. ``` . -├── modules/ -│ ├── features/ # Feature definitions -│ ├── hjem/ # Hjem modules (not using flake-parts modules) -│ ├── hosts/ # machines configurations -│ ├── lib/ # Custom library (mostly factories) -│ ├── packages/ # Custom packages derivations (per-system) -│ ├── tools/ # Basic tools configurations (flake-parts, hjem, impermanence, ...) -│ ├── users/ # Users configurations -│ └── default.nix # Modules entrypoint with auto-import -├── secrets/ # Secrets files used by agenix -│ └── secrets.nix # Secrets entrypoint -├── flake.nix # Configuration entrypoint -└── justfile # Command helper +├── configurations/ +│ └── / +│ │ ├── configurations.nix +│ │ └── facter.json # Optionnal +├── devshells/ +├── lib/ +├── modules/ +├── overlays/ +├── packages/ +├── secrets/ +│ ├── ..age # Encrypted secrets +│ └── secrets.nix # Secrets entrypoint +├── templates/ +│ ├── / +│ │ ├── .nix +│ │ └── default.nix # Basic template for the language, used as a base for the framework ones. +├── flake.nix +├── flake-module.nix # Additionnal modules definition for flake-parts. +└── justfile # Command helper ``` ## Commands @@ -105,6 +123,7 @@ Available recipes: size # Print size of the nix store switch hostname=hostname # Rebuild the system update # Update dependencies + generate-hardware # Generate facter report from the current hardware into the host configuration folder ``` ## Documentations -- 2.51.2