This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager/docs/Setup Log WSL+Alpine.md

92 lines
2.0 KiB
Markdown
Raw Normal View History

2024-07-10 06:10:56 +00:00
# Setup Log WSL/Alpine
## User setup
```bash
su -
apk add sudo
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
adduser mmandl sudo
passwd mmandl
logout
```
## Home-manager setup
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# Install vscode server runtime dependency
sudo apk add libstdc++
```
## Yocto
```bash
# Install non-busybox `readlink`
sudo apk add coreutils
```
## Kernel Module Autoloading
```bash
sudo apk add alpine-config
sudo setup-devd udev
```