Skip to content

Commit d2ec64a

Browse files
committed
docs(hosts): update installation process
1 parent ab0e62c commit d2ec64a

File tree

2 files changed

+56
-90
lines changed

2 files changed

+56
-90
lines changed

hosts/bluetop/README.adoc

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,70 +12,53 @@ os.hosts.bluetop - NixOS configuration for the bluetop host
1212

1313
== Description
1414

15-
{nixos}[NixOS] configuration for the `bluetop` host
15+
{nixos}[NixOS] configuration for the `bluetop` host.
1616

1717
== Usage
1818

19+
To clone the latest flake of the `bluetop` host to `<REPOSITORY>`, run:
20+
21+
[,bash]
22+
----
23+
nix \
24+
--extra-experimental-features "flakes nix-command" \
25+
flake \
26+
clone \
27+
--dest <REPOSITORY> \
28+
github:trueNAHO/os
29+
----
30+
1931
.Wipe and Format all Disks
2032
[%collapsible]
2133
====
2234
[IMPORTANT]
2335
The following operations wipe and format all disks, leading to irreversible data
2436
loss.
2537
26-
The following two code snippets wipe and format all disks for the `bluetop` host
27-
with {erase-your-darlings}[impermanent] {disko-config-nix}[FAT32 boot, encrypted
28-
Btrfs root, and swap partitions].
29-
3038
To {data-at-rest-encryption-preparing-the-disk}[prepare the disk by overwriting
3139
it with a stream of random bytes], {securely-wipe-disk-shred}[shred it] by
3240
running:
3341
3442
[,bash]
3543
----
36-
shred --random-source=/dev/urandom --verbose /dev/nvme0n1
37-
----
38-
39-
Then, encrypt and format all disks for the `bluetop` host by running:
40-
41-
[,bash]
42-
----
43-
(
44-
set -e
45-
46-
trap 'rm --force "$disko" "$password_file"' EXIT
47-
48-
disko="$(mktemp)"
49-
50-
curl \
51-
--output "$disko" \
52-
https://raw.githubusercontent.com/trueNAHO/os/master/hosts/bluetop/disko.nix
53-
54-
password_file="$(mktemp)"
55-
56-
read -p 'Disk encryption password: ' -rs password
57-
printf '%s' "$password" >"$password_file"
58-
59-
nix run \
60-
--extra-experimental-features "flakes nix-command" \
61-
github:nix-community/disko \
62-
-- \
63-
--arg passwordFile "\"$password_file\"" \
64-
--mode disko \
65-
"$disko"
66-
)
44+
nix \
45+
--extra-experimental-features "flakes nix-command" \
46+
run \
47+
<REPOSITORY>#shred \
48+
/dev/nvme0n1
6749
----
68-
====
6950
70-
To clone the latest flake of the `bluetop` host to `/mnt/etc/nixos`, run:
51+
Then, format all disks by running:
7152
7253
[,bash]
7354
----
74-
nix flake clone \
75-
--dest /mnt/etc/nixos \
55+
nix \
7656
--extra-experimental-features "flakes nix-command" \
77-
github:trueNAHO/os
57+
run \
58+
<REPOSITORY>#format \
59+
<REPOSITORY>/hosts/bluetop/disko.nix
7860
----
61+
====
7962

8063
Optionally, update the hardware configuration of the `bluetop` host with:
8164

@@ -85,21 +68,21 @@ nixos-generate-config \
8568
--no-filesystems \
8669
--root /mnt \
8770
--show-hardware-config \
88-
>/mnt/etc/nixos/hosts/bluetop/hardware-configuration.nix
71+
><REPOSITORY>/hosts/bluetop/hardware_configuration.nix
8972
----
9073

9174
Then, install the `bluetop` host with:
9275

9376
[,bash]
9477
----
95-
nixos-install --flake /mnt/etc/nixos#bluetop
78+
nixos-install --flake <REPOSITORY>#bluetop
9679
----
9780

98-
Finally, reboot the system with:
81+
Finally, power off the system with:
9982

10083
[,bash]
10184
----
102-
reboot
85+
poweroff
10386
----
10487

10588
== See Also

hosts/masterplan/README.adoc

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,70 +12,53 @@ os.hosts.masterplan - NixOS configuration for the masterplan host
1212

1313
== Description
1414

15-
{nixos}[NixOS] configuration for the `masterplan` host
15+
{nixos}[NixOS] configuration for the `masterplan` host.
1616

1717
== Usage
1818

19+
To clone the latest flake of the `masterplan` host to `<REPOSITORY>`, run:
20+
21+
[,bash]
22+
----
23+
nix \
24+
--extra-experimental-features "flakes nix-command" \
25+
flake \
26+
clone \
27+
--dest <REPOSITORY> \
28+
github:trueNAHO/os
29+
----
30+
1931
.Wipe and Format all Disks
2032
[%collapsible]
2133
====
2234
[IMPORTANT]
2335
The following operations wipe and format all disks, leading to irreversible data
2436
loss.
2537
26-
The following two code snippets wipe and format all disks for the `masterplan`
27-
host with {erase-your-darlings}[impermanent] {disko-config-nix}[FAT32 boot,
28-
encrypted Btrfs root, and swap partitions].
29-
3038
To {data-at-rest-encryption-preparing-the-disk}[prepare the disk by overwriting
3139
it with a stream of random bytes], {securely-wipe-disk-shred}[shred it] by
3240
running:
3341
3442
[,bash]
3543
----
36-
shred --random-source=/dev/urandom --verbose /dev/nvme0n1
37-
----
38-
39-
Then, encrypt and format all disks for the `masterplan` host by running:
40-
41-
[,bash]
42-
----
43-
(
44-
set -e
45-
46-
trap 'rm --force "$disko" "$password_file"' EXIT
47-
48-
disko="$(mktemp)"
49-
50-
curl \
51-
--output "$disko" \
52-
https://raw.githubusercontent.com/trueNAHO/os/master/hosts/masterplan/disko.nix
53-
54-
password_file="$(mktemp)"
55-
56-
read -p 'Disk encryption password: ' -rs password
57-
printf '%s' "$password" >"$password_file"
58-
59-
nix run \
60-
--extra-experimental-features "flakes nix-command" \
61-
github:nix-community/disko \
62-
-- \
63-
--arg passwordFile "\"$password_file\"" \
64-
--mode disko \
65-
"$disko"
66-
)
44+
nix \
45+
--extra-experimental-features "flakes nix-command" \
46+
run \
47+
<REPOSITORY>#shred \
48+
/dev/nvme0n1
6749
----
68-
====
6950
70-
To clone the latest flake of the `masterplan` host to `/mnt/etc/nixos`, run:
51+
Then, format all disks by running:
7152
7253
[,bash]
7354
----
74-
nix flake clone \
75-
--dest /mnt/etc/nixos \
55+
nix \
7656
--extra-experimental-features "flakes nix-command" \
77-
github:trueNAHO/os
57+
run \
58+
<REPOSITORY>#format \
59+
<REPOSITORY>/hosts/masterplan/disko.nix
7860
----
61+
====
7962

8063
Optionally, update the hardware configuration of the `masterplan` host with:
8164

@@ -85,21 +68,21 @@ nixos-generate-config \
8568
--no-filesystems \
8669
--root /mnt \
8770
--show-hardware-config \
88-
>/mnt/etc/nixos/hosts/masterplan/hardware-configuration.nix
71+
><REPOSITORY>/hosts/masterplan/hardware_configuration.nix
8972
----
9073

9174
Then, install the `masterplan` host with:
9275

9376
[,bash]
9477
----
95-
nixos-install --flake /mnt/etc/nixos#masterplan
78+
nixos-install --flake <REPOSITORY>#masterplan
9679
----
9780

98-
Finally, reboot the system with:
81+
Finally, power off the system with:
9982

10083
[,bash]
10184
----
102-
reboot
85+
poweroff
10386
----
10487

10588
== See Also

0 commit comments

Comments
 (0)