mirror of
https://github.com/divnix/digga.git
synced 2024-11-22 18:58:21 +03:00
docs: recommend nixos-generators
for iso building
This commit is contained in:
parent
14e7ace5c0
commit
65b8e6d361
@ -1,22 +1,36 @@
|
||||
# ISO
|
||||
# Installation Media
|
||||
|
||||
This project leverages [nix-community/nixos-generators][nixos-generators] for
|
||||
building machine images. In most cases, you'll probably want to use the
|
||||
`install-iso` format.
|
||||
|
||||
Making an installable ISO for `hosts/bootstrap.nix` is as simple as:
|
||||
|
||||
Making and writing an installable iso for `hosts/bootstrap.nix` is as simple as:
|
||||
```sh
|
||||
bud build bootstrap bootstrapIso
|
||||
sudo -E $(which bud) burn
|
||||
nix run github:nix-community/nixos-generators -- \
|
||||
--format install-iso \
|
||||
--flake '.#bootstrap'
|
||||
```
|
||||
|
||||
This works for any host.
|
||||
Then "burn" the ISO to your USB stick (or CD-R if you like!) following the
|
||||
[instructions in the NixOS manual][burn] (or using your preferred USB burner).
|
||||
|
||||
## ISO image nix store & cache
|
||||
You can also swap out the `--format` for [any of the others][formats] supported
|
||||
by nixos-generators.
|
||||
|
||||
The iso image holds the store to the live environment and _also_ acts as a binary cache
|
||||
to the installer. To considerably speed up things, the image already includes all flake
|
||||
`inputs` as well as the `devshell` closures.
|
||||
Continue by following the usual installation instructions in the NixOS manual.
|
||||
|
||||
While you _could_ provision any machine with a single stick, a custom-made iso for
|
||||
the host you want to install DevOS to, maximises those local cache hits.
|
||||
## ISO Nix Store and Cache
|
||||
|
||||
For hosts that don't differ too much, a single usb stick might be ok, whereas when
|
||||
there are bigger differences, a custom-made usb stick will be considerably faster.
|
||||
The ISO image holds the Nix store for the live environment and _also_ acts as a
|
||||
binary cache to the installer. To considerably speed things up, the image
|
||||
already includes all flake `inputs` as well as the `devshell` closures.
|
||||
|
||||
While you _could_ provision any NixOS machine with the same USB stick, an ISO
|
||||
custom-made for your target host will maximise those local cache hits. For hosts
|
||||
that don't differ too much, a single USB stick might be ok, whereas when there
|
||||
are bigger differences, a custom-made USB stick will be considerably faster.
|
||||
|
||||
[nixos-generators]: https://github.com/nix-community/nixos-generators
|
||||
[burn]: https://nixos.org/manual/nixos/stable/index.html#sec-booting-from-usb
|
||||
[formats]: https://github.com/nix-community/nixos-generators/tree/master/formats
|
||||
|
@ -1,9 +1,5 @@
|
||||
{ profiles, ... }:
|
||||
{
|
||||
# build with: `bud build bootstrap bootstrapIso`
|
||||
# reachable on the local link via ssh root@fe80::47%eno1
|
||||
# where 'eno1' is replaced by your own machine's network
|
||||
# interface that has the local link to the target machine
|
||||
imports = [
|
||||
# profiles.networking
|
||||
profiles.core.nixos
|
||||
@ -13,6 +9,6 @@
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# will be overridden by the bootstrapIso instrumentation
|
||||
# Required, but will be overridden in the resulting installer ISO.
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user