Docs: update machine hardware config instructions #1625
|
@ -150,10 +150,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:
|
Generate the `hardware-configuration.nix` file for your machine by executing the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh root@flash-installer.local nixos-generate-config --no-filesystems --show-hardware-config > machines/jon/hardware-configuration.nix
|
clan machines hw-generate [MACHINE_NAME] [HOSTNAME]
|
||||||
```
|
```
|
||||||
|
|
||||||
This command connects to `flash-installer.local` as `root`, runs `nixos-generate-config` to detect hardware configurations (excluding filesystems), and writes them to `machines/jon/hardware-configuration.nix`.
|
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. `flash-installer.local`
|
||||||
|
|
||||||
|
!!! Example
|
||||||
|
```bash
|
||||||
|
clan machines hw-generate jon flash-installer.local
|
||||||
|
```
|
||||||
|
|
||||||
|
This command connects to `flash-installer.local` as `root`, runs `nixos-generate-config` to detect hardware configurations (excluding filesystems), and writes them to `machines/jon/hardware-configuration.nix`.
|
||||||
|
|
||||||
### Step 3: Custom Disk Formatting
|
### Step 3: Custom Disk Formatting
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,13 @@ Examples:
|
||||||
generate_hw_parser = subparser.add_parser(
|
generate_hw_parser = subparser.add_parser(
|
||||||
"hw-generate",
|
"hw-generate",
|
||||||
help="Generate hardware specifics for a machine",
|
help="Generate hardware specifics for a machine",
|
||||||
|
description="""
|
||||||
|
Generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc.
|
||||||
|
|
||||||
|
The target must be a Linux based system reachable via SSH.
|
||||||
|
""",
|
||||||
epilog=(
|
epilog=(
|
||||||
"""
|
"""
|
||||||
This subcommand generates hardware specifics for a machine. Such as the host platform, available kernel modules, etc.
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ clan machines hw-generate [MACHINE] [TARGET_HOST]
|
$ clan machines hw-generate [MACHINE] [TARGET_HOST]
|
||||||
|
@ -98,9 +101,9 @@ This subcommand shows the details of a machine managed by this clan like icon, d
|
||||||
"install",
|
"install",
|
||||||
help="Install a machine",
|
help="Install a machine",
|
||||||
description="""
|
description="""
|
||||||
Install a configured machine over the network.
|
Install a configured machine over the network.
|
||||||
The target must be a Linux based system reachable via SSH.
|
The target must be a Linux based system reachable via SSH.
|
||||||
Installing a machine means overwriting the target's disk.
|
Installing a machine means overwriting the target's disk.
|
||||||
""",
|
""",
|
||||||
epilog=(
|
epilog=(
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -4,7 +4,11 @@ throw ''
|
||||||
|
|
||||||
Run the following command:
|
Run the following command:
|
||||||
|
|
||||||
|
'clan machines hw-generate <maschine_name> <hostname>'
|
||||||
|
|
||||||
|
OR:
|
||||||
|
|
||||||
'ssh root@<hostname> nixos-generate-config --no-filesystems --show-hardware-config > hardware-configuration.nix'
|
'ssh root@<hostname> nixos-generate-config --no-filesystems --show-hardware-config > hardware-configuration.nix'
|
||||||
|
|
||||||
Then replace this file with the generated "hardware-configuration.nix".
|
And manually eplace this file with the generated "hardware-configuration.nix".
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user