mirror of Team/StarlightOS at forge.starlightnet.work

build.md and design.md in docs folder.

+55
+31
docs/build.md
··· 1 + # Build and VM testing Guide 2 + 3 + > This assumes you have both `nix` installed as well as flakes 4 + > enabled. The `nixos` CLI is a requirement, too, unless you know how 5 + > to use the default NixOS utilities to do the equivalent job. 6 + 7 + The installer can currently be built using the `nixos` CLI as such: 8 + 9 + ```sh 10 + nixos apply .#installer --vm 11 + ``` 12 + 13 + It will then tell you where it output the binary for the VM to. 14 + 15 + You can then run the VM like this: 16 + 17 + ```sh 18 + # create a qcow2 disk image first 19 + qemu-img create -f qcow root.qcow2 20G 20 + 21 + # run the VM with QEMU 22 + QEMU_KERNEL_PARAMS=console=ttyS0 QEMU_OPTS="-hdd $PWD/root.qcow2" /nix/store/z5i5851bkl0i3mpssdabzrv4mrlzql5h-nixos-vm/bin/run-slos-vm -nographic 23 + ``` 24 + 25 + You will have to replace our `/nix/store` path with the path that 26 + `nixos apply` told you. 27 + 28 + Please note that you may have to replace `$PWD/root.qcow2` with the 29 + full path to your disk image. 30 + 31 + You should then have it booting in your terminal.
+24
docs/design.md
··· 1 + # Design Principles 2 + 3 + 1. **The user should be able to opt-out of all our tooling easily, and 4 + be left with a fully functional configuration.** 5 + The way we will do this is by having our tooling be a single import 6 + away. 7 + 2. **Try to use existing tooling first** 8 + Instead of trying to re-invent the wheel, try using existing 9 + tooling as much as possible 10 + 3. **The nixOS configuration *is* the state.** 11 + Instead of maintaining the database to figure out the state of the 12 + OS, we will read the existing nixOS configuration, i.e parse and 13 + evalutate the flake. For this, we will need to build a program that 14 + can evaluate nix, and then we will cache it all in easily readable 15 + JSON. Kind of like what the nixos-cli does for NixOS options 16 + caching. 17 + 4. **Be as quick to set up as possible.** 18 + Similar to other projects, we want everything to be as quick and 19 + easy as physically possible. As such, we wanna eventually have an 20 + ISO that can be flashed for either aarch64 UEFI or amd64 UEFI 21 + (later BIOS+GPT, too) that asks minimal questions and installs the 22 + OS. 23 + 24 + > more TBD...