Skip to content

Commit e11016b

Browse files
committed
markdown fixes
1 parent 055aa8b commit e11016b

File tree

2 files changed

+33
-31
lines changed

2 files changed

+33
-31
lines changed

README.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,67 @@
55
Install nix with the [DeterminateSystems nix-installer](https://github.com/DeterminateSystems/nix-installer)
66

77
```shell
8-
$ nix-installer plan macos --case-sensitive --extra-conf "use-case-hack = false" --encrypt true > plan.json
9-
$ nix-installer install plan.json
8+
nix-installer plan macos --case-sensitive --extra-conf "use-case-hack = false" --encrypt true > plan.json
9+
nix-installer install plan.json
1010

11-
$ sudo mv /etc/nix/nix.conf{,.before-nix-darwin}
12-
$ nix --extra-experimental-features 'flakes nix-command' run nix-darwin -- switch --flake .
11+
sudo mv /etc/nix/nix.conf{,.before-nix-darwin}
12+
nix --extra-experimental-features 'flakes nix-command' run nix-darwin -- switch --flake .
1313
```
1414

1515
## Raspberry Pi bootstrap
1616

1717
Generate SD card image
1818

1919
```shell
20-
$ task nixos:sd host=adama
20+
task nixos:sd host=adama
2121
```
2222

23-
Flash SD card or USB stick with `sd.img` using [Raspberry Pi Imager](https://www.raspberrypi.com/software/), put in RPi and start attached to network.
23+
1. Flash SD card or USB stick with `sd.img`
24+
2. Put SD card in RPi
25+
3. Start RPi attached to network
2426

2527
Grab new ssh host key.
2628

2729
```shell
28-
$ ssh-keyscan 192.168.1.195
30+
ssh-keyscan 192.168.1.195
2931
```
3032

3133
Update host key in `secrets/secrets.nix` and rekey secrets.
3234

3335
```shell
34-
$ cd secrets
35-
$ agenix --rekey
36+
cd secrets
37+
agenix --rekey
3638
```
3739

3840
Copy user secret decryption key to home dir.
3941

4042
```shell
41-
$ scp ~/.ssh/id_ed25519 adama:.ssh/
43+
scp ~/.ssh/id_ed25519 adama:.ssh/
4244
```
4345

4446
Deploy refreshed secrets.
4547

4648
```shell
47-
$ nixos-rebuild switch --flake . --target-host 192.168.1.195 --fast --use-remote-sudo
49+
nixos-rebuild switch --flake . --target-host 192.168.1.195 --fast --use-remote-sudo
4850
```
4951

5052
VM install
5153

52-
```
53-
$ parted /dev/sda -- mklabel gpt
54-
$ parted /dev/sda -- mkpart root ext4 512MB -8GB
55-
$ parted /dev/sda -- mkpart swap linux-swap -8GB 100%
56-
$ parted /dev/sda -- mkpart ESP fat32 1MB 512MB
57-
$ parted /dev/sda -- set 3 esp on
58-
59-
$ mkfs.ext4 -L nixos /dev/sda1
60-
$ mkswap -L swap /dev/sda2
61-
$ mkfs.fat -F 32 -n boot /dev/sda3
62-
63-
$ mount /dev/disk/by-label/nixos /mnt
64-
$ mkdir -p /mnt/boot
65-
$ mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
66-
$ swapon /dev/sda2
67-
68-
$ nixos-install --flake github:esselius/cfg#vm
54+
```shell
55+
parted /dev/sda -- mklabel gpt
56+
parted /dev/sda -- mkpart root ext4 512MB -8GB
57+
parted /dev/sda -- mkpart swap linux-swap -8GB 100%
58+
parted /dev/sda -- mkpart ESP fat32 1MB 512MB
59+
parted /dev/sda -- set 3 esp on
60+
61+
mkfs.ext4 -L nixos /dev/sda1
62+
mkswap -L swap /dev/sda2
63+
mkfs.fat -F 32 -n boot /dev/sda3
64+
65+
mount /dev/disk/by-label/nixos /mnt
66+
mkdir -p /mnt/boot
67+
mount -o umask=077 /dev/disk/by-label/boot /mnt/boot
68+
swapon /dev/sda2
69+
70+
nixos-install --flake github:esselius/cfg#vm
6971
```

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)