mjrusso / nixos-config

My Nix configuration for macOS and NixOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mjrusso's NixOS System Configurations

Setup and Installation

Note

Mac only for now. I haven't tested this config on NixOS yet.

Mac

Install dependencies:

xcode-select --install

Next, install Nix using The Determinate Nix Installer.

Then clone this repository, cd into the directory, and run the following command to build and apply changes:

nix run .#build-switch

Additional Setup

Fish

Fish needs to be manually set as the login shell:

echo ~/.nix-profile/bin/fish | sudo tee -a /etc/shells
chsh -s ~/.nix-profile/bin/fish

See:

Fonts

I use Berkely Mono, which must be manually installed.

Homebrew

I use Homebrew for a few dependencies on Mac. (Homebrew must be manually installed, as per the official installation instructions.)

Note that the template that this config is built off of uses nix-homebrew to manage the Homebrew installation. I've removed that from here (at least for now) as I don't think it's worth the extra complexity (especially since Nix is dramatically reducing my reliance on Homebrew). I'm not using nix-darwin's Homebrew-related features either; I'll just manage Homebrew separately for the time being.

Emacs

Emacs is installed via Nix, but my configuration is not part of this repository (and not managed by home-manager).

To grab my config:

git clone https://github.com/mjrusso/.emacs.d ~/.emacs.d

Notes:

Usage

(These commands must be executed from the directory that this repo has been cloned to.)

To build and apply changes:

nix run .#build-switch

Note

Only files in the working tree will be copied to the Nix Store. Ensure that any new files have been added to the working tree (use git add) before running nix run .#build or nix run .#build-switch, or they will be ignored. (The files do not need to be committed to the repo.)

To update dependencies:

nix flake update

References

Thanks

Thanks to Dustin Lyons's starter template, which this configuration is based off of.

About

My Nix configuration for macOS and NixOS


Languages

Language:Nix 74.3%Language:Shell 25.7%