Skip to content

kyounger/nixos-lima

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run NixOS on a Lima VM

Heavily inspired from patryk4815/ctftools

Generating the image

On a linux machine or ubuntu lima vm for example:

# install nix
sh <(curl -L https://nixos.org/nix/install) --daemon
# enable kvm feature
echo "system-features = nixos-test benchmark big-parallel kvm" >> /etc/nix/nix.conf
reboot

# build image
nix --extra-experimental-features nix-command --extra-experimental-features flakes build .#packages.aarch64-linux.img
cp $(readlink result)/nixos.img /tmp/lima/nixos-aarch64.img

On your mac:

  • Move nixos-aarch64.img under imgs

Running NixOS

limactl start --name=default nixos.yaml

lima
# switch to this repo directory
nixos-rebuild switch --flake .#nixos --use-remote-sudo

Releases

No releases published

Packages

No packages published

Languages

  • Nix 100.0%