🏳️‍⚧️ and I make good posts sometimes!

pfp by me!
banner by https://twitter.com/spect_ion


fediverse
‪@PolyWolf@social.treehouse.systems‬
bluesky
@wolf.girl.technology

i am still sick with COVID but very bored with all this time on my hands and nowhere to go so i decided to install Nix on my work machine and start about creating a "real" Nix install that manages more than just a few packages.


first, I had to get Nix on the dang thing. For that, I used the https://lix.systems/ installer. it is goated and i really appreciate them making the install process so easy.

next, i had to port the Lix-only install to a nix-darwin one. This involved installing nix-darwin, then following the Lix instructions for adding it to an existing nix-darwin configuration, and re-installing. For some reason that decided to build Lix from source instead of using the binary cache (even tho i thought i configured it correctly?) but no matter it is in my store now.

then, i installed home-manager as a nix-darwin module, which was tricker than expected because a bunch of tutorials and documentation give conflicting advice. the thing that I used was this one, adding home-manager.darwinModules.home-manager to the list of modules.

and at last, it was time to actually start managing dotfiles. ported my Neovim config fairly easily (just needed to read in the init.lua and symlink the .vimrc and .vim in the right places), but my Git configuration was a little trickier.

see, i want my .gitconfig on its own to remain the source of truth in my dotfiles repo, for all systems that won't have Nix installed on them. so naturally, i wrote a bit of hacky Nix code to parse my .gitconfig into a attrset that home-manager.programs.git.extraConfig enjoys! unfortunately i cannot share because my dotfiles are all under LegalName, but i would not want to subject y'all to The Horrors anyways :P

anyways! that was a fun relaxing use of an evening. i cannot wait for someone in the comments to explain to me how Nix already has an INI file parser somewhere, making my hack obsolete. (please do actually, my code is bad and I don't want to rely on it too long)


You must log in to comment.