The goal of this is to become a Nix Flake that runs PhotonVision service non-intrusively, and somewhat declaratively
After launching in ANY NixOS operating system it is suggested to use Nix flakes.
- Move your NixOS Configurations to a "OS" directory ->
mv /etc/nixos/configuration.nix ~/os/. && mv /etc/nixos/hardware-configuration.nix ~/os/. - Configure PhotonVision in a flake.nix in the os main directory ->
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
photonvision.url = "github:team-1280/sauron";
};
outputs =
{
nixpkgs,
photonvision,
...
}@inputs:
{
nixosConfigurations.photonvision = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./configuration.nix
(
{ pkgs, lib, ... }:
{
enviornment.systemPackages = [
btop
fastfetch
];
imports = [
photonvision.nixosModules.default
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
services.photonvision = {
enable = true;
version = "v2026.2.1";
sha256 = "sha256-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
disableNetworking = true;
};
})
];
};
};- run
sudo nixos-rebuild boot --flake .#photonvision
The test machine is literally a Mac mini M1 16gb so other machines are for others. .