Skip to content

hytech-racing/hytech_nixos

 
 

Repository files navigation

user docs for HyTech's pi

ports

8000: param server 8001: file server 6969: old frontend

starting and stopping recording

Connect to http://192.168.203.1:6969/ once on the ht09 wifi.

getting files off the car

  1. connect to the pi's local wifi network named ht09
  2. open a command prompt that has ssh installed (powershell or bash)
  3. scp [email protected]:/home/nixos/recordings/* . (password is nixos)

fixing MCAP files that werent properly closed

you may need to fix the mcap files as when they are not correctly closed (when we turn of LV it doesnt close the file correctly)

developer deployment and usage

pre-reqs:

  • for non-nixOs systems that have the nix package manager installed:

    • enable nix flakes
    • install qemu-user-static package then in /etc/nix/nix.conf add: extra-platforms = aarch64-linux arm-linux and trusted-users = root <username> and then restart nix-daemon.service
  • to build the flake defined image: nix build .#images.rpi4 --system aarch64-linux

typical workflow:

  1. Pull from Github
  2. Update nix flake with nix flake update
  3. build with
    • sd image: nix build .#nixosConfigurations.tcu.config.system.build.sdImage --builders "ssh://[email protected] aarch64-linux - - - big-parallel" --system aarch64-linux --system-features big-parallel --max-jobs 0 -L
    • top level (when you dont need to re-image the pi, you can most of the time just use this): nix build .#nixosConfigurations.tcu.config.system.build.toplevel --builders "ssh://[email protected] aarch64-linux - - - big-parallel" --system aarch64-linux --system-features big-parallel --max-jobs 0 -L
  4. connect to ht09 wifi network while tcu is on
  5. nix-copy-closure --to [email protected] result/ (will have store path as part of output to switch to. this exact store path will be switched to)
  6. (ssh into pi ssh [email protected]) password is nixos
  7. sudo /nix/store/<hash>-nixos-system-<version>/bin/switch-to-configuration switch
  8. profit

notes:

writing to sd card with dd. the /dev/sd<> should just point to the device and not an existing partition on the device (eg: /dev/sdd):

zstdcat <file.img.zst in result/> | sudo dd of=/dev/sd<change-me-pls> bs=4M status=progress oflag=direct

weekly SD image

every week a new SD image is created as a release artifact from this repo from the master branch. use the command above to image the pi's sd card.

to get the current nixos version on the car for simple rollback to prev;

nix path-info /run/current-system

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Nix 94.5%
  • Shell 5.5%