My dream is to make everything in my life declarative, but let's start with my system. For that I have Nix. Everything is declared in one git repo. Window manager, editor, terminal, theme, shell. If my laptop dies I clone one repo and I'm back. NixOS is that good.
But nobody talks about what it actually takes to get there. So here are some of my battles.
Home Manager
At work we're stuck on some enterprise Ubuntu distro. For a while I thought that meant Nix was off the table there. Then I found Home Manager.
Basically Home Manager takes makes your home directory declarative and managed with Nix. It works on any distro. Any OS, really. So now I push as much as possible into Home Manager. Hyprland, neovim, shell, all of it. My work machine and my personal laptop share the same dotfiles with different profiles on one flake.
If you think Nix isn't for you because your work machine is locked down, Home Manager is the answer.
Hyprland and NixGL
Getting Hyprland running with home-manager at work was a bit rough. The trick is nixGL. If you're fighting GPU issues on a non-NixOS distro, check my repo and get familiar with it. I won't pretend the process was smooth but it works now and that's what matters. However, the battle doesn't end there. When you are on Hyprland with NixGL, some of your other apps will not play ball with NixGL, so I needed a shell script called noNixGL, which does exactly what you think.
The tui-greetd Incident
Setup: I have a Windows desktop for gaming and my NixOS laptop next to it on HDMI. I use lan-mouse to share my mouse across both. Works great, except I can't control the laptop lock screen with it. So I needed a TUI-based display manager that accepts keyboard input over the network.
tui-greetd is perfect for this. One problem. You cannot suppress kernel logs on boot. Every single time my system starts, the TUI gets buried under ACPI error spam. I tried kernel parameters. Log levels. Console redirects. Nothing. I eventually gave up and switched to ReGreet.
If you or anyone you know is suffering with this, please give up.
Moving Neovim to Nixvim
I had a Lua neovim config that worked fine. I symlinked it through Nix for a while. But I wanted everything declarative so I moved to Nixvim.
There are rough edges. Some plugins need workarounds. But you can embed raw Lua anywhere so nothing is truly blocked. It's not life-changing but it keeps everything in one language and one repo.
Theming Everything Once
I have a pretty bad OCD about my colorscheme, when I see a color that is not matching my theme, I am unable to work or do anything else before spending an hour trying to make it go away. I have a custom colorscheme called "pain". Purple and orange on black. I need it everywhere. Stylix lets you declare your theme once and it propagates across your entire system. Waybar, rofi, kitty, tmux, all from one source of truth.
If you've ever spent an evening copy-pasting hex codes into twelve different config files you understand why this matters.
Was It Worth It
Nix is not a free lunch. Declarativity gets getting used to, some docs are a bit scattered and you will absolutely hit walls that make you reconsider everything. But once you push through, the control is unreal. My system is reproducible, portable, and every change is a commit.
My dotfiles are here. Steal what's useful.