Skip to main content
Isabel’s Dotfiles uses Lix, a fork of the Nix package manager with improved features and fixes. This configuration makes extensive use of Lix’s experimental features and optimizations.

What is Lix?

Lix is a modern fork of Nix that includes:
  • Bug fixes and performance improvements
  • New experimental features
  • Better error messages and diagnostics
  • Community-driven development
You can track new features in the Lix release notes.

Package configuration

The configuration uses Lix from the Git branch for the latest features:
modules/base/nix/nix.nix
package = pkgs.lixPackageSets.git.lix;
Important: You cannot build nix.exe with Lix. This limitation is documented but rarely affects typical usage.

Experimental features

The configuration enables several experimental Lix features:
modules/base/nix/nix.nix
experimental-features = [
  # Enables flakes, needed for this config
  "flakes"

  # Enables the nix3 commands, a requirement for flakes
  "nix-command"

  # Adds a new command called `lix` which allows you to run nix plugins,
  # similar to how cargo works
  "lix-custom-sub-commands"
];

Feature highlights

Flakes

Modern, reproducible package and configuration management

Pipe operator

Write more readable Nix expressions with pipeline syntax

Auto-allocate UIDs

No more manual nixbld user management

Custom sub-commands

Extend Lix with plugin-style commands

Store optimization

Lix includes a fix for auto-optimise-store that allows safe usage:
modules/base/nix/nix.nix
# Automatically optimise symlinks
# Disable auto-optimise-store because of this issue:
# https://github.com/NixOS/nix/issues/7273
# but we use lix which has a fix for this issue:
# https://gerrit.lix.systems/c/lix/+/2100
auto-optimise-store = true;
This feature was broken in upstream Nix but is safe to use in Lix due to this patch.

Garbage collection

Automatic cleanup keeps your system lean:
modules/base/nix/nix.nix
# Set up garbage collection to run automatically,
# removing packages after 3 days
gc = {
  automatic = true;
  options = "--delete-older-than 3d";
};

Storage management

Intelligent free space management:
modules/base/nix/nix.nix
# Free up to 20GiB whenever there is less than 5GB left.
# This setting is in bytes, so we multiply with 1024 by 3
min-free = 5 * 1024 * 1024 * 1024;
max-free = 20 * 1024 * 1024 * 1024;
When disk space drops below 5GB, Lix automatically frees up to 20GB by removing old store paths.

Registry and flake configuration

The configuration pins the registry to avoid unnecessary network requests:
modules/base/nix/nix.nix
# Pin the registry to avoid downloading and evaluating a new nixpkgs
# version everytime
registry = (mapAttrs (_: flake: { inherit flake; }) flakeInputs) // {
  nixpkgs = lib.mkForce { flake = inputs.nixpkgs; };
};

# We don't want to track the registry, but we do want to allow the usage
# of the `flake:` references, so we need to enable use-registries
use-registries = true;
flake-registry = "";

Disable channels

Channels are disabled in favor of flakes:
modules/base/nix/nix.nix
# Disable usage of nix channels
channel.enable = false;

Build settings

Parallel builds

modules/base/nix/nix.nix
# Let the system decide the number of max jobs
max-jobs = "auto";

Keep building on failure

modules/base/nix/nix.nix
# Continue building derivations even if one fails
# This is important for keeping a nice cache of derivations
keep-going = true;

# Show more log lines for failed builds
log-lines = 30;

Sandboxing

modules/base/nix/nix.nix
# Build inside sandboxed environments
# We only enable this on Linux because it severely breaks on Darwin
sandbox = pkgs.stdenv.hostPlatform.isLinux;

System features

modules/base/nix/nix.nix
system-features = [
  "nixos-test"
  "kvm"
  "recursive-nix"
  "big-parallel"
];

Security settings

Flake config acceptance

modules/base/nix/nix.nix
# Whether to accept nix configuration from a flake without prompting
# Literally a CVE waiting to happen
accept-flake-config = false;
Accepting flake configs automatically is a security risk. This configuration requires manual approval.

File system checks

modules/base/nix/nix.nix
# Prevent data corruption
transfer.fsckObjects = true;
fetch.fsckObjects = true;
receive.fsckObjects = true;

XDG base directories

Lix follows the XDG Base Directory specification:
modules/base/nix/nix.nix
# Use XDG base directories for all the nix things
use-xdg-base-directories = true;
This keeps your home directory clean by storing Nix files in ~/.local/share/nix, ~/.cache/nix, etc.

Development features

Import from derivation

modules/base/nix/nix.nix
# This defaults to true, however it slows down evaluation
# We do need it for catppuccin/nix so we keep it enabled
allow-import-from-derivation = true;

Direnv support

modules/base/nix/nix.nix
# For direnv GC roots
keep-derivations = true;
keep-outputs = true;
These settings prevent garbage collection from removing dependencies needed by direnv environments.

Network optimization

modules/base/nix/nix.nix
# Maximum number of parallel TCP connections used to fetch imports
# and binary caches, 0 means no limit
http-connections = 50;

Substituters and caches

The configuration uses multiple binary caches for faster builds:
modules/base/nix/substituters.nix
substituters = [
  "https://nix-community.cachix.org"
]
++ optionals hasCtp [
  "https://catppuccin.cachix.org"
];

trusted-public-keys = [
  "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]
++ optionals hasCtp [
  "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU="
];
The cache.nixos.org substituter is added by default and doesn’t need to be specified.

Quality of life settings

modules/base/nix/nix.nix
# Don't warn me if the current working tree is dirty
# I don't need the warning because I'm working on it right now
warn-dirty = false;

Permission management

modules/base/nix/nix.nix
let
  sudoers = if (_class == "nixos") then "@wheel" else "@admin";
in
{
  # Users or groups which are allowed to do anything with the Nix daemon
  allowed-users = [ sudoers ];
  # Users or groups which are allowed to manage the nix store
  trusted-users = [ sudoers ];
}
Permissions adapt based on whether you’re running NixOS or Darwin (macOS).

Installation

To install Lix on a new system:
curl -sSf -L https://install.lix.systems/lix | sh -s -- install

Next steps

Home Manager

Learn how Home Manager integrates with Lix

Adding packages

Add packages to your configuration

Build docs developers (and LLMs) love