hw-configure: use hostname specified in the nixos configuration

This commit is contained in:
Jörg Thalheim
2024-07-22 08:21:43 +02:00
parent fabfba77cf
commit 3bbfe7fad2
2 changed files with 25 additions and 12 deletions

View File

@@ -144,17 +144,17 @@ These steps will allow you to update your machine later.
Generate the `hardware-configuration.nix` file for your machine by executing the following command:
```bash
clan machines hw-generate [MACHINE_NAME] [HOSTNAME]
clan machines hw-generate [MACHINE_NAME]
```
replace `[MACHINE_NAME]` with the name of the machine i.e. `jon` and `[HOSTNAME]` with the `ip_adress` or `hostname` of the machine within the network. i.e. `<IP>`
!!! Example
```bash
clan machines hw-generate jon <IP>
clan machines hw-generate jon
```
This command connects to `<IP>` as `root`, runs `nixos-generate-config` to detect hardware configurations (excluding filesystems), and writes them to `machines/jon/hardware-configuration.nix`.
This command connects to the ip configured in the previous step, runs `nixos-generate-config` to detect hardware configurations (excluding filesystems), and writes them to `machines/jon/hardware-configuration.nix`.
### Step 3: Custom Disk Formatting