How to Run Android Mobile/TV Emulator on NixOS Using flake without Android Studio

Your browser doesn't support HTML5 video. See? I’m really running NixOS. TL;DR Use the below provided flake.nix and set ~/.android/avd/phone.avd/config.ini hw.keyboard = yes to have a good Android emulator experience. Introduction It was an absolute nightmare but I finally managed to run both Android Mobile and Android TV emulators on NixOS without resorting to using a virtual machine. This blog post was super helpful in my quest. I literally just copied the flake.nix and the Android mobile emulator worked flawlessly. ...

May 18, 2025 · 5 min

Using Termux And Cloudflare Tunnel to SSH into My Android Phone

TL;DR Why not Linux VM? Termux is way more reliable for keeping the SSH connection alive and it allows accessing other directories. Introduction In my previous post I talked about using Nix and Home Manager on my Pixel 6A. In this article I’ll share how to use a more “traditional” approach, i.e., using Termux with Cloudflare Tunnel. This is my current setup. Prerequisite Installed Termux, Termux:API and Termux:Boot and turn off battery optimization for them Enabled termux-setup-storage Set up openssh Possess a cloudflare domain for cloudflare tunnel Guide 1. Install cloudflared pkg update && pkg upgrade pkg install cloudflared 2. Configure cloudflared Note ~ is aliased to /data/data/com.termux/files/home Create the dir: cd ~ mkdir .cloudflared cd .cloudflared Set up the tunnel cloudflared tunnel login # follow the on-screen instruction cloudflared tunnel create pixel # create a tunnel called pixel cloudflared tunnel route dns pixel pixel.helloworld.com # create a route (`pixel` is the tunnel name; `helloworld.com` is the domain you own.) You should now have the following files in ~/.cloudflared: ...

May 17, 2025 · 4 min

Using Nix and Home Manager on My Pixel Android Phone

Introduction Note This article is a good intro if you have no idea what I’m talking about. I use a Pixel 6A and I was surprised that I could run a Linux VM on it. Of course, I tried to use Nix on it. I found nixos-avf but it required Android 16+. I did not want to join the beta program so no NixOS for now. ...

May 11, 2025 · 4 min

Step-by-Step Guide: Installing NixOS on VirtualBox for librephoenix's NixOS Config

TL;DR Download the Minimal ISO image and follow the Manual Installation to install librephoenix-nixos-config. I can’t stress this enough: DO NOT use any graphical ISO images like GNOME or Plasma Desktop! Use the Minimal ISO image not because we’re trying to be cool but because we want to make it work. Introduction If you think it’s as straightforward as installing Ubuntu, you’re in for a big surprise. There are so many gotchas along the way that I have to write it down for my future self, and hopefully for some other poor souls that stumble upon this article. ...

March 10, 2024 · 6 min

kanata: qmk for Your Laptop Keyboard When Your qmk Keyboard is Not Around

TL;DR Use kanata when your qmk keyboard is not around. Introduction I have a qmk keyboard bought from keebio (note: highly recommend!): However, sometimes I’m on the go, and I’m forced to use my laptop keyboard. After being spoiled by qmk’s insane customizability, I couldn’t go back to a regular keyboard. I found kanata and kmonad and they could simulate most of my qmk experience. Why kanata over kmonad? The exact reason Why I built and use kanata. When using kmonad, I need to fully press the modifiers much longer for them to be registered. A slight tap is not registered. Like #466, “when I type capital F, 90% of times it comes out as lowercase f.” On the other hand, kanata doesn’t have this problem. ...

May 9, 2023 · 2 min

plocate: Not a Drop-in Replacement If You're Using btfrs

TL;DR If you want to use plocate while your filesystem is btrfs, do the following: edit /etc/updatedb.conf: replace PRUNE_BIND_MOUNTS = "yes" with PRUNE_BIND_MOUNTS = "no" save the file update the db with sudo updatedb test again with $ locate home to see any outputs from home directory Introduction plocate is supposed to be a much faster drop-in replacement for mlocate, but I had a lot of troble getting it to work. ...

May 9, 2023 · 1 min

Todoman+tasks+Nextcloud: Ditch Your Proprietary TODO apps like Todoist

TL;DR Stack: Nextcloud: server tasks: Android client Todoman: cli integration vdirsyncer: “database” Together they can sync across your Linux desktop and Android devices. Introduction Why switched away from Todoist? Proprietary No cli integration Notes The above solution does take some time to set it up. But afterwards, it’s set-and-forget. Also, check out my How to Migrate From OneDrive to Nextcloud to get started on Nextcloud. Tools Nextcloud: server that glues everything together tasks: Android client on the go Todoman: cli integration vdirsyncer: synchronizes TODOs between devices autovdirsyncer: monitors the TODO db and update accordingly and automatically Getting Started Install the packages pacman -Syu todoman vdirsyncer autovdirsyncer Notes The binary for todoman is todo. Install tasks on your Android device Tips ~/.config/vdirsyncer/config: [storage calendar_remote] type = "caldav" url = "https://efss.qloud.my/remote.php/caldav/" username.fetch = ["shell", "echo $NEXTCLOUD_USERNAME"] password.fetch = ["shell", "echo $NEXTCLOUD_PASSWORD"] I set NEXTCLOUD_USERNAME and NEXTCLOUD_USERNAME in /etc/environment so that autovdirsyncer can read the values when autovdirsyncer.service starts up. ...

May 9, 2023 · 1 min

sway-toolwait: Tame Your Autostart App Layout

TL;DR Use sway-toolwait to control the layout and workspace of your autostart apps. Introduction I used to have the following in ~/.config/sway/config.d/autostart_applications: swaymsg "workspace number 1" swaymsg "exec flatpak run --env=OBSIDIAN_USE_WAYLAND=1 md.obsidian.Obsidian" swaymsg "exec kitty" swaymsg "workspace number 2" swaymsg "exec firefox" swaymsg "workspace number 3" swaymsg "exec chromium --ozone-platform-hint=auto" swaymsg "exec kitty" swaymsg "workspace number 4" swaymsg "exec vieb --enable-features=UseOzonePlatform --ozone-platform=wayland" swaymsg "exec kitty" As you can see, I have 3 Chromium-based app. They take longer to launch than kitty, so kitty is launched before them and it messes up my layout. Somtimes they’d launch even in the wrong workspaces (e.g., sway would have switched to workspace 3 before done starting firefox in workspace 2, so firefox is in workspace 3) ...

March 24, 2023 · 3 min

vimiv to Substitute for Ranger's Image Preview in Wayland

2023-08-05 Update The drop-in replacement ueberzugpp has native support for Wayland (sway and hyprland), and most importantly, tmux support on sway and hyprland! pacman -Syu ueberzugpp and then add the following: set preview_images true set preview_images_method ueberzug and you’re done! TL;DR I’ve switched to using vimiv to substitute for my broken Ranger’s image preview. You could also use imv or mpv to interact with Ranger but I found it to be a bit janky. Working fine until something broke… Five months ago, I asked for help on Reddit: [Sway + Kitty + Tmux + Ranger’s Image Preview] Not working but worked in X11. Long story short, the absolute is that Kitty + Tmux + Ranger’s image preview isn’t going to work (#413), but Kitty + Ranger (i.e., without Tmux) works fine, so I had the following: ...

December 27, 2022 · 2 min

Blocking Distractions with OpenDNS in Linux

TL;DR Use OpenDNS, StevenBlack/hosts, LeechBlockNG to stop yourself from wasting time online. Introduction I’m a sucker for distractions. Before switching to Linux, I was using FocusMe and Cold Turkey to block distractions. They’re amazing for they could completely take control of my machine: I’d not been able to circumvent the block and go on YouTube or even launch mpv. Given I’d switched to Linux, it’s impossible to do so, so I had to resort to the following tools. ...

September 4, 2022 · 2 min