A while back I wrote about how I set up Authentik forward auth with Traefik on NixOS . It worked, but over time Authentik got a bit heavy for what I actually needed from it, i.e. one identity provider and a forward auth in front of a few self-hosted apps. So I swapped it out for Pocket ID (a small OIDC provider) and TinyAuth (a tiny forward auth that talks to it). This post is the sequel to that…
Introduction In this article, I will show you how I set up Authorization with Row Level Security (RLS) specifically with Postgres in my web app in Go. A quick distinction between: Authentication (AuthN): who are you? Authorization (AuthZ): what can you do? We will mostly be focusing on AuthZ in this article, what is the user allowed to do but mostly see and we will use my gardening app called…
I have a personal project that I wanted to push to both tangled.sh (self-hosted) and GitLab. In case something happened to my personal homelab and backups. You can do this but adding another remote i.e. 1 : git remote set-url --add --push origin git@gitlab.com:hmajid2301/go-routinely.git Make sure to add both repositories with this command Then when you go git push it will push to all…
Another year has passed, and it’s time to reflect on what I accomplished, what I learned, and where I’m heading next. 2025 was a year of shipping projects, learning new technologies, and making some significant life changes. Looking Back: 2025 Goals Review My core aims were: Release a working version of Banter Bus by end of January Try to release say 20ish YouTube videos next year Look…
Background Be Careful Make sure if you follow this guide you could lose your data. Make sure to back up whatever important data you have. Or do what I did and test this on a new device where it doesn’t matter if something goes wrong. But don’t try to do this on a machine that has important data, or you need to use day to day. Though I was able to set up a new laptop in about 20 mins…
On NixOS when ever I enabled mullvad as exit nodes via tailscale (the trayscale app ). My internet would stop working, which was weird as this worked fine on my other devices i.e. Ubuntu or my phone. Well turns out it seems to be the way NixOS works with the firewall, you can read all the details here 1 . Where the poster explains it really well. My understanding is the following: This changes RPF…
If you use a FairPhone, or a phone running eOS/MurenaOS , which is as degoogled version of Android (no affiliation to me besides I use their devices/OS). Sometimes the app store “App Lounge” gets stuck updating apps, my old solution was to delete the app and reinstall it but that can be a pain. Then I discovered a slightly better solution. Go to settings Apps & Notifications Find App…
[!WARNING] The pam_shim is POC code, so be careful with using it on your own machine. Use it at your own risk. The problem At work I have to use Ubuntu but I want to share my nix config between all my devices i.e. desktop and work laptop. On my home setup I have been using Niri with Noctalia shell (quickshell) on NixOS. Everything works fine I can use the Noctalia shell lock screen and can…
So recently I have setup a mini NAS and I connect to it via an SMB share, but on nautilus I noticed that unlike my local files for the videos it would not create thumbnails when I was using nautilus (file manager for Gnome). The fix ended up being pretty simple 1 : Nautilus > Preference > Show thumbnails. Set it to 'On this computer only' for only seeing thumbnails on your system, . If u need it…
TL;DR: The fix is in this commit: https://gitlab.com/hmajid2301/nixicle/-/commit/cfababc9e3a1dfdd1917d0b87cb17fcdd655bfdc Fixing stuff is fun! 🥳 Background I use Neovim (btw!) and Nix (btw btw!!!). I mean, half the reason to use these tools is to tell other people you use them, right? 😉 Otherwise, why would I go through the pain I experienced today? “What pain?” you ask. Good…
TIL - How to Change Emojis in nh Recently I have been trying to update the emojis when I run nh . Particularly the nom output. The old output was like so: To fix this update your nh derivation like so: environment . systemPackages = with pkgs ; [ ( pkgs . nh . override { nix-output-monitor = pkgs . nix-output-monitor . overrideAttrs ( old : { postPatch = old . postPatch or '' + ''…
⏮️ Previous Build Log Objectives Finish the setting page Improve observability Send data to LGTM Grafana Cloud 🛠️ What I Worked On Observability This was more for my Gophercon talk, but I fixed the local LGTM stack setup so that we can send logs, metrics and traces and view it all in Grafana. Then correleate them correctly and move between them in the GUI. Worked on the terraform code to then…
Background So I have a small home lab, where I have a few random things running, like a GitLab CI runner, a media server etc. All my home lab servers (3 of them) are running NixOS and are defined within my Nix flake what services they run. For example: https://gitlab.com/hmajid2301/nixicle/-/blob/main/systems/x86_64-linux/ms01/default.nix?ref_type=heads They are set up using nixos-anywhere like…
If you read this post , I finally managed to figure out how to get shell completions in fish shell when you install a tool using a devshell in Nix, while using direnv. This plugin makes sure that the fish shell completions get resynced. Currently, I am using a fork of the original plugin , as the fish shell v4 broke it but eventually can use the original. How it works: Fish will search…
⏮️ Previous Build Log Objectives Mark feedback public/private Start on settings page 🛠️ What I Worked On Mark feedback as private/public Logged in users can mark feedback as private so it won’t be shown on the public dashboard. Gitlab Dependency Proxy I started using the Gitlab dependency proxy so that we can pull in image from Docker hub using Gitlab to avoid hiting rate limits. But also…
Personal Projects For the moment, the GitLab proxy will not work if the project is in your personal namespace i.e. gitlab.com/hmajid2301 . So to make it work with my project Voxicle I had to move to its own group. GitLab Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/323773 Background The GitLab dependency proxy, allows us to cache Docker images that we pull from Docker Hub. This allows us…
⏮️ Previous Build Log Objectives Public page for feedback private and public feedbacks allow anonymous voting 🛠️ What I Worked On Public Feedback Dashboard We started of with this: And finish with this Users can now do the almost everything they can when logged in but when anonymous. We attach a deviceID cookie to them to be able to spot if its the same user. This only works for the same device…
I will stop making these weekly I think and produce them when there is actual stuff to share, as not make them stale and boring. Some times they may end up weekly, depending on how much progress I am making. ⏮️ Previous Build Log Objectives ✅ Better error modals (fixed) ✅ Start working on public page ✅ Multi tenant sub domains i.e. org1.voxicle.app 🛠️ What I Worked On Error Modal Bug I have some…
After another 5 months (again) I’m finally back blogging about my development setup, opps! What is Neovim? Neovim is a text editor, that you can run in your terminal. Much like vim and vi or nano . So we would run this inside our terminal emulator and Zellij. It differs from vim because you can configure it using lua vs vimscript . Some of the other unique features it had, you can now do in…
⏮️ Last Weeks Objectives Implement Authorization using RLS in Postgres Better error modals (fixed) 🛠️ What I Worked On 🔒 Row Level Security (Authorization) Row Level Security for Feedback and Upvotes. With row level security we can add policies and use config variables. Such that we set the organization ID and users can only get feedback that is part of their organization. This means we can…
Recently, I have been building an app ( https://voxicle.app #ShamelessPlug), with tailwind and DaisyUI. I have been having issues getting the tailwind LSP to work nicely in Neovim, and only recently managed to make it work. So in this article, I will go over how I set up, assuming you are using Nix as a package manager. Why Nix? In my project, it is a go web app, so all the dependencies in the…
Cricket is back this week, so I didn’t have as much time as I would over the weekend as I was out playing both weekends. But I made progress every day even a little on Voxicle. I need to work out, what the minimum features I want before I start to market and share with others to try it and provide feedback. Last Week Fixed my Tailwind LSP for a better DevEx Improved my Gitlab CI file when…
Introduction Recently, I have started to build apps using the web stack: frontend htmx tailwindcss daisyui alpine backend go templ postgres devex gitlab ci nix devshells I have now built two apps using this stack, one of them being banterbus.games a browser-based party game (currently broken). Using web sockets, so it isn’t the most normal web application. As there are a few quirks of web…
TLDR; Add this attribute to your x-bind:hx-delete x-effect="currentItemId;htmx.process($el)" as an example (adjust for your example). Background In my app, I show the user 25 feedbacks per page, and they can delete them which opens a modal to confirm the action. If the user presses the delete button in the modal I want to send a HTTP DELETE request to an endpoint like /feedback/{id} , but the ID…
Recently I noticed when I searched using Telescope in Neovim, that I could see env.local.template but not .env.local . Where my keybinding looked like this: vim.keymap . set ( 'n' , '<leader>ff' , function () builtin.find_files ({ hidden = true , follow = true }) end , { desc = 'Find all files' }) This was because I was ignoring the .env* paths in my gitignore, I could tell telescope to not follow…
Last 2 week Again got really busy with some personal stuff, and stuff at work so didn’t really have much motivation to work on this project. But I have been forcing myself to code, so at least make some progeres. I did the following: Worked out we can use row level security in Postgres for better authorization Added lots more tests Edit Feedback Dynamic URL using Alpine Figure out…
Last 2 week Some stuff kept me busy so I couldn’t really work on my project work. I did the following: Added tests E2E with new skeleton How to debug E2E tests with delve (i.e. the server running separately) Fixed a bunch of TODOs in the code base Delete feedback However I got a busy with other random pieces of work that come up that kept me busy. Hopefully this week will be more productive.
Original Article You can find more context on the problem here In my post last month I thought I had fixed this issue but turns out I did not. The actual fix to stop getting this error: 5108: Error executing lua [ string 'v:lua' ] :1: attempt to call global 'dropbar' ( a nil value ) stack traceback: [ string 'v:lua' ] :1: in main chunk bat…
This week I did the following: Finish core feedback page Add new feedback upvote display as list or grid Stretch try to implement basic RBAC (more of a PoC) However I got a busy with other random pieces of work that come up that kept me busy. Hopefully this week will be more productive. Next Week Next week I want to; Finish core feedback page search display as list or grid email updates when a…
This week On my list of tasks I had the following: Fix auth refresh token flow not fully working Add span information to the auth middleware Simplify templ with pop drilling Update project name And managed to do all of them, even starting to work the core feedback part of the application i.e. allowing users to actually add feedback to the project. I rebranded the app from Go Feedback to Voxicle…
Actual Fix This fix didn’t actually work the actual fix can be found here I recently moved to dropbar from barbecue as it has been archived and kept getting a weird error for buffer open when I would reopen Neovim. I use the auto-session plugin , which loads back the previous state of NixVim when I last exited in that folder, i.e. open buffers. E5108 : Error executing lua [ string 'v:lua' ]:…
This week I decided to use wristband to the tenant and then organization on my side of the app. I am not fully happy with it. During sign up the user creates a tenant but that might be confusing to the customer vs telling them its an organization. But it does mean a new user is created and tenant on both wristband side and in the service database. Then I moved onto working on the subscription…
Week 3 I finished off the auth flow this week, decided to move over to using the wristband UI instead of using my own components. It ended up being a lot of code which was nice to actually delete and I think the wristband setup is pretty nice and slick. I had to adjust slightly how I will create users in my own DB but it wasn’t a big deal.
Background Last year, I worked on two main side projects: OptiNix: CLI tool to easily find nix options. Banter Bus: My third attempt at building a browser based multi-player game. Whilst Banter Bus is not fully done, I got it to an almost working state and at some point will go back and fix a bunch of the bugs and add some new features. However, I finally decided I wanted to try my hand at…
I was some issues with the ways some fonts were rendering in Nix/NixOS machines. It seemed to specifically effect a few apps, mainly Firefox and only certain webpages. Sometimes numbers would render like below: Debugging Steps This occurred off and on over the course of a few weeks. My font setup was primarily done using stylix and a bit of NixOS option config. I noticed this only seemed to happen…
TIL: How to Fix PipeWire/WirePlumber Issues on NixOS For the last month or so, the audio on my Desktop was broken in the sense I had to run these three commands to make it work pipewire & wireplumber & pipewire-pulse Now, normally I hibernate my computer, so I didn’t really have to do this more than once or twice. However, it was very annoying either way to remember to know how to do it.
I did one of these last year, and thought why not do another quick year in review. Catch people up with what I’ve been up to. This year was not nearly as transformative as my previous year in terms of changes I made to my workflow. I am still using Nix and NixOS, I am still using Neovim. I moved onto from tmux to zellij mainly because I just like the floating terminal it provides. But other…
After another 5 months I’m finally back blogging about my development setup. Which since my last post, has been a lot more stable. As much closer to a workflow I am mostly happy with. In this post, we will go over how I integrate Zellij . What is a terminal multiplexer? Zellij is a terminal multiplexer think like tmux or screen. It another one of those projects written in rust. Which seems…
Since 2022 I have tried to speak at least one conference/meetup a year. The main reason for this was it forces to really learn the area I want to present about a lot deeper. If you can explain something new to someone clearly then it really shows you understand it very well. Recently, I was lucky enough to speak at GoLabs 2024 in Florence , which was a load of fun and a week later at the London…
I use Nix mainly with home manager on my Ubuntu laptop, and for the most part, it works fine. However, some apps installed using Nix, need to use nixGL . A wrapper tool for OpenGL, allowing Nix installed tooling to use the system’s OpenGL and Vulkan APIs. Some apps including kitty and Firefox (mainly for Google Meet). There is currently a branch in home-manager we can pull into our config,…
Recently, I was setting up Navidrome, kind of like a self-hosted Spotify, in my home lab and I wanted to set it up to use proxy auth in Authentik. But to do this I needed to use with a reverse proxy, i.e. Traefik. In this article I will show you how to you can point your Cloudflare tunnel to Traefik and have that forward the request to the service. Prerequisite In this article, I assume you are…
TIL: How to Cancel Stale Pipelines in GitLab CI Today I learnt that we can cancel old pipelines in MRs. For example, you push a new commit, and you don’t care about the old pipeline running any more. You want to cancel them to save CI minutes etc. Here is an example, you can see the 2nd pipeline is cancelled: We need to add this to our .gitlab-ci.yml file. Where the default.interruptible…
TIL: How to Get Shell Completions in Nix Shell With Direnv When shell completions don’t work with direnv, you may need to use nix develop to load the shell manually. Background I am using nix-direnv , with nix devshell to autoload into my development environments. I changed the directory and the devshell is automagically loaded without me doing anything, which is great. Provides me with a…
In this post, I will show you how you can set up forward auth for a single host in Authentik, with Traefik as our reverse proxy on NixOS. This is particularly useful way to protect apps that don’t have any built in auth. Authentik is a great app which can handle authentication for almost all of our home lab. So we only need to log in with Authentik, to log in to any of our apps. Rather than…
Recently I have been playing around with running a homelab directly on a NixOS machine without kubernetes. I didn’t want to bother to have to setup certificates using Traefik (DNS challenge) and Cloudflare. I wanted to use the certificate that comes with Tailscale (wireguard VPN I use to connect to my home lab). In this post I will show you how I set this up as a Nix module. Nix Let us look…
Recently, I was trying to configure the terminal emulator Kitty with Nix and Stylix, and I was having issues with it showing emojis. It took me a lot longer to figure out than I would like to admit. So I decided to write a blog post, showing you how I did it and perhaps saving you some time. I did this in my home-manger config . First we install the Symbols Nerd Font , there are two ways we can…
In this post, I will show you how you can declaratively partition our drives using Nix(OS). TL;DR; We can use a tool called disko to partition our drives declaratively and combine it with NixOS anywhere for a remote install. Showing an example setting up LUKS encryption with BTRFS file system. Background If you’re like me, then when you started playing with NixOS, You found yourself…
As some of you may know, I moved to Zellij a few months ago from tmux. In this post, I will show you have I configured the zellij status bar in nix. So it acts more like how my config did in tmux. My current Zellij status bar. (Optional) Background A bit of background, which you can skip if you’d like. What is zellij? Some of you may be wondering what is zellij/tmux. They are what we call…
After a long break, I am again writing about my workflow. The big issue I have with this series is that my workflow is kind of always in flux and changing. Which maybe is a bad thing. I just need to pick some tools and stick to it. Rather than trying four different terminal emulators, i.e. alacritty, kitty, foot and wezterm. However, over the last ~5ish years, one thing that has remained pretty…
In this post, I will describe how I went about replacing a Python with a bash liner and how it decreased the runtime from 30 seconds to 1 second Background For this blog, I used to have a Python script which I would use to generate open graph images. These are images you sometimes see in apps when you share a link. For example: Essentially, what it would do is go through every post in my blog…