Created
June 23, 2021 15:06
-
-
Save dbaynard/523700a1a5bed1628fd817c833460c6e to your computer and use it in GitHub Desktop.
Creating nixos lxc image for crostini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install arch https://wiki.archlinux.org/title/Chrome_OS_devices/Crostini | |
lxc config set arch security.nesting true | |
Within arch, configure downloads | |
mkdir ~/Downloads && sudo mount -o bind /mnt/chromeos/MyFiles/Downloads ~/Downloads | |
Install nix (just use the standard multi-user nix installer) | |
Install lxd | |
Add user to group lxd | |
sudo systemctl enable lxd.service | |
logout cycle for arch | |
lxd init | |
Patch nixos-generators (gettty fix), then install | |
lxc image import $(nixos-generate -f lxc-metadata) $(nixos-generate -f lxc) --alias nixos | |
lxc image export NixOS ~/Downloads | |
Then in termina, with FINGERPRINT defined to match unique start of full fingerprint, | |
lxc image import /mnt/shared/MyFiles/Downloads/meta-${FINGERPRINT?}*.tar.xz /mnt/shared/MyFiles/Downloads/${FINGERPRINT?}*.tar.xz --alias nixos | |
lxc init nixos nixos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment