saturnOS/README.md

33 lines
1.4 KiB
Markdown
Raw Normal View History

2023-03-26 05:18:32 +00:00
# saturnOS
2023-03-15 06:12:00 +00:00
2023-03-26 05:18:32 +00:00
this is the basis of the saturnOS operating system ( sorry guix enjoyers )
2023-03-27 20:53:11 +00:00
to check for syntax errors, run `nix repl replEval.nix` and once inside the repl, run `imported` to
check for syntax errors
2023-03-29 22:43:44 +00:00
# Setup for not nixos
2023-03-30 03:52:33 +00:00
Install nix on your system following the instructions here:
https://nixos.org/download.html
Add the nixos 22.11 channel to your system, since we're basing on the latest stable branch for now.
`nix-channel --add https://nixos.org/channels/nixos-22.11 nixos`
2023-03-30 03:52:33 +00:00
Enable flakes, as we're using a flake for our build process.
```
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
```
## Building and Running
2023-03-30 03:58:04 +00:00
We are using the [nixos-generators](https://github.com/nix-community/nixos-generators) package to help coordinate builds.
### VM
To build the VM:
`nix run github:nix-community/nixos-generators -- -c default.nix -f vm -o result/vm`
This will build the VM, and register the result in the `result/vm` symlink.
To run the VM, use `sudo result/vm/bin/run-qemu-vm`. (sudo can probably be avoided if you are in the KVM group... I think. TODO Lambda look this up)
You can combine the two steps with the following: `sudo $(nix run github:nix-community/nixos-generators -- -c default.nix -f vm -o result/vm)`
Or to build and run without registering a link (Good if you want a throw away VM which can be garbage collected): `sudo $(nix run github:nix-community/nixos-generators -- -c default.nix -f vm)`