gabrielgio.me @ cf7c6a797a5e7aad65583419fb23705a137c46b9

feat: Add draft for how to setup alpine
  1diff --git a/content/posts/2022-12-10-alpine-setup.md b/content/posts/2022-12-10-alpine-setup.md
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..874d3d7a762305a4091b5d23c6b0fad821b0e0f4
  4--- /dev/null
  5+++ b/content/posts/2022-12-10-alpine-setup.md
  6@@ -0,0 +1,123 @@
  7+---
  8+title: "Alpine set up for daily driver"
  9+date: 2022-12-10
 10+tags: ['alpine', 'linux']
 11+---
 12+
 13+# Installation Process
 14+
 15+
 16+## Disable secure boot
 17+
 18+First, always check for secure book. If it is enabled you won't be able to boot
 19+your thumbdrive.
 20+
 21+## setup-alpine
 22+On the official wiki[^1] there a more complete guide on how to setup, and will
 23+probably be more accurate than this one, so always refer to that wiki first.
 24+This is more a log of how I setup. 
 25+
 26+Once you boot your live installation run `setup-alpine` and follow the steps:
 27+
 28+* _Select keyboard layout_: **us**
 29+
 30+* _Select keyboard variant_: **us**
 31+
 32+* _Enter system hostname_: **gridx.local** [This is my choice, if you don't know
 33+  what exactly is this go for the default **localhost**]
 34+
 35+* _Which one do you want to initialize?_: **wlan0** [I chose wlan0, since it is
 36+  a laptop I don't have it connected to cable]
 37+
 38+* _Type the wireless network name to connect to_: **\<NAME\>**
 39+
 40+* _Type network key_: ******
 41+
 42+* _Ip address for wlan0_? **dhcp** [and for the following device I have chose
 43+  none since I won't use them anyways]
 44+
 45+* _Do you want to do any manual network configuration_? **n** 
 46+
 47+* _Changing password for root_: ******
 48+
 49+* _Which timezone are you in?_ **Europe/Berlin**
 50+
 51+* _HTTP/FTP proxy URL?_ **none**
 52+* _Which NTP client to run?_ chrony
 53+* _Enter mirro number?_ **f** [I pick this one to speed up things a bit, default
 54+  one is fine as well]
 55+
 56+* _Set an user?_ **\<NAME\>** [Since we aiming to be a desktop create your user here]
 57+
 58+* _Full name for user \<NAME\>:_ **\<FULLNAME\>**
 59+* _Type password_: ******
 60+
 61+* _Enter ssh key or URL for \<NAME\>?_ **none** [this is a public key so you can
 62+  ssh into this machine]
 63+
 64+* _Which ssh server?_ **openssh**
 65+
 66+* _Which disks would like to use?_ **\<DISK\>** [now you are going to set up the
 67+  disk for installation]
 68+
 69+* _How would you like to use it?_ **crypt** [I like to use encrypted disks, I
 70+  strongly advice for it, but in case you don't want, go for sys directly]
 71+
 72+* _How would you like to use it?_ **lvm**
 73+
 74+* _How would you like to use it?_ **sys** [more info[^2]]
 75+
 76+* _WARNING: Erase the above disks and continue?_ **y**
 77+
 78+* Enter passphrase for \<DISK\>: ******
 79+
 80+Once you have finish the step run `reboot`.
 81+
 82+## Desktop environment
 83+
 84+Now comes the "hard" part, where we need to configure the desktop. For me, I'm
 85+going for i3wm with lightdm.
 86+
 87+To be able to install all the necessary packages we will need to enable the
 88+community repository[^3]. To edit it I use vim
 89+
 90+```bash
 91+apk add vim
 92+# then
 93+vim /etc/apk/repositories
 94+```
 95+and uncomment the `.../community`
 96+
 97+```bash
 98+#/media/cdrom/apks
 99+http://dl-cdn.alpinelinux.org/alpine/v3.16/main
100+http://dl-cdn.alpinelinux.org/alpine/v3.16/community
101+#http://dl-cdn.alpinelinux.org/alpine/edge/main
102+#http://dl-cdn.alpinelinux.org/alpine/edge/community
103+#http://dl-cdn.alpinelinux.org/alpine/edge/testing
104+```
105+
106+Then run  `apk update` and you will see the both repositories printed out.
107+
108+Now we will install the necessary drivers for `xorg` to run properly. Firs
109+search for all  video drivers `apk search xf86-video*` and install whatever you
110+have for you computer (in my case `apk add apk add xf86-video-amdgpu`)
111+
112+* `apk add mesa-dri-gallium mesa-va-gallium mesa-egl`
113+* `setup-xorg-base`
114+* `apk add lightdm-gtk-greeter`
115+* `setup-devd udev`
116+* `rc-update add dbus`
117+* `rc-update add lightdm`
118+
119+* `apk add terminus-font`
120+*  `dbus-uuidgen > /var/lib/dbus/machine-id`
121+* `rc-update add dbus`
122+* `apk add i3wm i3status xterm i3lock`
123+* `add user <NAME> input`
124+* `add user <NAME> video`
125+* `reboot`
126+
127+[^1]: https://wiki.alpinelinux.org/wiki/Installation#Questions_asked_by_setup-alpine
128+[^2]: https://wiki.alpinelinux.org/wiki/Installation#The_general_course_of_action
129+[^3]: https://wiki.alpinelinux.org/wiki/Repositories#Enabling_the_community_repository