2025-06-12-freebsd & stylesheet changes
This commit is contained in:
parent
e7c0cb5d61
commit
c6b9b84792
7 changed files with 87 additions and 3 deletions
8
content/tech/_index.md
Normal file
8
content/tech/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
+++
|
||||||
|
title = "Tech"
|
||||||
|
sort_by = "date"
|
||||||
|
template = "blog.html"
|
||||||
|
page_template = "post.html"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Here you can see some useful tips and tricks that I encountered that helped me use \*NIX operating systems more effectively.
|
67
content/tech/freebsd.md
Normal file
67
content/tech/freebsd.md
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
+++
|
||||||
|
title = "FreeBSD Tips and Tricks"
|
||||||
|
date = 2025-06-12
|
||||||
|
slug = "freebsd"
|
||||||
|
+++
|
||||||
|
|
||||||
|
# GPU Drivers
|
||||||
|
|
||||||
|
On June 10, 2025, the new FreeBSD 14.3 was released and I decided to try it out. After installing the OS from a USB stick on my bare-metal box (very smooth installation process by the way) I was greeted with the TTY login prompt. Using the built-in `pkg` package manager, I installed my favorite window manager, sway, which unfortunately failed to launch with a cryptic error message "No displays found". After looking in the very helpful [FreeBSD Handbook](https://docs.freebsd.org/en/books/handbook/x11/), it turned out that the GPU drivers weren't preinstalled in the OS, so I had to install them manually and add the respective kernel module to automatically load during boot.
|
||||||
|
|
||||||
|
```
|
||||||
|
pkg install drm-kmods
|
||||||
|
sysrc kld_list+=i915kms # replace by amdgpu if using an AMD GPU
|
||||||
|
```
|
||||||
|
|
||||||
|
Unfortunately this was not enough, the system still wasn't able to start the graphics. After looking at the logs for some time, I found out that the version of the kernel modules responsible for the GPU drivers wasn't updated for the latest kernel revision yet. Fortunately, FreeBSD developers have a separate repository called `FreeBSD-kmods` with updated drivers so that I didn't need to compile the ports (BSD lingo for source-based packages) manually. However, this repository wasn't enabled by default, so I had to force the package manager to update from it.
|
||||||
|
|
||||||
|
```
|
||||||
|
pkg upgrade -r FreeBSD-kmods
|
||||||
|
```
|
||||||
|
|
||||||
|
This was enough to make sway launch (by using `seatd-launch sway`, as the post-install message from the `seatd` package mentioned) and fully use it to the best of its abilities.
|
||||||
|
|
||||||
|
# (Wired) 802.1x authentication
|
||||||
|
|
||||||
|
My university uses an `802.1x` authenticated network (both wired and wireless) on campus, in order to connect to it, I had to use `wpa_supplicant` with the following configuration (`/etc/wpa_supplicant.conf`)
|
||||||
|
|
||||||
|
```
|
||||||
|
network={
|
||||||
|
key_mgmt=WPA-EAP
|
||||||
|
eap=PEAP
|
||||||
|
phase1="peaplabel=0"
|
||||||
|
phase2="auth=MSCHAPV2"
|
||||||
|
identity="user@school.edu"
|
||||||
|
password="password"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
After that it was enough to make sure that the wired interface (in my case `em0`) used the supplicant (`/etc/rc.conf`) and restart the network configuration service `netif`:
|
||||||
|
|
||||||
|
```
|
||||||
|
sysrc ifconfig_em0="WPA SYNCDHCP" # replace em0 by your interface name
|
||||||
|
service netif restart
|
||||||
|
```
|
||||||
|
|
||||||
|
TODO: In the current state of things, certificates aren't checked during the connection process. It is a good idea
|
||||||
|
|
||||||
|
# `i3status` not using colors
|
||||||
|
|
||||||
|
This was merely a quality-of-life issue that for some reason `i3status` fails to detect that it should format its output for `swaybar` to parse it, therefore I had to force it in the config (`~/.config/i3status/config`)
|
||||||
|
|
||||||
|
```
|
||||||
|
general {
|
||||||
|
colors = true
|
||||||
|
interval = 5
|
||||||
|
output_format = "i3bar"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Wireguard
|
||||||
|
|
||||||
|
Since FreeBSD 14, FreeBSD has excellent support for Wireguard VPNs. I just had to install the `wireguard-tools` package (`pkg install wireguard-tools`), copy my config to `/usr/local/etc/wireguard/` and add the following two lines to `/etc/rc.conf` to automatically configure the connection at boot:
|
||||||
|
|
||||||
|
```
|
||||||
|
wireguard_enable="YES"
|
||||||
|
wireguard_interfaces="wg0"
|
||||||
|
```
|
BIN
static/firacode.ttf
Normal file
BIN
static/firacode.ttf
Normal file
Binary file not shown.
|
@ -141,7 +141,6 @@ h4 {
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -183,3 +182,12 @@ h4 {
|
||||||
filter: invert(1);
|
filter: invert(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: firacode;
|
||||||
|
src: url(firacode.ttf);
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: firacode;
|
||||||
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<a href="https://git.brloh.is">git/</a>
|
<a href="https://git.brloh.is">git/</a>
|
||||||
<a href="/lang">lang/</a>
|
<a href="/lang">lang/</a>
|
||||||
<a href="/math">math/</a>
|
<a href="/math">math/</a>
|
||||||
|
<a href="/tech">tech/</a>
|
||||||
<a href="/travel">travel/</a>
|
<a href="/travel">travel/</a>
|
||||||
<span class="right">
|
<span class="right">
|
||||||
Bear's den 🐻
|
Bear's den 🐻
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{% block nav %}
|
{% block nav %}
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ section.permalink | safe }}">{{ section.title | lower }}/</a></li>
|
<li><a href="{{ section.permalink | safe }}">./</a></li>
|
||||||
{% for page in section.pages %}
|
{% for page in section.pages %}
|
||||||
<li><a href="{{ page.permalink | safe }}">{{ page.slug }}/</a></li>
|
<li><a href="{{ page.permalink | safe }}">{{ page.slug }}/</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<!-- If you are using pagination, section.pages will be empty.
|
<!-- If you are using pagination, section.pages will be empty.
|
||||||
You need to use the paginator object -->
|
You need to use the paginator object -->
|
||||||
{% set section = get_section(path=page.ancestors | last) %}
|
{% set section = get_section(path=page.ancestors | last) %}
|
||||||
<li><a href="{{ section.permalink | safe }}">{{ section.title | lower }}/</a></li>
|
<li><a href="{{ section.permalink | safe }}">../</a></li>
|
||||||
{% for p in section.pages %}
|
{% for p in section.pages %}
|
||||||
<li><a href="{{ p.permalink | safe }}">{{ p.slug }}/</a></li>
|
<li><a href="{{ p.permalink | safe }}">{{ p.slug }}/</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue