Forked from kasuboski/nixos-lima, still mostly identical, slight modification in the user configuration and lima runtime.
- Build NixOS disk image from flake.
# aarch64-linux
nix build .#packages.aarch64-linux.image
# x86_64-linux
nix build .#packages.x86_64-linux.image
- Once finished, execute ./copy.sh which will copy the image from the nix store into ./img and chmod 644, and renames file to match reference in nixos.yaml.
./scripts/copy.sh
- Start Lima VM using configuration in nixos.yaml.
limactl start --name=nixos ./nixos.yaml
- Execute vm shell and nixos-rebuild from this flake's nixosConfiguration.
nixos-rebuild switch --use-remote-sudo --flake github:quinneden/nixos-lima-vm#nixosConfigurations.nixos