8000 GitHub - arch-err/nixos-lima: Create a NixOS VM using Lima
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

arch-err/nixos-lima

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS on a Lima VM

Generate the image

On a linux machine or ubuntu lima vm for example:

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

# Build the image
bash -c "nix --extra-experimental-features nix-command --extra-experimental-features flakes build .#packages.x86_64-linux.img"
mkdir imgs && cp $(readlink result)/nixos.img imgs/nixos-x86.img && rm -rf result

Running the VM

limactl start --name=nix nixos.yaml
export LIMA_INSTANCE=nix
lima

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

About

Create a NixOS VM using Lima

Topics

Resources

Stars

Watchers

Forks

Languages

  • Nix 100.0%
2A26
0