mirror of
https://github.com/divnix/digga.git
synced 2025-01-03 13:56:36 +03:00
docs: remove inaccurate and misleading bootstrapping guides
Many many people have complained about the misleading documentation. Rather than continuing the path of "we need to fix this", we can reduce the harmful effects of the inaccurate docs by removing them all together. Since much of the confusion in the "getting started" docs came from `bud`-specific instructions, and `bud` is being removed, removing the inaccurate docs also seems like it can be a kick towards replacing them. Also: - The NixOS manual is the canonical guide to installation. We don't need to repeat its instructions. - The numerous references to networking configuration don't have a place within Digga -- I'm assuming these are `bud`-specific things which are no longer relevant with `bud` gone.
This commit is contained in:
parent
65b8e6d361
commit
e470038a36
@ -3,8 +3,6 @@
|
|||||||
- [Introduction](../README.md)
|
- [Introduction](../README.md)
|
||||||
- [Quick Start](./start/index.md)
|
- [Quick Start](./start/index.md)
|
||||||
- [ISO](./start/iso.md)
|
- [ISO](./start/iso.md)
|
||||||
- [Bootstrapping](./start/bootstrapping.md)
|
|
||||||
- [From NixOS](./start/from-nixos.md)
|
|
||||||
- [Key Concepts](./concepts/index.md)
|
- [Key Concepts](./concepts/index.md)
|
||||||
- [Hosts](./concepts/hosts.md)
|
- [Hosts](./concepts/hosts.md)
|
||||||
- [Overrides](./concepts/overrides.md)
|
- [Overrides](./concepts/overrides.md)
|
||||||
|
@ -1,102 +0,0 @@
|
|||||||
# Bootstrapping
|
|
||||||
|
|
||||||
This will help you boostrap a bare host with the help of the
|
|
||||||
[bespoke iso](./iso.md) live installer.
|
|
||||||
|
|
||||||
_Note: nothing prevents you from remotely executing the boostrapping
|
|
||||||
process. See below._
|
|
||||||
|
|
||||||
Once your target host has booted into the live iso, you need to partition
|
|
||||||
and format your disk according to the [official manual][manual].
|
|
||||||
|
|
||||||
## Mount partitions
|
|
||||||
|
|
||||||
Then properly mount the formatted partitions at `/mnt`, so that you can
|
|
||||||
install your system to those new partitions.
|
|
||||||
|
|
||||||
Mount `nixos` partition to `/mnt` and — for UEFI — `boot`
|
|
||||||
partition to `/mnt/boot`:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ mount /dev/disk/by-label/nixos /mnt
|
|
||||||
$ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only
|
|
||||||
$ swapon /dev/disk/by-label/swap
|
|
||||||
```
|
|
||||||
|
|
||||||
Add some extra space to the store. In the iso, it's running on a tmpfs
|
|
||||||
off your RAM:
|
|
||||||
```console
|
|
||||||
$ mkdir -p /mnt/tmpstore/{work,store}
|
|
||||||
$ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
Install off of a copy of devos from the time the iso was built:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ cd /iso/devos
|
|
||||||
$ nixos-install --flake .#NixOS
|
|
||||||
```
|
|
||||||
|
|
||||||
## Notes of interest
|
|
||||||
|
|
||||||
### Remote access to the live installer
|
|
||||||
|
|
||||||
The iso live installer comes preconfigured with a network configuration
|
|
||||||
which announces it's hostname via [MulticastDNS][mDNS] as `hostname.local`,
|
|
||||||
that is `bootstrap.local` in the [iso example](./iso).
|
|
||||||
|
|
||||||
In the rare case that [MulticastDNS][mDNS] is not availabe or turned off
|
|
||||||
in your network, there is a static link-local IPv6 address configured to
|
|
||||||
`fe80::47`(mnemonic from the letter's position in the english alphabet:
|
|
||||||
`n=14 i=9 x=24; 47 = n+i+x`).
|
|
||||||
|
|
||||||
Provided that you have added your public key to the authorized keys of the
|
|
||||||
`root` user _(hint: [`deploy-rs`](../integrations/deploy.md) needs passwordless
|
|
||||||
sudo access)_:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
|
||||||
../secrets/path/to/key.pub
|
|
||||||
];
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can then ssh into the live installer through one of the
|
|
||||||
following options:
|
|
||||||
|
|
||||||
```console
|
|
||||||
ssh root@bootstrap.local
|
|
||||||
|
|
||||||
ssh root@fe80::47%eno1 # where eno1 is your network interface on which you are linked to the target
|
|
||||||
```
|
|
||||||
|
|
||||||
_Note: the [static link-local IPv6 address][staticLLA] and [MulticastDNS][mDNS] is only
|
|
||||||
configured on the live installer. If you wish to enable [MulticastDNS][mDNS]
|
|
||||||
for your environment, you ought to configure that in a regular [profile](../concepts/profiles.md)._
|
|
||||||
|
|
||||||
### EUI-64 LLA & Host Identity
|
|
||||||
|
|
||||||
The iso's IPv6 Link Local Address (LLA) is configured with a static 64-bit Extended
|
|
||||||
Unique Identifiers (EUI-64) that is derived from the host interface's Message
|
|
||||||
Authentication Code (MAC) address.
|
|
||||||
|
|
||||||
After a little while (a few seconds), you can remotely discover this unique and host
|
|
||||||
specific address over [NDP][NDP] for example with:
|
|
||||||
|
|
||||||
```console
|
|
||||||
ip -6 neigh show # also shows fe80::47
|
|
||||||
```
|
|
||||||
|
|
||||||
***This LLA is stable for the host, unless you need to swap that particular network card.***
|
|
||||||
Under this reservation, though, you may use this EUI-64 to wire up a specific
|
|
||||||
(cryptographic) host identity.
|
|
||||||
|
|
||||||
|
|
||||||
[manual]: https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning
|
|
||||||
[mDNS]: https://en.wikipedia.org/wiki/Multicast_DNS
|
|
||||||
[NDP]: https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol
|
|
||||||
[staticLLA]: https://tools.ietf.org/html/rfc7404
|
|
@ -1,57 +0,0 @@
|
|||||||
# From NixOS
|
|
||||||
|
|
||||||
## Generate Configuration
|
|
||||||
Assuming you're happy with your existing partition layout, you can generate a
|
|
||||||
basic NixOS configuration for your system using:
|
|
||||||
```sh
|
|
||||||
bud up
|
|
||||||
```
|
|
||||||
|
|
||||||
This will make a new folder `hosts/$(hostname)`, which you can edit to
|
|
||||||
your liking.
|
|
||||||
|
|
||||||
You must then add a host to `nixos.hosts` in flake.nix:
|
|
||||||
```nix
|
|
||||||
{
|
|
||||||
# ...
|
|
||||||
nixos = {
|
|
||||||
hosts = {
|
|
||||||
/* set host specific properties here */
|
|
||||||
NixOS = { };
|
|
||||||
$(hostname) = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# ...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure your `i18n.defaultLocale` and `time.timeZone` are set properly for
|
|
||||||
your region. Keep in mind that `networking.hostName` will be automatically
|
|
||||||
set to the name of your host;
|
|
||||||
|
|
||||||
Now might be a good time to read the docs on [suites](../concepts/suites.md) and
|
|
||||||
[profiles](../concepts/profiles.md) and add or create any that you need.
|
|
||||||
|
|
||||||
> ##### _Note:_
|
|
||||||
> While the `up` sub-command is provided as a convenience to quickly set up and
|
|
||||||
> install a "fresh" NixOS system on current hardware, committing these files is
|
|
||||||
> discouraged.
|
|
||||||
>
|
|
||||||
> They are placed in the git staging area automatically because they would be
|
|
||||||
> invisible to the flake otherwise, but it is best to move what you need from
|
|
||||||
> them directly into a host module of your own making, and commit that instead.
|
|
||||||
# Installation
|
|
||||||
|
|
||||||
Once you're ready to deploy `hosts/$(hostname)`:
|
|
||||||
```sh
|
|
||||||
bud rebuild $(hostname) switch
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
This calls `nixos-rebuild` with sudo to build and install your configuration.
|
|
||||||
|
|
||||||
> ##### _Notes:_
|
|
||||||
> - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with
|
|
||||||
> `nixos-rebuild`.
|
|
||||||
|
|
||||||
|
|
@ -43,9 +43,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d
|
|||||||
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
|
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
|
||||||
|
|
||||||
## Next Steps:
|
## Next Steps:
|
||||||
|
|
||||||
- [Make installable ISO](./iso.md)
|
- [Make installable ISO](./iso.md)
|
||||||
- [Bootstrap Host](./bootstrapping.md)
|
|
||||||
- [Already on NixOS](./from-nixos.md)
|
|
||||||
|
|
||||||
|
|
||||||
[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation
|
[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation
|
||||||
|
Loading…
Reference in New Issue
Block a user