mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-14 12:20:19 +00:00
deploy: cadf26199687a2985aceb5f307590020f48e8b54
This commit is contained in:
@@ -138,7 +138,7 @@ tech blog
|
||||
<p>Do you manage a <code>.zshrc</code>? <code>.vimrc</code>? <code>tmux.conf</code>? Do you have dozens of configuration files that you manage in a git repo? Or maybe you don’t backup any of your configuration at all? Do you also have a bunch of command line utilities that you forget you installed? Or don’t remember why you installed them?</p>
|
||||
<p>Over the years I have collected a number of dotfiles that I have shared across both Linux and macOS machines. I have tried several different ways to manage them, including <a href=https://www.atlassian.com/git/tutorials/dotfiles>bare git repos</a> and utilities such as <a href=https://www.gnu.org/software/stow/>GNU Stow</a>. These solutions work well enough, but I have since found what I would consider a much better solution for organizing user configuration: <a href=https://github.com/nix-community/home-manager>home-manager</a>.</p>
|
||||
<h2 id=what-is-home-manager>What is home-manager?</h2>
|
||||
<p>Before understanding home-manager, it is worth briefly discussing what nix is. <a href=https://nixos.org/>nix</a> is a package manager that original spawned from a <a href=https://edolstra.github.io/pubs/phd-thesis.pdf>PhD thesis</a>. Unlike other package managers, it uses symbolic links to keep track of the currently installed packages, keeping around the old ones in case you may want to rollback.</p>
|
||||
<p>Before understanding home-manager, it is worth briefly discussing what nix is. <a href=https://nixos.org/>nix</a> is a package manager that originally spawned from a <a href=https://edolstra.github.io/pubs/phd-thesis.pdf>PhD thesis</a>. Unlike other package managers, it uses symbolic links to keep track of the currently installed packages, keeping around the old ones in case you may want to rollback.</p>
|
||||
<p>For example, I have used nix to install the package <a href="https://search.nixos.org/packages?channel=unstable&show=bind&from=0&size=50&sort=relevance&type=packages&query=bind">bind</a> which includes <code>dig</code>. You can see that it is available on multiple platforms. The absolute path of <code>dig</code> can be found by running:</p>
|
||||
<pre tabindex=0><code class=language-console data-lang=console>❯ ls -lh $(which dig)
|
||||
lrwxr-xr-x 73 root 31 Dec 1969 /run/current-system/sw/bin/dig -> /nix/store/0r4qdyprljd3dki57jn6c6a8dh2rbg9g-bind-9.16.16-dnsutils/bin/dig
|
||||
|
Reference in New Issue
Block a user