2 KiB
2 KiB
Setup Log WSL/Alpine
User setup
su -
apk add sudo
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
adduser mmandl sudo
passwd mmandl
logout
Home-manager setup
# Install nix package manager
sudo apk add curl xz openssh-client
curl -L https://nixos.org/nix/install | sh
echo ". /home/mmandl/.nix-profile/etc/profile.d/nix.sh" >> ~/.profile
# Add home-manager channel and install
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
Home-manager config
# Extract initial home-manager config
unzip /mnt/c/Users/mmandl/Downloads/home-manager-main.zip
mv home-manager-main home-manager
rm -rf .config/home-manager
ln -s ../home-manager .config/home-manager
# Enable nix flakes support
mkdir -p .config/nix
echo "experimental-features = nix-command flakes" > .config/nix/nix.conf
# Install and configure user environment
home-manager switch
# Install zsh
sudo apk add zsh
chsh -s /bin/zsh
# Install gpg and ssh private keys
gpg --import /mnt/c/Users/mmandl/OneDrive\ -\ Horsch\ Maschinen\ GmbH/Dokumente/GPG/Michael\ Mandl\ michael.mandl@horsch.com\ \(0x088ED38F036C7AF2\)\ pub-sec.asc
# Switch to final home-manager config
rm -rf home-manager
git clone git@github.com:mmandl-horsch/home-manager.git
Docker
# Enable openrc on boot
echo "[boot]\ncommand = /sbin/openrc default" > /etc/wsl.conf
# Install docker
sudo apk add docker
sudo rc-update add docker default
sudo adduser mmandl docker
# Install buildserver CA
firefox https://confluence.horsch.com/display/DFEDOCU1/SE+Tools+-+Buildserver+-+SSL?preview=/114590403/114590426/20201123_horsch_buildserver_ca_install.sh
sudo sh 20201123_horsch_buildserver_ca_install.sh
VSCode
# Install vscode server runtime dependency
sudo apk add libstdc++
Yocto
# Install non-busybox `readlink`
sudo apk add coreutils
Kernel Module Autoloading
sudo apk add alpine-config
sudo setup-devd udev