---
date: "2024-04-19T14:55:12.000Z"
title: "2024-04-19"
tags: ["nix","home-manager"]
draft: false
---

I did a [refactor](https://github.com/danielcorin/nix-config/commit/104dc604bacfa5d6ee66d8cbf5a3e43a8ed90178) of my nix config following a pattern I learned from reading Davis' [`setup`](https://github.com/davish/setup/).
My two main uses right now for Nix/`home-manager` are to install and configure programs.
Some of these programs have nix modules that allow for the configuration to be written in Nix.
Others don't, but you can still use Nix to create a config file for that program to read.
I do the latter with `skhd` and `goku` to create a `karabiner.json`.
With this refactor, I used the `default.nix` file to create program-specific module imports.
I refactored my `home.nix` to use the same approach as well.
This allows me to easily co-locate code to set up a given program, regardless of whether I am configuring it with Nix or by creating dotfiles.