Skip to content

Commit

Permalink
style(docs): format
Browse files Browse the repository at this point in the history
  • Loading branch information
brckd committed Dec 10, 2024
1 parent 530d8fb commit 1c116af
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 19 deletions.
13 changes: 9 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ npm create astro@latest -- --template starlight
## 🚀 Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:
Inside of your Astro + Starlight project, you'll see the following folders and
files:

```
.
Expand All @@ -31,9 +32,11 @@ Inside of your Astro + Starlight project, you'll see the following folders and f
└── tsconfig.json
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory.
Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.
Images can be added to `src/assets/` and embedded in Markdown with a relative
link.

Static assets, like favicons, can be placed in the `public/` directory.

Expand All @@ -52,4 +55,6 @@ All commands are run from the root of the project, from a terminal:

## 👀 Want to learn more?

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
Check out [Starlight’s docs](https://starlight.astro.build/), read
[the Astro documentation](https://docs.astro.build), or jump into the
[Astro Discord server](https://astro.build/chat).
22 changes: 16 additions & 6 deletions docs/src/content/docs/features/secure-boot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ sudo nix run nixpkgs#sbctl enroll-keys -- --microsoft

## TPM disk unlock

With secure boot in place, TPM can be used to automatically unlock encrypted partitions. After enabling this feature in the BIOS, setup your partitions. For each encrypted partition, setup disk unlock by replacing `<encrypted-partion>` with its identifier, e.g. `nvme0n1p1`, `sda1` or `disk/by-label/NIXOS`.
With secure boot in place, TPM can be used to automatically unlock encrypted
partitions. After enabling this feature in the BIOS, setup your partitions. For
each encrypted partition, setup disk unlock by replacing `<encrypted-partion>`
with its identifier, e.g. `nvme0n1p1`, `sda1` or `disk/by-label/NIXOS`.

<Tabs syncKey="nix-environment">
<TabItem label="NixOS">
Expand All @@ -70,7 +73,8 @@ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+7+12 /dev/<encrypted

### Outdated secure boot keys

After an OS update while using secure boot, keys might become outdated and this error appears on boot:
After an OS update while using secure boot, keys might become outdated and this
error appears on boot:

```
Verification failed: (0x1A) Security Violation
Expand Down Expand Up @@ -110,13 +114,17 @@ sudo nix run nixpkgs#sbctl reset

### Outdated TPM disk unlock

After an OS or UEFI update using TPM disk unlock, the disks may not be automatically unlocked and you will be prompted for the encryption password on boot. The following steps might resolve this issue.
After an OS or UEFI update using TPM disk unlock, the disks may not be
automatically unlocked and you will be prompted for the encryption password on
boot. The following steps might resolve this issue.

<Steps>
<ol>
<li>

For each encrypted partition, remove disk unlock by replacing `<encrypted-partion>` with its identifier, e.g. `nvme0n1p1`, `sda1` or `disk/by-label/NIXOS`.
For each encrypted partition, remove disk unlock by replacing
`<encrypted-partion>` with its identifier, e.g. `nvme0n1p1`, `sda1` or
`disk/by-label/NIXOS`.

<Tabs syncKey="nix-environment">
<TabItem label="NixOS">
Expand All @@ -139,5 +147,7 @@ sudo systemd-cryptenroll --wipe-slot tpm2 /dev/<encrypted-partition>

## Further reading

- Setting up [lanzaboote](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md)
- [TPM disk unlock](https://jnsgr.uk/2024/04/nixos-secure-boot-tpm-fde/#tpm-unlock-of-root-partition) on Nix
- Setting up
[lanzaboote](https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md)
- [TPM disk unlock](https://jnsgr.uk/2024/04/nixos-secure-boot-tpm-fde/#tpm-unlock-of-root-partition)
on Nix
6 changes: 4 additions & 2 deletions docs/src/content/docs/getting-started/install-nixdots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ mv $config_dir/configuration.nix $config_dir/default.nix
</TabItem>
<TabItem label="Nix-on-Droid">

Nix-on-Droid uses the same default configuration on every system. No action is required.
Nix-on-Droid uses the same default configuration on every system. No action is
required.

</TabItem>
<TabItem label="Home Manager">
Expand All @@ -45,7 +46,8 @@ touch $config_dir/default.nix

## Initial build

The initial build may differ, because some missing dependencies need to be substituted.
The initial build may differ, because some missing dependencies need to be
substituted.

<Tabs syncKey="nix-environment">
<TabItem label="NixOS">
Expand Down
31 changes: 24 additions & 7 deletions docs/src/content/docs/getting-started/set-up-nix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,50 @@ import { Aside, Steps, Tabs, TabItem } from "@astrojs/starlight/components";

## Platforms

NixDots works on a variety of platforms. Follow the respective guides for obtaining those if you haven't already. It is recommended to install Home Manager on any of the listed operating systems.
NixDots works on a variety of platforms. Follow the respective guides for
obtaining those if you haven't already. It is recommended to install Home
Manager on any of the listed operating systems.

<Tabs syncKey="nix-environment">
<TabItem label="NixOS">

Install [NixOS](https://nixos.org/manual/nixos/stable/index.html#ch-installation) for the most integrated experience.
Install
[NixOS](https://nixos.org/manual/nixos/stable/index.html#ch-installation) for
the most integrated experience.

</TabItem>
<TabItem label="Nix-on-Droid">

Install [Nix-on-Droid](https://github.com/nix-community/nix-on-droid?tab=readme-ov-file#try-it-out) for an experimental terminal experience on Android. This provides integrated support for Home Manager, which therefore doesn't need to be installed separately.
Install
[Nix-on-Droid](https://github.com/nix-community/nix-on-droid?tab=readme-ov-file#try-it-out)
for an experimental terminal experience on Android. This provides integrated
support for Home Manager, which therefore doesn't need to be installed
separately.

</TabItem>
<TabItem label="Home Manager">

Install [Home Manager](https://nix-community.github.io/home-manager/index.xhtml#ch-nix-flakes) for user configurations in any Nix environment. This is required for most of the functionality of NixDots.
Install
[Home Manager](https://nix-community.github.io/home-manager/index.xhtml#ch-nix-flakes)
for user configurations in any Nix environment. This is required for most of the
functionality of NixDots.

</TabItem>
<TabItem label="Standalone Nix">

Use the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#determinate-nix-installer) (recommended) or the [default installer](https://nix.dev/install-nix.html) for non-NixOS systems, such as Linux distributions, MacOS or WSL.
Use the
[Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#determinate-nix-installer)
(recommended) or the [default installer](https://nix.dev/install-nix.html) for
non-NixOS systems, such as Linux distributions, MacOS or WSL.

</TabItem>
</Tabs>

## Enable flakes

NixDots heavily relies on Nix flakes to provide most of its features. These aren't enabled by default on most Nix environments, so it's recommended but not required to set them up before proceding.
NixDots heavily relies on Nix flakes to provide most of its features. These
aren't enabled by default on most Nix environments, so it's recommended but not
required to set them up before proceding.

<Tabs syncKey="nix-environment">
<TabItem label="NixOS">
Expand Down Expand Up @@ -72,7 +88,8 @@ experimental-features = nix-command flakes

## Clone the Git repository

NixDots uses Git to keep track of versions. Clone the repository into an accessible location.
NixDots uses Git to keep track of versions. Clone the repository into an
accessible location.

<Steps>
<ol>
Expand Down

0 comments on commit 1c116af

Please sign in to comment.