8000 GitHub - mjrusso/nixos-config: My Nix configuration for macOS and NixOS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mjrusso/nixos-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mjrusso's NixOS System Configurations

Setup and Installation

Note

Mac and Linux (non-NixOS) only for now. I haven't tested 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

Set Fish as the login shell:

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

Next, install Homebrew. (Homebrew must be manually installed, as per the official installation instructions.) To reduce the number of moving parts, I'm not using nix-homebrew, or nix-darwin's Homebrew-related features.

Linux (non-NixOS)

Install Nix, and then perform a standalone installation of home-manager:

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install

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

nix run .#build-switch

And set Fish as the login shell:

echo ~/.nix-profile/bin/fish | sudo tee -a /etc/shells
sudo /sbin/usermod -s ~/.nix-profile/bin/fish $USER

Finally, reboot the system. (Rebooting is required for terminal definitions to be properly installed; see $TERMINFO_DIRS.)

Additional Setup

Fonts

I use Berkeley Mono, which must be manually installed.

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 (without applying changes):

nix run .#build

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0