Skip to content

Instantly share code, notes, and snippets.

View christopherlam's full-sized avatar

Christopher Lam christopherlam

  • Western Australia
View GitHub Profile
@christopherlam
christopherlam / guix-infect.sh
Created December 13, 2021 14:33
Guix in WSL2 (with busybox from 0xbadfca11/miniwsl) guix-infect
# wget https://github.com/0xbadfca11/miniwsl/releases/download/release3041562/rootfs.tgz
# wsl --import guix /guix rootfs.tgz --version 2
# wsl -d guix /bin/busybox sh -c "/mnt/c/sys/misc/guix-infect.sh"
mkdir -p /root /etc /tmp /var/run /run /home
chmod 1777 /tmp
rm /etc/passwd
cat <<EOM >> /etc/passwd
root:x:0:0:root:/root:/bin/bash
guixbuilder01:x:999:999:Guix build user 01:/var/empty:/usr/sbin/nologin