How I Configured Zellij Status Bar

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. ...

TIL: Clean Up Tmux Service When Removed by Home Manager

TIL: Clean Up Tmux Service When Removed by Home Manager Recently I stopped using tmux to try zellij, however I noticed when I removed tmux from my nix config. I was getting the following error, when rebuilding my home-manager config: The user systemd session is degraded: UNIT LOAD ACTIVE SUB DESCRIPTION ● tmux.service loaded failed failed tmux default session (detached) Legend: LOAD → Reflects whether the unit definition was properly loaded. ...

How to Get sops-nix Working with home-manager Modules

Introduction In this article, I will go over how to get sops-nix to work properly with home-manager. One issue I noticed was that when I used with home-manager modules/options, I would see a string like “%r/secrets/haseeb/…”. The %r would not be replaced. Relevant Issue: https://github.com/Mic92/sops-nix/issues/28 Assumption I will assume you have already setup sops-nix and are using it. In the sense, you have a .sops.yaml file and are already using it with NixOS. ...

TIL: How to Set the Path Variable When Using Ubuntu With Nix (Home Manager)

TIL: How to Set the Path Variable When Using Ubuntu With Nix (Home Manager) As per some of my recent articles, you will be aware I am using Hyprland (tiling manager) on Ubuntu and managing the config using nix (home-manager). I was having issues where for some reason it wouldn’t set the PATH variable correctly. On my NixOS machine, the following would be fine: bind=,XF86AudioRaiseVolume,exec, volume --inc bind=,XF86AudioLowerVolume,exec, volume --dec However, on Ubuntu I needed to provide the full path: ...

Part 3: Hyprland as Part of Your Development Workflow

Preamble Now we have looked at our choice of hardware, which OS to use and specifically, how to configure NixOS (at a high-level), using a git repository. In this part, we will go over which window manager to use. There are two main types we could use here. Either a desktop environment like Gnome or KDE. Which comes with batteries included, it provides us with everything we need and we don’t need to configure much to get stuff working. ...

TIL: How to Install Neovim Nightly Using Nix Home Manager (and NixVim)

TIL: How to Install Neovim Nightly Using Nix Home Manager (and NixVim) Recently, I wanted to install the nightly version of Neovim (version 0.10) because it supports inlay hints. However, on nixpkgs the latest version of Neovim as of writing is 0.9.4. So how can we get the nightly release? Using nix/home-manager. Simple, we can use an overlay that will add the Neovim nightly package with the nightly. Assuming we are using nix flakes. ...

Part 2: How to Setup Nixos as Part of Your Development Workflow

Premable In this second part of the series, we will look at how we can not set up NixOS past installation. How we can install software and various other tools. After part 1 we should have NixOS installed, mind you since I’ve written that blog post I found a way to create a custom ISO image from my Nix config. This ISO contains a custom install script, the main advantage being able to use a tool called disko to partition our disks. ...

How to Create Systemd Services in Nix Home Manager

I recently learnt in home-manager (Nix) you can run systemd services as your own user. This is nice because we don’t need “sudo” permissions to do so. I also prefer to have as much of my config as possible in home-manager, again I don’t need to run “sudo”. Which is probably safer running apps in the least privileged mode. In my case, I wanted to run an attic, a binary cache, watch store command which uploads any changes to /nix/store to my binary cache. ...

My NixOS Dotfiles Explained

In this post, we will just go over the basics of how we can configure our setup using a git repo, nix flakes and home-manager. I will go over how I structured my nix config. Not an in-depth tutorial Note this will not be an in-depth guide into NixOS/Home Manager itself. That could well be a series on its own. We will just go over the main ways I configure NixOS/Nix and why I do it the way I do. ...

TIL: How to Check if Another Option Is Set in Home Manager (Nix)

TIL: How to Check if Another Option Is Set in Home Manager (Nix) Recently I was adding sway to my nix config (setup via home-manager). I already had Hyprland config, I wanted both sway and Hyprland to use my waybar config with some slight differences. So basically I want to check if the current host machine is using Sway or Hyprland (I am assuming we will only use one). The main reason for using Sway is my work laptop uses Ubuntu 22. ...

TIL: How to Access System in Home Manager Using Flakes

TIL: How to Access System in Home Manager Using Flakes Recently I needed to install devenv using flakes in home-manager. One of the things I needed to pass to was the type of system to install on i.e. "x86_64-linux". So as I temp hack I had something like: inputs.devenv.packages."x86_64-linux".devenv. However I was able to access the system using the pkgs attribute like so: { inputs, pkgs, ... }: { home.packages = [ inputs. ...

TIL: How to use NUR with Home-Manager & Nix Flakes

TIL: How to use NUR with Home-Manager & Nix Flakes NUR is the Nix user repository like the Arch user repository (AUR). It exists so that: The NUR was created to share new packages from the community in a faster and more decentralized way. - https://github.com/nix-community/NUR If we want to install packages from NUR in our home manager config which is set up using Nix Flakes. Assuming you build your home manager like ...