Browse Source

docs: add precisions on how to setup a device and a sample config file

Signed by: govanify GPG Key ID: DE62E1E2A6145556
3 changed files with 41 additions and 10 deletions
  1. +24
  2. +8
  3. +9

+ 24
- 8 View File

@ -15,14 +15,30 @@ software! Please read `docs/README.txt` at the very least!
## Development Notes
Do not forget to run `pre-commit install` to get the formatting hooks running
before contributing!
To setup navi you'll first need to bootstrap it:
cd bootstrap && ./
This will setup secrets needed for the entire infrastructure to work.
For security reasons, you will want to set git pull path to https and git push
patch to ssh, obviously this is only useful if you actually develop navi.
If you want to test the setup before installing it on a real machine you can
To do that run the following commands, using my own repository as an example:
git remote set-url origin
git remote set-url origin --push
sudo nixos-rebuild build-vm -I nixos-config=./configuration.sample.nix
If you want to install navi on a live machine, you'll need to run the
bootstrapper again to generate device-specific keys, paths, and other required
components. It will generate a default configuration which you should tailor to
your needs. Installing is then as simple as running
sudo nixos-install
## Contributing
Do not forget to run `pre-commit install` to get the formatting hooks running
before contributing!

+ 8
- 2
bootstrap/ View File

@ -221,12 +221,18 @@ export GNUPGHOME=$old_gpg_home
rm -rf /mnt/etc/nixos
# should i make this url configurable?
git clone /mnt/etc/nixos
cd /mnt/etc/nixos
git remote set-url origin --push
nixos-generate-config --root /mnt
rm -rf configuration.nix
cp -rf configuration.sample.nix configuration.nix
} > /dev/null 2>&1
# in lieu of fully automating everything let's, for now, do an echo for when i
# have the time to setup something better
printf "\n\nDone! Make sure to setup nixpkgs and home-manager channels\n"
printf "and then configure your device correctly! Look at infrastructure/\n"
printf "for examples. For luks devices you'll need to set the path to your\n"
printf "keyfile (found in /etc/secrets/initrd)."
printf "for examples. To help you, a hardware.nix file has been auto-generated\n"
printf "but it will possibly require manual intervention. For example, luks\n"
printf "devices will need the path to their keyfile set\n"
printf "(found in /etc/secrets/initrd)."

+ 9
- 0
configuration.sample.nix View File

@ -0,0 +1,9 @@
{ config, pkgs, lib, ... }:
imports =
navi.device = "xanadu";