<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>ryukamish</title><link>https://ryukamish.org/</link><description>Recent content on ryukamish</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><atom:link href="https://ryukamish.org/index.xml" rel="self" type="application/rss+xml"/><item><title>Switching to a Free-ier ISP</title><link>https://ryukamish.org/posts/2026/switching-to-a-free-ier-isp/</link><pubDate>Thu, 13 Aug 2026 00:00:00 +0000</pubDate><guid>https://ryukamish.org/posts/2026/switching-to-a-free-ier-isp/</guid><description>&lt;figure&gt;&lt;img src="https://ryukamish.org/img/router-with-isp.jpg" width="100%" height="auto"&gt;
&lt;/figure&gt;
&lt;p&gt;Carrier-grade NAT are also known as &lt;a href="https://en.wikipedia.org/wiki/Carrier-grade_NAT" target="_blank" rel="noopener noreferrer"&gt;CGNAT&lt;/a&gt;
or large-scale NAT (LSN) which are
used by the two major ISPs here. It&amp;rsquo;s great for normie internet consumption
but is an ass when trying to host services. As there&amp;rsquo;s no single IP address
assigned to a single user. This makes self hosting on the internet just
non-existential. More accurately saying, CGNAT provides IPv6 addresses only.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s also an article on &lt;a href="https://dev.to/jagadeesh0074/exposing-services-behing-cgnat-my-home-lab-experience-with-jio-fiber-2ed2" target="_blank" rel="noopener noreferrer"&gt;dev.to&lt;/a&gt;
website
where they explain how they host their homelab and expose it to the internet
through IPv6.&lt;/p&gt;
&lt;h1 id="raspberry-pi-as-the-server"&gt;Raspberry Pi as the server&lt;/h1&gt;
&lt;p&gt;There are many problems with not using the official Linux images which Raspberry
suggests. I had variable success of installing Debian, OpenBSD, FreeBSD and Alpine.
Sometimes it worked sometimes it didn&amp;rsquo;t. It could have been a skill issue but
installing Debian should be easy and as stress-free as possible. For me it was
just a rainbow colored bootloader screen. I also did update the firmware through
the official Raspberry Pi image.&lt;/p&gt;
&lt;p&gt;&lt;del&gt;Alpine has worked more times than other distros. Debian and FreeBSD didn&amp;rsquo;t go
through the rainbow bootloader screen. As of now &lt;strong&gt;my Raspberry Pi is running
Alpine Linux&lt;/strong&gt;. It&amp;rsquo;s lightweight and is just 350MiB on a new install.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I&amp;rsquo;ve switched to &lt;em&gt;Debian&lt;/em&gt; for Pi and laptop. This was majorly because of more documentation available and tested by users. Also, I&amp;rsquo;m lazy and don&amp;rsquo;t have enough time to diagnose and fix issues on &lt;em&gt;Alpine&lt;/em&gt;. I fixed the installation issue by using the official Raspberry Pi Imager to flash SD card.&lt;/p&gt;
&lt;h2 id="dynamic-ip-address"&gt;Dynamic IP Address&lt;/h2&gt;
&lt;p&gt;My ISP doesn&amp;rsquo;t give a static IP but a dynamic one. It&amp;rsquo;s another charge on top of
the internet which I already pay for. It&amp;rsquo;s mostly a waste of money until there
is something very serious to host which requires 100% uptime. Services like
a commercial website where you sell things, payment systems, etc.
I created three virtual servers on my router. One, which listens on port 80,
second which listens on port 443 and third which listens on port 22.&lt;/p&gt;
&lt;p&gt;I fixed it with &lt;code&gt;ddclient&lt;/code&gt;. It runs in the background as a service and
automatically updates the IP address at a fixed interval. It was the most simple
thing to install and configure. Although, be careful of where you edit the
config file. There are two, one in &lt;code&gt;/etc&lt;/code&gt; and another in &lt;code&gt;/etc/ddclient&lt;/code&gt;. The
file inside directory ddclient is the one you want to edit. I&amp;rsquo;ve wasted so much
time diagnosing a problem which never existed.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a &lt;a href="https://www.youtube.com/watch?v=7y60xBovdnI" target="_blank" rel="noopener noreferrer"&gt;YouTube video of Bugswriter&lt;/a&gt;
where he
showcases how he hosts his personal website and his business website with Google
Cloud Provider. In his video he was using his own Rust program to update his IP
address for his websites.&lt;/p&gt;
&lt;h2 id="web-server-and-ssl-certification"&gt;Web server and SSL certification&lt;/h2&gt;
&lt;p&gt;The very first thing before hosting a website is to install a web server which listens on HTTP and HTTPS ports.
HTTP requests are directed to port 80 and HTTPS requests to 443. HTTPS is HTTP
protocol over TLS/SSL. For my use case, I only want to expose the HTTPS port for
my website.&lt;/p&gt;
&lt;p&gt;Firstly, install nginx and certbot. After nginx is listening on port 443 and
service is reachable in the local network, use &lt;code&gt;certbot --nginx -d website.com&lt;/code&gt; to
generate SSL certificates for website.com. Certbot requires a working domain on the
internet. If only local SSL certification is required &lt;code&gt;mkcert&lt;/code&gt; is an option which
could be used. Many &lt;a href="https://certbot.eff.org/hosting_providers" target="_blank" rel="noopener noreferrer"&gt;web hosting providers&lt;/a&gt;
offer HTTPS with their
internal tools. In this case, Certbot is required as I&amp;rsquo;m hosting my website
on my own home server.&lt;/p&gt;
&lt;h2 id="cloudflare-dns"&gt;Cloudflare DNS&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m using Cloudflare as my domain registrar and DNS provider. It&amp;rsquo;s mostly because of convenience rather than choice. I just have to fill in A
records with my hostname and IP address. I have proxied my
website, which servers my website through Cloudflare hiding my IP address.&lt;/p&gt;
&lt;p&gt;Also, check out &lt;a href="https://www.cloudflare.com/learning/dns/dns-records/" target="_blank" rel="noopener noreferrer"&gt;Cloudflare DNS records page&lt;/a&gt;
for knowing what DNS Records are
and the types which are most commonly used.&lt;/p&gt;
&lt;h1 id="cost-of-hosting"&gt;Cost of hosting&lt;/h1&gt;
&lt;p&gt;The internet plans are relatively cheap compared to other ISPs. Also, they have more
variety in internet plans. The power bill is low overall as the server is a
Raspberry Pi which draws ~2.9 W in idle. It&amp;rsquo;s manageable.&lt;/p&gt;
&lt;p&gt;The cost of domain name is rather expensive compared to the power bill. I bought
it for $1.5 for a year. It will be ~$2 for a year after this. It doesn&amp;rsquo;t look much in terms
of dollar but the conversion rates are rather high for me.&lt;/p&gt;
&lt;p&gt;Overall, the cost of hosting my website is cheap compared to buying a domain with
hosting. One could get started with hosting their own website for very cheap.
It&amp;rsquo;s a one time investment for a Pi which I bought second hand for $4.5. If it&amp;rsquo;s
something like my ISP provider, getting a router is free. Just the recurring cost
of internet.&lt;/p&gt;</description></item><item><title>Git Server Setup</title><link>https://ryukamish.org/posts/2026/git-server-setup/</link><pubDate>Thu, 23 Jul 2026 01:30:06 +0530</pubDate><guid>https://ryukamish.org/posts/2026/git-server-setup/</guid><description>&lt;p&gt;Setting a Git instance on the local network is relatively easy compared to setting up
&lt;em&gt;cgit&lt;/em&gt;. I was on it for hours with more failed attempts than success. Following the &lt;a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server" target="_blank" rel="noopener noreferrer"&gt;git
book&lt;/a&gt;
to get git on a server is easy. It&amp;rsquo;s just copy and paste a couple of commands.
&lt;em&gt;cgit&lt;/em&gt; is a little different.&lt;/p&gt;
&lt;h1 id="setting-a-git-server"&gt;Setting a Git server&lt;/h1&gt;
&lt;p&gt;The best way to &lt;a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server" target="_blank" rel="noopener noreferrer"&gt;setup a Git server&lt;/a&gt;
is by following the official handbook.
Still, to quickly setup a Git server make a bare git repo with &lt;code&gt;git init --bare &amp;lt;repo&amp;gt;&lt;/code&gt;. It
creates a &lt;strong&gt;bare&lt;/strong&gt; repo (this is important) which shouldn&amp;rsquo;t have a &lt;em&gt;.git&lt;/em&gt; directory.&lt;/p&gt;
&lt;p&gt;Firstly, create a new user with a different home directory. It&amp;rsquo;s better to have a new user
rather than use the same one because of security reasons. Also, change the owner to
of the git directory to the user created.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# On Alpine Linux&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;adduser &amp;lt;user&amp;gt; -h &amp;lt;home dir&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# On systemd based distros&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;useradd -b &amp;lt;home dir&amp;gt; &amp;lt;user&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If only a local git repo is required then this is enough. Just add the public key generated through
&lt;code&gt;ssh-keygen&lt;/code&gt; of local machine to the server&amp;rsquo;s &lt;code&gt;~/.ssh/authorized_keys&lt;/code&gt; directory. After this
when pushing to the server&amp;rsquo;s repo password won&amp;rsquo;t be required.&lt;/p&gt;
&lt;h1 id="setting-up-cgit"&gt;Setting up cgit&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m using Alpine Linux for my Git server so many commands are specific for it.
Install &lt;em&gt;cgit&lt;/em&gt; with the package manager with additional packages. &lt;em&gt;spawn-fcgi&lt;/em&gt; and &lt;em&gt;fcgiwrap&lt;/em&gt;
are also required. The official &lt;a href="https://wiki.alpinelinux.org/wiki/Cgit" target="_blank" rel="noopener noreferrer"&gt;Alpine wiki&lt;/a&gt;
provides a
better and extensive details on setting &lt;em&gt;cgit&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# On Alpine&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;apk add cgit git fcgiwrap spawn-fcgi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After installing these packages edit &lt;code&gt;/etc/cgitrc&lt;/code&gt; to add some very specific
lines. These include the root directory where it will read from.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;virtual-root=/
scan-path=/path/to/git/repositories/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;scan-path&lt;/em&gt; value is the directory where &lt;em&gt;cgit&lt;/em&gt; will read from. Giving the root
directory where all the git repositories are present is a better options rather
than individually adding them.&lt;/p&gt;
&lt;p&gt;Also, add a service file in &lt;code&gt;/etc/conf.d&lt;/code&gt; called &lt;em&gt;spawn-fcgi.cgit&lt;/em&gt;. It runs
&lt;em&gt;fcgiwrap&lt;/em&gt; automatically everytime it&amp;rsquo;s called. It should exactly look like the
lines below.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;FCGI_PORT=1234
FCGI_PROGRAM=/usr/bin/fcgiwrap
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, start the service with &lt;code&gt;rc-service spawn-fcgi.cgit start&lt;/code&gt;. It
automatically runs everytime the service is called. Even after rebooting it runs
the service again.&lt;/p&gt;
&lt;h2 id="running-the-web-service-with-nginx"&gt;Running the web service with nginx&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m on &lt;em&gt;nginx&lt;/em&gt; for my web server. There are other options like &lt;em&gt;lighttpd&lt;/em&gt;,
&lt;em&gt;apache&lt;/em&gt;, etc. For me &lt;em&gt;nginx&lt;/em&gt; was what most guides provided and other people
also use it so documentation and people&amp;rsquo;s experience with it generally gives
better troubleshooting support.&lt;/p&gt;
&lt;p&gt;The Alpine wiki suggests adding a file in &lt;code&gt;/etc/nginx/conf.d&lt;/code&gt; but I&amp;rsquo;ll be using
the &lt;code&gt;/etc/nginx/sites-available&lt;/code&gt; directory for this service. This is the way I&amp;rsquo;m
most familiar with. After creating that file in &lt;em&gt;sites-available&lt;/em&gt; symlink it
with &lt;code&gt;ln -s /etc/nginx/sites-available/git.your_domain.com /etc/nginx/sites-enabled/&lt;/code&gt;. Now it&amp;rsquo;s serving on port 80 of the server&amp;rsquo;s ip.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;server {
listen 80;
listen [::]:80;
server_name git.your_domain.com;
root /usr/share/webapps/cgit;
try_files $uri @cgit;
location @cgit {
include fastcgi_params;
fastcgi_pass localhost:1234;
fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi;
fastcgi_param PATH_INFO $uri;
fastcgi_param QUERY_STRING $args;
}
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Restart the nginx server with &lt;code&gt;rc-service nginx restart&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now, just add domain name &lt;code&gt;git.your_domain.com&lt;/code&gt; to where you manage your domains to point to localhost on port 80.
It should bring up the domain on the internet which is running the web interface
for the git server.&lt;/p&gt;
&lt;h2 id="miscellaneous-options"&gt;Miscellaneous options&lt;/h2&gt;
&lt;p&gt;To add more functionality to the web interface other options could also be
added. It follows the same convocation of option=value. Edit the &lt;code&gt;/etc/cgitrc&lt;/code&gt;
file to add these functionalities.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;project-list - Only show the specified git repo mentioned here. Add the full path file name.&lt;/li&gt;
&lt;li&gt;remove-suffix - Removes the &lt;em&gt;.git&lt;/em&gt; at the end of the directory name.&lt;/li&gt;
&lt;li&gt;enable-http-clone - set the value to 1 to enable cloning through http link.&lt;/li&gt;
&lt;li&gt;agefile - set it to &lt;code&gt;info/web/last-modified&lt;/code&gt;. This requires a post-receive hook in hooks directory of the bare repo.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Contents of post-receive hook in hooks directory.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkir -p info/web
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;date &lt;span style="color:#e6db74"&gt;&amp;#39;+%Y-%m-%d %H:%M:%S&amp;#39;&lt;/span&gt; &amp;gt; info/web/last-modified
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Using ProtonVPN in Sway</title><link>https://ryukamish.org/guides/2026/using-protonvpn-in-sway/</link><pubDate>Fri, 26 Jun 2026 14:05:00 +0530</pubDate><guid>https://ryukamish.org/guides/2026/using-protonvpn-in-sway/</guid><description>&lt;p&gt;I have been using ProtonVPN for a year now. I have also used it on &lt;em&gt;Windows&lt;/em&gt;.
The better used operating systems i.e. &lt;em&gt;Windows&lt;/em&gt; and &lt;em&gt;MacOS&lt;/em&gt; have a decent app
which lets you connect to different countries. The app experience on Linux is
also great if on a &lt;em&gt;Desktop Environment&lt;/em&gt; like &lt;em&gt;KDE Plasma&lt;/em&gt; or &lt;em&gt;GNOME&lt;/em&gt;. I also
used it on &lt;em&gt;Hyprland&lt;/em&gt; and &lt;em&gt;Niri&lt;/em&gt; and it worked as expected. But, on &lt;em&gt;Sway&lt;/em&gt;
everything changes from just works to make it work. It&amp;rsquo;s more work to get
&lt;em&gt;Sway&lt;/em&gt; working.&lt;/p&gt;
&lt;p&gt;It matters how it&amp;rsquo;s launched. If proper variables are not given there can be
some programs which will not launch. Also, launching with &lt;code&gt;dbus-run-session&lt;/code&gt; gives
a lot of problems. I was launching it with dbus and &lt;code&gt;gnome-keyring&lt;/code&gt; autostart
didn&amp;rsquo;t worked properly. It would always prompt me for a password for a default
keyring. Launching it without &lt;em&gt;dbus&lt;/em&gt; fixes the issue. I fixed the issue with
running it without &lt;em&gt;dbus&lt;/em&gt;.&lt;/p&gt;
&lt;h1 id="wireguard-is-the-better-way"&gt;Wireguard is the better way&lt;/h1&gt;
&lt;p&gt;Using &lt;em&gt;wireguard&lt;/em&gt; is the better way of connecting to a vpn. I say so because it
doesn&amp;rsquo;t require a dependency on a keyring and most of the times it just works.
Ironically, GUI apps have &lt;em&gt;OOBE&lt;/em&gt; but here in the Linux world a terminal command
is the better way of doing the same thing as far my opinions are concerned.&lt;/p&gt;
&lt;h2 id="installing-wireguard"&gt;Installing wireguard&lt;/h2&gt;
&lt;p&gt;On &lt;em&gt;Arch&lt;/em&gt;, &lt;em&gt;wireguard&lt;/em&gt; can be installed with &lt;code&gt;pacman -S wireguard-tools&lt;/code&gt;.
The &lt;a href="https://wiki.archlinux.org/title/WireGuard" target="_blank" rel="noopener noreferrer"&gt;Arch wiki&lt;/a&gt;
provides more details, tips and tricks and
troubleshooting guides.&lt;/p&gt;
&lt;p&gt;As for &lt;a href="https://ryukamish.org/posts/2026/gentoo-linux"&gt;&lt;em&gt;Gentoo&lt;/em&gt;&lt;/a&gt;
, it can be installed with &lt;code&gt;emerge --ask net-vpn/wireguard-tools&lt;/code&gt;
The &lt;a href="https://wiki.gentoo.org/wiki/Wireguard" target="_blank" rel="noopener noreferrer"&gt;Gentoo wiki&lt;/a&gt;
has more info on compiling flags, USE
flags and other troubleshooting guides. Include &lt;code&gt;+wg-quick&lt;/code&gt; USE flag to compile with the command to control the connection.&lt;/p&gt;
&lt;h2 id="getting-conf-file-from-vpn-provider"&gt;Getting conf file from VPN provider&lt;/h2&gt;
&lt;p&gt;Get the conf file from the VPN provider which contains the private key and
public key which will allow a secure connection between the server and the
client. It also contains the DNS, Address, Endpoint, etc.&lt;/p&gt;
&lt;p&gt;Put the conf files in &lt;code&gt;/etc/wireguard&lt;/code&gt; directory with preferred name. Make the names easier to type as the name without the extension name will be used to connect through &lt;em&gt;wireguard&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="going-under-the-tunnel"&gt;Going under the tunnel&lt;/h2&gt;
&lt;p&gt;Now, use the command &lt;code&gt;wg-quick up &amp;lt;name&amp;gt;&lt;/code&gt; to connect to the &lt;em&gt;wireguard&lt;/em&gt; instance. It will require root privileges to use this command.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;Using a GUI app on systems with no desktop environment and is DIY like &lt;em&gt;Sway&lt;/em&gt; one could avoid all the headache of dependency, environment variables and auto start programs. I&amp;rsquo;ve spent hours on solving the keyring issue for &lt;em&gt;ProtonVPN&lt;/em&gt; with &lt;code&gt;gnome-keyring&lt;/code&gt; but something or the other fails. As for my VPN connections I only use one out of 4 to 5 VPNs at a time. So having options is good but not needed for my use case.&lt;/p&gt;
&lt;p&gt;Another thing to consider is the use of &lt;a href="https://ryukamish.org/guides/2026/setting-up-dns"&gt;&lt;code&gt;dnscrypt-proxy&lt;/code&gt; and &lt;code&gt;dnsmasq&lt;/code&gt;&lt;/a&gt;
with &lt;em&gt;wireguard&lt;/em&gt;. Most of the times doesn&amp;rsquo;t work. I got it working for already visited webpages but not able to connect to a search engine or any other webpage which I haven&amp;rsquo;t visited already.&lt;/p&gt;</description></item><item><title>Gentoo Linux as a daily use machine</title><link>https://ryukamish.org/posts/2026/gentoo-linux/</link><pubDate>Thu, 25 Jun 2026 15:55:58 +0530</pubDate><guid>https://ryukamish.org/posts/2026/gentoo-linux/</guid><description>
&lt;div class="callout callout-note"&gt;
&lt;div class="callout-title"&gt;&lt;strong&gt;Note: &lt;/strong&gt;This is an opinion piece and everything written here is specific to me. Experiences may vary for others. Some things could be true to me but not necessarily to others.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A while ago I just made the switch from &lt;em&gt;Arch&lt;/em&gt; to &lt;em&gt;Gentoo&lt;/em&gt;. It took me 3-4 days to get to a functional system with graphical interface.&lt;/p&gt;
&lt;p&gt;Getting to a &lt;em&gt;tty&lt;/em&gt; only took a day which was quick tbh. I followed the &lt;a href="https://wiki.gentoo.org/wiki/Main_Page" target="_blank" rel="noopener noreferrer"&gt;Gentoo wiki&lt;/a&gt;
with another guide from &lt;a href="https://xn--gckvb8fzb.com/hardened-gentoo-with-full-disk-encryption-on-the-star-labs-starbook-mk-vi/" target="_blank" rel="noopener noreferrer"&gt;マリウス Gentoo installation&lt;/a&gt;
. He used the hardened version of Gentoo in his install guide.&lt;/p&gt;
&lt;h1 id="use-flags"&gt;USE flags&lt;/h1&gt;
&lt;p&gt;One of the many powerful features of Gentoo is USE flags. They include or exclude what the binary of a program has. Like if someone is not using desktop environments &lt;em&gt;KDE&lt;/em&gt; or &lt;em&gt;GNOME&lt;/em&gt; one can exclude them from the build with USE flags. Another example is excluding &lt;em&gt;systemd&lt;/em&gt; from a &lt;em&gt;OpenRC&lt;/em&gt; init system. I primarly switched to &lt;em&gt;Gentoo&lt;/em&gt; because of USE flags.&lt;/p&gt;
&lt;p&gt;There is this annoyance when using separate USE flags for every individual package. This creates manual maintenance for packages&amp;rsquo; USE flags and dependencies. I&amp;rsquo;ve let go of this as a new user to Gentoo. It was too much work to see the dependencies and manage the USE flags for different versions of the packages.&lt;/p&gt;
&lt;p&gt;I went with the &lt;code&gt;--autounmask-write&lt;/code&gt; and &lt;code&gt;dispatch-conf&lt;/code&gt; for managing packages. This is the least headache and at the end of the day a functional system is what I want not following an idle blindly.&lt;/p&gt;
&lt;h1 id="package-manager"&gt;Package Manager&lt;/h1&gt;
&lt;p&gt;The package manager is written in &lt;em&gt;Python&lt;/em&gt;. It&amp;rsquo;s generally slow to run but the compile times take longer than the language to execute the file in &lt;code&gt;/usr/bin&lt;/code&gt;. It&amp;rsquo;s a single file of ~100 lines.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve generally found out that searching for packages is slow with &lt;em&gt;emerge&lt;/em&gt;. Say, for example, if you want to search for &lt;code&gt;gentoo-kernel&lt;/code&gt; package. It takes around ~1-2 seconds to look for the package in the repository and give back some output. One second or two isn&amp;rsquo;t that bad to be honest but when trying to search for packages continuously it becomes a hassle.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m also not saying that other package managers are fast or &lt;em&gt;faster&lt;/em&gt; than &lt;em&gt;emerge&lt;/em&gt; but it becomes a rhetorical question of what package manager is the best.&lt;/p&gt;
&lt;h1 id="managing-audio-with-openrc"&gt;Managing audio with OpenRC&lt;/h1&gt;
&lt;p&gt;This one is tricky as &lt;em&gt;systemd&lt;/em&gt; used to manage audio and bluetooth in &lt;em&gt;Arch&lt;/em&gt; Linux. &lt;em&gt;Gentoo&lt;/em&gt; provides a script called &lt;a href="https://wiki.gentoo.org/wiki/Pipewire#gentoo-pipewire-launcher" target="_blank" rel="noopener noreferrer"&gt;gentoo-pipewire-launcher&lt;/a&gt;
which should be started when graphical display starts. The best way when using &lt;em&gt;Sway&lt;/em&gt; is to launch it with a script which will have all the variables.&lt;/p&gt;
&lt;p&gt;Also, there was an update to &lt;code&gt;pipewire&lt;/code&gt; which added a new &lt;em&gt;sound-server&lt;/em&gt; USE flag which could be found on the &lt;a href="https://www.gentoo.org/support/news-items/2022-07-29-pipewire-sound-server.html" target="_blank" rel="noopener noreferrer"&gt;Gentoo website&lt;/a&gt;
or through &lt;code&gt;eselect news read&lt;/code&gt;. It enables/disables the sound capabilities of Pipewire. It was done mostly to resolve the conflict between Pulseaudio and Pipewire. There was an unintentional migration from Pipewire to Pulseaudio and vice-versa. Basically, to resolve the taking control over the audio without the user knowing.&lt;/p&gt;
&lt;p&gt;As the Pipewire dependency is growing with time needed for crucial functionality like screen casting, etc.&lt;/p&gt;
&lt;h1 id="building-packages"&gt;Building packages&lt;/h1&gt;
&lt;p&gt;Let&amp;rsquo;s say, for example, there is a package which you want to install and it&amp;rsquo;s not available in the Gentoo and GURU overlay. Also, it has something to do with the kernel like adding a module for you laptop. Building these packages can be a pain not because it&amp;rsquo;s difficult but to make sure it works as expected dependencies have to be resolved.&lt;/p&gt;
&lt;p&gt;In my case, I was installing a module for my MSI laptop but adding modules to the kernel requires recompiling it with those kernel flags. I&amp;rsquo;ve been using the binary version of the kernel which most probably has the support built in but a source compiled kernel will need to be recompiled.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also built packages from source which are not in Gentoo repos. They didn&amp;rsquo;t seem to have any issues but other applications which only provide the binary version can have issues. Some applications require &lt;em&gt;cups&lt;/em&gt; to be installed. The application doesn&amp;rsquo;t have anything to do with printing services but still it requires the package to be installed.&lt;/p&gt;
&lt;h1 id="upgrading-packages"&gt;Upgrading packages&lt;/h1&gt;
&lt;p&gt;Upgrading Gentoo is a little different from other distros like Arch, Fedora, Debian, etc. The very first thing to do is sync the remote repository with the local repository. This could be done with &lt;code&gt;emaint&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;emaint --auto sync&lt;/code&gt; or &lt;code&gt;emaint -a sync&lt;/code&gt; can be used to sync with the remote repository.&lt;/p&gt;
&lt;p&gt;After syncing the repository upgrade the packages with &lt;code&gt;emerge --ask --verbose --update --deep --newuse @world&lt;/code&gt; or &lt;code&gt;emerge -avuDN @world&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When upgrading any configuration changes can be addressed with &lt;code&gt;dispatch-conf&lt;/code&gt; command. It&amp;rsquo;s the easy way to manage the USE flags for individual packages. Also, &lt;code&gt;--backtrack=N&lt;/code&gt; can also be used to when there is dependency issues with upgrading packages. It can be used with &lt;code&gt;--emptytree&lt;/code&gt; which will take more time to upgrade packages.&lt;/p&gt;
&lt;p&gt;A full official &lt;a href="https://wiki.gentoo.org/wiki/Upgrading_Gentoo" target="_blank" rel="noopener noreferrer"&gt;Gentoo page&lt;/a&gt;
has all the options which contains other sections for other options.&lt;/p&gt;
&lt;h1 id="tldr"&gt;TL;DR&lt;/h1&gt;
&lt;p&gt;Using Gentoo as a daily driver can be a pain when you don&amp;rsquo;t have much time to spare to compile software, diagnose package compatibility and resolving conflicts. Gentoo as other DIY distro is time consuming and you&amp;rsquo;re responsible for your system. If something works or breaks it&amp;rsquo;s because of you. I&amp;rsquo;m back on a binary based distro Arch. There were times when I wanted convenience of just installing a binary. And, yes, Gentoo does have binary but it also requires resolving package conflicts.&lt;/p&gt;
&lt;p&gt;Personally, for me I don&amp;rsquo;t have a deep desire to only use a source based distro in order to reduce the binary size to absolute necessity. I can live with having bigger binary sizes with features not in use. Maybe, I can use it on my server to make the distro very niche to that system. &lt;a href="https://wiki.gentoo.org/wiki/ChromeOS" target="_blank" rel="noopener noreferrer"&gt;ChromeOS based on Gentoo&lt;/a&gt;
&lt;a href="https://ryukamish.org/archive/chromeos-uses-gentoo.png"&gt;(Archive)&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>Neovim</title><link>https://ryukamish.org/guides/2026/neovim/</link><pubDate>Mon, 15 Jun 2026 10:35:29 +0530</pubDate><guid>https://ryukamish.org/guides/2026/neovim/</guid><description>&lt;p&gt;Defaults are &lt;strong&gt;powerful&lt;/strong&gt;. Before using any type of plugin learning the defaults
without any plugins is important as not every time personal configs are
available on the system and knowing how to navigate around the editor with the
defaults is very important.&lt;/p&gt;
&lt;h1 id="defaults"&gt;Defaults&lt;/h1&gt;
&lt;p&gt;Neovim without plugins is also usable. The default file manager &lt;em&gt;Netrw&lt;/em&gt; is also
usable. Although, for many advanced and convenient features and workflow plugins
come in handy. Another handy editor commands are opening a split pane in
horizontal and vertical split view with &lt;code&gt;:vsp&lt;/code&gt; and &lt;code&gt;:sp&lt;/code&gt; for horizontal and
vertical split.&lt;/p&gt;
&lt;h2 id="convenient-key-motions"&gt;Convenient key motions&lt;/h2&gt;
&lt;p&gt;In addition to the usual &lt;em&gt;hjkl&lt;/em&gt; motion other motions are also present. &lt;a href="https://www.youtube.com/watch?v=LaIa1tQFOSY" target="_blank" rel="noopener noreferrer"&gt;Moving in
Neovim with style&lt;/a&gt;
to quickly move in the buffer and edit changes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using &lt;em&gt;ciw&lt;/em&gt; to change a word and go into insert mode. Helpful when changing a
word and cursor is in-between text&lt;/li&gt;
&lt;li&gt;Using &lt;em&gt;vi&amp;quot;&lt;/em&gt; to select text inside quotes.&lt;/li&gt;
&lt;li&gt;Using &lt;em&gt;t&lt;/em&gt; to move forward to the character before the cursor.&lt;/li&gt;
&lt;li&gt;Using &lt;em&gt;f&lt;/em&gt; to move forward on the character after the cursor.&lt;/li&gt;
&lt;li&gt;Using &lt;em&gt;T&lt;/em&gt; to move backward to the character after the cursor.&lt;/li&gt;
&lt;li&gt;Using &lt;em&gt;F&lt;/em&gt; to move backward to the character before the cursor.&lt;/li&gt;
&lt;li&gt;While in visual mode one can use &lt;em&gt;o&lt;/em&gt; to go between the selected line.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="g-key-motions"&gt;g key motions&lt;/h3&gt;
&lt;p&gt;This motion is so awesome. Suppose there is big text on the same line and I
want to go to the beginning of the visual line, I could go like &lt;em&gt;g0&lt;/em&gt;. This goes
to beginning of the visual line. SO COOL! Another example, is when I want to go
to the end of the visual line. I can use &lt;em&gt;s$&lt;/em&gt; to go to the end of the visual
line.&lt;/p&gt;
&lt;p&gt;Another example of this is when moving between lines. I can use &lt;em&gt;gj&lt;/em&gt; to go down
exactly below the cursor. Generally, using &lt;em&gt;j&lt;/em&gt; and &lt;em&gt;k&lt;/em&gt; moves very differently,
but this fixes that.&lt;/p&gt;
&lt;p&gt;Another great example is using &lt;em&gt;gq&lt;/em&gt; to format a big line into sentences in
newlines. This is very helpful in files like markdown and any other text based
file types.&lt;/p&gt;
&lt;h1 id="ftplugin-directory"&gt;ftplugin directory&lt;/h1&gt;
&lt;p&gt;There&amp;rsquo;s a builtin spell check which can check grammar in English and other
languages which I have not tested. Spellcheck for all types of files doesn&amp;rsquo;t
make sense. Spellcheck can used in normal files like a text file, markdown which
are more verbose in grammar.&lt;/p&gt;
&lt;p&gt;For only enabling it in &lt;em&gt;markdown&lt;/em&gt; files, create a file named &lt;em&gt;markdown.lua&lt;/em&gt; in
&lt;code&gt;after/ftplugin&lt;/code&gt; with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vim.opt_local.spell &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;vim.opt_local.spelllang &lt;span style="color:#f92672"&gt;=&lt;/span&gt; { &lt;span style="color:#e6db74"&gt;&amp;#34;en_us&amp;#34;&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;content in to it. This file will only enable spellcheck in markdown type file.
The &lt;code&gt;opt_local&lt;/code&gt; is used to make the settings applicable only to the current
markdown filetype.&lt;/p&gt;
&lt;p&gt;There are also keymaps which can be used to correct the wrong spellings with&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;]s&lt;/em&gt; to jump forward&lt;/li&gt;
&lt;li&gt;&lt;em&gt;[s&lt;/em&gt; to jump backward&lt;/li&gt;
&lt;li&gt;&lt;em&gt;z=&lt;/em&gt; suggests correct spellings&lt;/li&gt;
&lt;li&gt;&lt;em&gt;zg&lt;/em&gt; to mark the word as good&lt;/li&gt;
&lt;li&gt;&lt;em&gt;zw&lt;/em&gt; to mark the word as bad&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To target plain text files one can use &lt;code&gt;text.lua&lt;/code&gt; file which targets plain text
files. I have setup wrap, linebreak and spell check only for plain text files.&lt;/p&gt;
&lt;h1 id="tldr"&gt;TL;DR&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;ve learnt a lot from TJ DeVries from his &lt;a href="https://youtube.com/playlist?list=PLep05UYkc6wTyBe7kPjQFWVXTlhKeQejM&amp;amp;si=SwLLFxo47LCuK1g2" target="_blank" rel="noopener noreferrer"&gt;Advent of Neovim&lt;/a&gt;
YouTube videos.
I have also learnt a lot from &lt;a href="https://youtu.be/X6AR2RMB5tE?si=Dfe7Ro530ZIzefhd" target="_blank" rel="noopener noreferrer"&gt;ThePrimeagen&amp;rsquo;s Neovim YouTube videos&lt;/a&gt;
which are
available on YT for free. There is also the official documentation which also
has a lot info on how to use Neovim.&lt;/p&gt;</description></item><item><title>Setting Up DNS</title><link>https://ryukamish.org/guides/2026/setting-up-dns/</link><pubDate>Thu, 04 Jun 2026 00:00:00 +0000</pubDate><guid>https://ryukamish.org/guides/2026/setting-up-dns/</guid><description>
&lt;div class="callout callout-note"&gt;
&lt;div class="callout-title"&gt;&lt;strong&gt;Note: &lt;/strong&gt;I&amp;rsquo;ve found the hard way of using dnscrypt-proxy with with &lt;em&gt;ProtonVPN&lt;/em&gt; is not a good idea. &lt;em&gt;ProtonVPN&lt;/em&gt; changes resolv.conf which has the IP address for &lt;em&gt;NetworkManager&lt;/em&gt;. While on the other hand this guide locks the file itself making it prone to change. For the time being I don&amp;rsquo;t know how to do this. Although, using dnscrypt-proxy without locking resolv.conf file works with &lt;em&gt;ProtonVPN&lt;/em&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first things to do is install the packages. If on &lt;em&gt;Arch&lt;/em&gt; Linux install them first. I&amp;rsquo;m not using &lt;em&gt;docker&lt;/em&gt; because it will be awkward to host both. Port 53 binding is annoying in &lt;em&gt;docker&lt;/em&gt; as privileged ports from a container adds friction and on &lt;em&gt;systemd&lt;/em&gt;/&lt;em&gt;OpenRC&lt;/em&gt; systems systemd-resolved or another stub listener often already holds port 53.&lt;/p&gt;
&lt;h1 id="dnscrypt-setup"&gt;DNSCrypt setup&lt;/h1&gt;
&lt;h2 id="installing-packages-in-arch"&gt;Installing packages in &lt;em&gt;Arch&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Install both packages with &lt;code&gt;sudo pacman -S dnscrypt-proxy dnsmasq&lt;/code&gt;. This will install both packages.&lt;/p&gt;
&lt;div class="callout callout-note"&gt;
&lt;div class="callout-title"&gt;&lt;strong&gt;FYI: &lt;/strong&gt;dnscrypt-proxy runs locally as a DNS resolver, encrypts DNS queries to make sure that no one connected to the same domain see what domains I look up. It supports DNS over HTTPS (DoH) and DNSCrypt protocols.
dnsmasq on the other hand is a DNS caching to gain speed on the local network. It caches the encrypted DNS queries so repeated lookups are answered quickly.&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="setup-dnscrypt-config"&gt;Setup DNSCrypt config&lt;/h2&gt;
&lt;p&gt;Now editing the config file in &lt;code&gt;/etc/dnscrypt-proxy/dnscrypt-proxy.toml&lt;/code&gt; file. Add the lines inside the file or edit the changes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Change listen port from 53 to 5300 (avoid conflict with dnsmasq)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;listen_addresses&lt;/span&gt; = [&lt;span style="color:#e6db74"&gt;&amp;#39;127.0.0.1:5300&amp;#39;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Pick resolvers — these are no-log, DNSSEC-validating&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;server_names&lt;/span&gt; = [&lt;span style="color:#e6db74"&gt;&amp;#39;cloudflare&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;quad9&amp;#39;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Recommended privacy options&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;require_dnssec&lt;/span&gt; = &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;require_nolog&lt;/span&gt; = &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;require_nofilter&lt;/span&gt; = &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The port generally is bind to 53 but as we are also using &lt;em&gt;dnsmasq&lt;/em&gt; port should be something different. &lt;em&gt;dnsmasq&lt;/em&gt; reads queries from port 5300.&lt;/p&gt;
&lt;h1 id="dnsmasq-configuration"&gt;dnsmasq configuration&lt;/h1&gt;
&lt;p&gt;The general file to edit is in &lt;code&gt;/etc/dnsmasq.conf&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;# Don&amp;#39;t read /etc/resolv.conf
no-resolv
# Forward all queries to dnscrypt-proxy
server=127.0.0.1#5300
# Listen only on loopback
# Also adding waydroid interface
interface=lo,waydroid0
listen-address=127.0.0.1,192.168.240.1
bind-interfaces
# Cache size (number of entries)
cache-size=1000
# To enable negative caching
neg-ttl=60
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When the user makes a query it is forwarded to port 5300 which then searches the internet and brings back results which are then cached in &lt;em&gt;dnsmasq&lt;/em&gt; as entries.&lt;/p&gt;
&lt;h2 id="stop-anything-holding-port-53"&gt;Stop anything holding port 53&lt;/h2&gt;
&lt;p&gt;On &lt;em&gt;CachyOS&lt;/em&gt; port 53 is generally bound to &lt;code&gt;systemd-resolved&lt;/code&gt;. Check with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ss -tulpn | grep &lt;span style="color:#e6db74"&gt;&amp;#39;:53&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If &lt;code&gt;systemd-resolved&lt;/code&gt; is present then run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl stop systemd-resolved
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl disable systemd-resolved
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="fix-etcresolvconf"&gt;Fix /etc/resolv.conf&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;systemd-resolved&lt;/code&gt; manages this file as a symlink. Replace it with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo unlink /etc/resolv.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;nameserver 127.0.0.1&amp;#34;&lt;/span&gt; | sudo tee /etc/resolv.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then lock the file so that NetworkManager cannot overwrite it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo chattr +i /etc/resolv.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(For if any reason you want to restore the file then run &lt;code&gt;sudo chattr -i /etc/resolv.conf&lt;/code&gt;)&lt;/p&gt;
&lt;h1 id="enable-the-services-and-verify"&gt;Enable the services and verify&lt;/h1&gt;
&lt;p&gt;Enable both service via &lt;code&gt;systemctl&lt;/code&gt; with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable --now dnscrypt-proxy
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl enable --now dnsmasq
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="verify-if-it-works"&gt;Verify if it works&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Check both are listening on the right ports&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ss -tulpn | grep -E &lt;span style="color:#e6db74"&gt;&amp;#39;:53|:5300&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Test resolution through the full chain&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dig google.com @127.0.0.1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Check dnscrypt-proxy is actually encrypting (should show your resolver)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo journalctl -u dnscrypt-proxy -n &lt;span style="color:#ae81ff"&gt;20&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the journal you should see lines like [cloudflare] OK (DoH) or [quad9] OK (DNSCrypt) confirming encryption is active.&lt;/p&gt;
&lt;p&gt;When using NetworkManager, it may try to overwrite the resolv.conf and try to manager DNS. To prevent that one can edit &lt;code&gt;/etc/NetworkManager/NetworkManager.conf&lt;/code&gt; and add&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;[main]
dns=none
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then restart NetworkManager with &lt;code&gt;sudo systemctl restart NetworkManager&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Undervolting on MSI Modern 14 C13M</title><link>https://ryukamish.org/posts/2026/undervolting-on-msi/</link><pubDate>Tue, 02 Jun 2026 10:44:59 +0530</pubDate><guid>https://ryukamish.org/posts/2026/undervolting-on-msi/</guid><description>
&lt;div class="callout callout-warning"&gt;
&lt;div class="callout-title"&gt;&lt;strong&gt;Warning: &lt;/strong&gt;Anything which requires to tweak any hardware level settings can be damaging to the computer. This can void warranty (if any) and can seriously brick the system which could lead to not booting up. There have also been cases of firmware damage.
&lt;strong&gt;Do it at your own risk!&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;figure&gt;&lt;img src="https://ryukamish.org/img/undervolting-on-msi.webp"
alt="Internals of MSI Modern 14 C13M" width="100%" height="auto"&gt;&lt;figcaption&gt;
&lt;p&gt;Internals of MSI Modern 14 C13M&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This laptop emits a lot of heat for how less things I do with it. On idle it sits around 50°C. If there is time where I need to compile something the temperatures go above and beyond 80°C, which is wild. Although, I understand the temp going up but for a laptop it shouldn&amp;rsquo;t go this high.&lt;/p&gt;
&lt;p&gt;I wanted to control the heat from this laptop which lead to undervolting. I researched it well when I was doing it but only after a while did I got to understand that undervolting the CPU itself was not possible w/o bricking the system. &lt;em&gt;Overclock&lt;/em&gt; is the other end of the spectrum which boosts the clock base speed. This in return gives maximum performance and a lot of heat. Overclocking reduces the life span of the CPU.&lt;/p&gt;
&lt;h2 id="controlling-power-limits"&gt;Controlling power limits&lt;/h2&gt;
&lt;p&gt;One effective way to control heat is to limit the power used by a computer. A low powered machine doesn&amp;rsquo;t require much energy. I tried running the below commands and for a moment everything was working normally until apps started freezing and opening apps took more time.&lt;/p&gt;
&lt;p&gt;To check what are the numbers already set by the kernel run the below commands.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Main package (usually the one that matters)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw &lt;span style="color:#75715e"&gt;# long-term (PL1)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw &lt;span style="color:#75715e"&gt;# short-term (PL2 burst)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /sys/class/powercap/intel-rapl:0/constraint_0_time_window_us
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Optional: energy used so far (for monitoring)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /sys/class/powercap/intel-rapl:0/energy_uj
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# See live package power (install linux-tools if missing)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo pacman -S linux-tools
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo turbostat --show PKG_Watts --interval &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; --num_iterations &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To temporarily check if the modified values took place or not one can run below commands.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Moderate – good balance (recommended starting point for Modern 14)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;28000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;35000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw &lt;span style="color:#75715e"&gt;# short burst a bit higher&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# More aggressive cooling / battery focus (very quiet, still usable)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;22000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;28000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Ultra conservative (max battery, very low heat – good for office/web)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;18000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#ae81ff"&gt;22000000&lt;/span&gt; | sudo tee /sys/class/powercap/intel-rapl:0/constraint_1_power_limit_uw
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;All these manually running and hoping the values are correct for the system will not do. This could lead to problems. Machines can do a lot of things on their own nowadays so manually intervening seems kind of dumb.&lt;/p&gt;
&lt;p&gt;My recommendation is using tools like auto-cpufreq to manage CPU frequency and power draw. It automatically changes the frequency on certain or set conditions set by the user.&lt;/p&gt;
&lt;h2 id="tools-used-for-undervolting"&gt;Tools used for undervolting&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/AdnanHodzic/auto-cpufreq" target="_blank" rel="noopener noreferrer"&gt;auto-cpufreq&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/torvalds/linux/tree/master/tools/power/x86/turbostat" target="_blank" rel="noopener noreferrer"&gt;turbostat&lt;/a&gt;
- included in Linux kernel&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="tldr"&gt;Tl;dr&lt;/h2&gt;
&lt;p&gt;&lt;mark style="color: var(--fg); background: var(--accent);"&gt; It didn't go as planned.&lt;/mark&gt;
Undervolting on my MSI laptop is not possible. It is locked and cannot be unlocked without bricking the system. I&amp;rsquo;m using &lt;em&gt;power profiles daemon&lt;/em&gt; for power management.&lt;/p&gt;</description></item><item><title>Experience on Cachyos</title><link>https://ryukamish.org/posts/2026/experience-on-cachyos/</link><pubDate>Mon, 01 Jun 2026 23:23:49 +0530</pubDate><guid>https://ryukamish.org/posts/2026/experience-on-cachyos/</guid><description>&lt;p&gt;It&amp;rsquo;s been a year of using &lt;a href="https://cachyos.org" target="_blank" rel="noopener noreferrer"&gt;CachyOS&lt;/a&gt;
on my main laptop as a daily driver. Never faced any major issue which cannot be fixed. The system is snappy and quick to respond. The effects of &lt;a href="https://wiki.cachyos.org/features/optimized_repos/#customized-packages" target="_blank" rel="noopener noreferrer"&gt;customized packages&lt;/a&gt;
and &lt;a href="https://wiki.cachyos.org/features/kernel/" target="_blank" rel="noopener noreferrer"&gt;custom kernels builds&lt;/a&gt;
are quite visible. Although base Arch in itself is very light and snappy. For a normal user who doesn&amp;rsquo;t play games or compile software will not see much difference in speed between Arch and CachyOS but is still worth while to have those optimizations.&lt;/p&gt;
&lt;h2 id="firewall-enabled-by-default"&gt;Firewall enabled by default&lt;/h2&gt;
&lt;p&gt;Unlike &lt;a href="https://omarchy.org" target="_blank" rel="noopener noreferrer"&gt;Omarchy&lt;/a&gt;
which has &lt;em&gt;ufw&lt;/em&gt; installed and rules written but it doesn&amp;rsquo;t enable it by default. The user needs to enable it manually. That&amp;rsquo;s already a plus for security.&lt;/p&gt;
&lt;h2 id="gui-for-almost-everything"&gt;GUI for almost everything&lt;/h2&gt;
&lt;p&gt;A GUI application is installed called &lt;a href="https://shellyalpm.com/" target="_blank" rel="noopener noreferrer"&gt;Shelly&lt;/a&gt;
which installs, updates and manages packages in CachyOS. It&amp;rsquo;s a GTK app. For me, searching of packages were made easier than using a terminal.&lt;/p&gt;
&lt;h2 id="pre-configured-system"&gt;Pre-configured system&lt;/h2&gt;
&lt;p&gt;CachyOS already provides a lot of options to use as a desktop in Calamares installer. Many popular options like GNOME, KDE Plasma with Window managers like &lt;a href="https://hypr.land" target="_blank" rel="noopener noreferrer"&gt;hyprland&lt;/a&gt;
, &lt;a href="https://github.com/niri-wm/niri" target="_blank" rel="noopener noreferrer"&gt;niri&lt;/a&gt;
, etc. These are already configured for ease of use. The window manager are also configured with mostly sane defaults.&lt;/p&gt;
&lt;h2 id="links"&gt;Links&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cachyos.org" target="_blank" rel="noopener noreferrer"&gt;Official website of CachyOS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.cachyos.org/features/kernel/" target="_blank" rel="noopener noreferrer"&gt;List of optimizations done on CachyOS Kernel&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.cachyos.org/features/optimized_repos/" target="_blank" rel="noopener noreferrer"&gt;Optimized repositories of CachyOS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Bookmarks</title><link>https://ryukamish.org/bookmarks/</link><pubDate>Mon, 01 Jun 2026 19:46:55 +0530</pubDate><guid>https://ryukamish.org/bookmarks/</guid><description>&lt;h1 id="tech"&gt;Tech&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linux.die.net" target="_blank" rel="noopener noreferrer"&gt;linux.die.net&lt;/a&gt;
- Linux documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="videos"&gt;Videos&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ZFL09qhKi5I" target="_blank" rel="noopener noreferrer"&gt;Intro to Hugo website building by Luke Smith&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ju9loeXNVW0" target="_blank" rel="noopener noreferrer"&gt;Hosting a Git server with Luke Smith&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="websites"&gt;Websites&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://%e3%83%9e%e3%83%aa%e3%82%a6%e3%82%b9.com" target="_blank" rel="noopener noreferrer"&gt;マリウス&lt;/a&gt;
- Personal website of Marius&lt;/li&gt;
&lt;li&gt;&lt;a href="https://terminaltrove.com/explore/" target="_blank" rel="noopener noreferrer"&gt;terminaltrove.com&lt;/a&gt;
- A huge collection of TUI apps&lt;/li&gt;
&lt;li&gt;&lt;a href="https://edwardsnowden.substack.com/" target="_blank" rel="noopener noreferrer"&gt;Edward Snowden Substack&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://classics.mit.edu/index.html" target="_blank" rel="noopener noreferrer"&gt;classics.mit.edu&lt;/a&gt;
- Read Classics Literature&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Sleeping Late Causes Problems</title><link>https://ryukamish.org/posts/2026/sleeping-late-cause-problems/</link><pubDate>Fri, 29 May 2026 12:27:00 +0530</pubDate><guid>https://ryukamish.org/posts/2026/sleeping-late-cause-problems/</guid><description>&lt;h1 id="why-does-it-cause-problems"&gt;Why does it cause problems?&lt;/h1&gt;
&lt;p&gt;The main reason is the lack of sleep reduces the receptors of our brain which
makes us slow. Reading a paragraph doesn&amp;rsquo;t make sense until you read it again
and again. But, for some reason on other days you could understand those lines
pretty quickly.&lt;/p&gt;
&lt;p&gt;This is because our body repairs the damaged cells during a good night sleep
which were damaged during the day.&lt;/p&gt;
&lt;h2 id="circadian-rhythm"&gt;Circadian Rhythm&lt;/h2&gt;
&lt;p&gt;This is the internal clock of the body. It controls the wake and sleep cycle. It tells your body when to sleep and when it&amp;rsquo;s time to wake up.
It also controls hormones, digestion and body temperature. It&amp;rsquo;s like have a
personal butler inside your body who checks whether everything is going
smoothly. When you don&amp;rsquo;t have a regular sleep and wake cycle then hormones are
disrupted like melatonin which is a sleep hormone.&lt;/p&gt;
&lt;h2 id="mood-and-motivation"&gt;Mood and Motivation&lt;/h2&gt;
&lt;p&gt;It also affects mood causing mood swings. One moment you&amp;rsquo;re angry another
depressed. It also drains away the willpower to do things.&lt;/p&gt;
&lt;h1 id="links"&gt;Links&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://my.clevelandclinic.org/health/body/12148-sleep-basics" target="_blank" rel="noopener noreferrer"&gt;Sleep - Cleveland Clinic&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.nhlbi.nih.gov/health/sleep/why-sleep-important" target="_blank" rel="noopener noreferrer"&gt;Why Is Sleep Important? - NIH&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>About</title><link>https://ryukamish.org/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ryukamish.org/about/</guid><description>&lt;h2 id="hosted-code"&gt;Hosted code&lt;/h2&gt;
&lt;p&gt;I host my code on Github and Codeberg. I also have my own Cgit instance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://codeberg.org/ryukamish" target="_blank" rel="noopener noreferrer"&gt;Codeberg&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ryukamish" target="_blank" rel="noopener noreferrer"&gt;Github&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git.ryukamish.org" target="_blank" rel="noopener noreferrer"&gt;My Git instance&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>