/nix-config

My personal NixOS config

Primary LanguageNixBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

nix-config built with nix ci

This repository holds my NixOS configuration. It is fully reproducible, flakes based, and position-independent, meaning there is no moving around of configuration.nix.

Deployment is done using deploy-rs, see usage.

For the configurations' entry points see the individual hosts, as well as flake.nix. For adding overlays see overlays.

Hostnames are picked from my hostname list

Structure

.
├── core         # Baseline configurations applicable to all machines
├── dev          # Developer tooling configuration
├── graphical    # Sway/i3 configuration for the desktop
├── hardware     # Hardware-specific configuration
├── hosts        # Machine definitions
├── nix          # Nix build support files (overlays, deployment code)
└── users        # Per-user configurations

Usage

Deploying

NixOS

To deploy all hosts:

$ deploy

To deploy a specific host:

$ deploy .#myHost

Darwin

For macOS hosts using nix-darwin:

$ darwin-rebuild --flake ~/src/nix-config#poincare switch

Home Manager

For non-NixOS hosts (i.e. home-manager-only systems such as beme-glaptop):

$ home-manager --flake ~/src/nix-config#myHost switch

Adding overlays

Overlays should be added as individual nix files to ./nix/overlays with format

final: prev: {
    hello = (prev.hello.overrideAttrs (oldAttrs: { doCheck = false; }));
}

For more examples see ./nix/overlays.