Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

slimslenderslacks/nixos-config

Open more actions menu
 
 

Repository files navigation

[GitHub issues]

NixOS System Configurations

Note

Mitchell Hashimoto's original justification.

This repository contains my NixOS system configurations. This repository isn't meant to be a turnkey solution to copying my setup or learning Nix, so I want to apologize to anyone trying to look for something "easy". I've tried to use very simple Nix practices wherever possible, but if you wish to copy from this, you'll have to learn the basics of Nix, NixOS, etc.

I don't claim to be an expert at Nix or NixOS, so there are certainly improvements that could be made! Feel free to suggest them, but please don't be offended if I don't integrate them, I value having my config work over having it be optimal.

Setup (VM)

Setup (macOS/Darwin)

To utilize the Mac setup, first install Nix using some Nix installer. There are two great installers right now: nix-installer by Determinate Systems and Flox. The point of both for my configs is just to get the nix CLI with flake support installed.

Once installed, clone this repo and run make. If there are any errors, follow the error message (some folders may need permissions changed, some files may need to be deleted). That's it.

Setup (WSL)

THIS IS OPTIONAL I recommend you ignore this unless you're interested in using Nix to manage your WSL (Windows Subsystem for Linux) environment, too.

I use Nix to build a WSL root tarball for Windows. I then have my entire Nix environment on Windows in WSL too, which I use to for example run Neovim amongst other things. My general workflow is that I only modify my WSL environment outside of WSL, rebuild my root filesystem, and recreate the WSL distribution each time there are system changes. My system changes are rare enough that this is not annoying at all.

To create a WSL root tarball, you must be running on a Linux machine that is able to build x86_64 binaries (either directly or cross-compiling). My aarch64 VMs are all properly configured to cross-compile to x86_64 so if you're using my NixOS configurations you're already good to go.

Run make wsl. This will take some time but will ultimately output a tarball in ./result/tarball. Copy that to your Windows machine. Once it is copied over, run the following steps on Windows:

$ wsl --import nixos .\nixos .\path\to\tarball.tar.gz
...

$ wsl -d nixos
...

# Optionally, make it the default
$ wsl -s nixos

After the wsl -d command, you should be dropped into the Nix environment. Voila!

About

My NixOS configurations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 78.8%
  • Shell 14.8%
  • Makefile 6.2%
  • Tree-sitter Query 0.2%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.