summaryrefslogtreecommitdiff
path: root/lxc_setup
blob: 8f96b01af985fbb03fb41c2840a790dd190da6db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

virsh net-start default
virsh net-autostart default

echo "kernel.unprivileged_userns_clone=1" > /etc/sysctl.d/80-lxc-userns.conf
echo "tom veth virbr0 2" > /etc/lxc/lxc-usernet
echo "you should reboot now."

# to auto build arch with yay
# lxc-create -n name -t download -- --dist archlinux --release current --arch amd64
# lxc-attach -n name pacman -Sy go git sudo fakeroot binutils make gcc patch
# lxc-attach -n name useradd tom
# lxc-attach -n name mkdir /home/tom
# lxc-attach -n name git clone https://aur.archlinux.org/yay.git /home/tom
# lxc-attach -n name chown tom:tom -R /home/tom
# lxc-attach -n name echo "tom ALL=(ALL) ALL" > /etc/sudoers