Flake Inputs
All external dependencies are declared in flake.nix:
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Flake framework for modular configuration
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-darwin, the module system a macOS host is built with. The darwin
# exports are written against it, and the darwin host checks evaluate
# with its darwinSystem.
nix-darwin = {
url = "github:nix-darwin/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
# Deliberately does not follow nixpkgs, for cache hits rather than for
# any build failure. Upstream builds against its own pin, so
# hyprland.cachix.org serves the exact derivations this flake asks for.
# Adding `follows` while still reading inputs.hyprland.packages changes
# those hashes and puts every consumer on a source build, which is the
# one combination to avoid.
#
# nixpkgs carries hyprland too, so defaulting to pkgs.hyprland with
# mkDefault (what the niri module does) is viable and would drop the
# second nixpkgs this input costs. Left alone because no check here can
# prove a packaging swap leaves a live session behaving the same.
url = "github:hyprwm/Hyprland";
# Only upstream's own checks and dev shell read this, so following ours
# leaves the package hashes alone and drops a second copy from the lock.
inputs.pre-commit-hooks.follows = "git-hooks";
};
ashell = {
url = "github:MalpenZibo/ashell";
inputs.nixpkgs.follows = "nixpkgs";
};
# Packages for AI agents and their desktop clients, the default of the
# package options of the claude-code, codex, claude-desktop and orca
# modules. Like hyprland it does not follow nixpkgs. Upstream builds and
# tests against its own pin, and cache.numtide.com serves those exact
# derivations, so following ours would put every consumer on a local
# build of each package.
llm-agents = {
url = "github:numtide/llm-agents.nix";
# Only upstream's own outputs and checks read these, so following ours
# leaves the package hashes alone and drops a copy from the lock.
inputs.flake-parts.follows = "flake-parts";
inputs.treefmt-nix.follows = "treefmt-nix";
};
# The Paseo plugin that loads each agent's direnv environment, the
# default of othrys.apps.ai.paseo.direnv.package. Its package is the
# plugin's TypeScript source, which Paseo compiles when it loads it, so
# following our nixpkgs costs no cache hit. Only a host with Paseo and
# its direnv option on reads it, and no other host fetches it.
paseo-direnv = {
url = "github:MatthewDeSouza/paseo-direnv";
inputs.nixpkgs.follows = "nixpkgs";
};
# Niri compositor, packages plus the typed programs.niri.settings module
# (build-time-validated KDL config). Self-contained, since the compositor
# module imports its NixOS module directly, and its auto-cache is disabled in
# favor of the curated substituter list in othrys.system.nix.
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
# niri-flake builds its own niri-stable package against nixpkgs-stable.
# The compositor module takes niri from pkgs and never reads that
# package, so the second nixpkgs follows ours and leaves the lock.
inputs.nixpkgs-stable.follows = "nixpkgs";
};
# Declarative disk partitioning
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# NixOS-WSL, the module a host running as a WSL distro is built with,
# written into by the optional nixosModules.wsl export. Its flake-compat
# input is a plain source tree that no output reads.
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix-index database, a prebuilt index for comma and nix-locate
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# Impermanence, opt-in state persistence
impermanence = {
url = "github:nix-community/impermanence";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# Nixvim - Neovim configuration with Nix modules
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
# Stylix - System-wide theming using base16
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
# Git hooks for pre-commit validation
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Multi-language formatting (drives `nix fmt` + the treefmt pre-commit hook)
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets management with age encryption
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Lanzaboote, Secure Boot for systemd-boot. Pinned to a release tag, which
# is what upstream asks consumers to track. No module imports it. It is
# here so flake/checks can evaluate the systemd-boot Secure Boot path, and
# a consumer who wants that path imports the module from their own input.
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.1.0";
inputs.nixpkgs.follows = "nixpkgs";
# Upstream names this input after the repository's former name. It is
# the project this flake carries as git-hooks.
inputs.pre-commit.follows = "git-hooks";
# crane and rust-overlay stay unfollowed. This flake declares neither,
# and the copies ashell brings are pinned for ashell's toolchain rather
# than for the lzbt build.
};
};
Input Summary
| Input | Purpose |
|---|---|
ashell | GPU-accelerated Wayland status bar, the default of othrys.desktop.ashell.package |
nixpkgs | Main package set (unstable channel) |
flake-parts | Modular flake framework |
home-manager | Declarative user environment management, written into by the optional nixosModules.home export |
hyprland | Wayland compositor (pinned, not following nixpkgs), the default of othrys.desktop.compositors.hyprland.package and portalPackage |
niri | niri-flake, the typed programs.niri.settings module the Niri compositor module imports |
llm-agents | Packages for AI agents and their desktop clients (pinned, not following nixpkgs), the default package of the AI modules that name it |
disko | Declarative disk partitioning, written into by the optional nixosModules.disko export |
nixos-wsl | NixOS-WSL, written into by the optional nixosModules.wsl export |
nix-index-database | Prebuilt database for comma and nix-locate, as the Home Manager module othrys.apps.comma imports |
impermanence | Opt-in state persistence, written into by the optional nixosModules.impermanence export |
nixvim | Neovim configuration via Nix modules, as the Home Manager module othrys.apps.nixvim imports |
stylix | System-wide theming, read by the optional Stylix adapter and the checks |
git-hooks | Pre-commit hooks (treefmt, Statix, Deadnix, commitizen, gitleaks and the three repository hooks) |
treefmt-nix | Multi-language formatter behind nix fmt |
sops-nix | Secrets management with age encryption, written into by the optional nixosModules.secrets export |
lanzaboote | Secure Boot for systemd-boot (read by the checks only, since no module imports it and a consumer who wants it declares their own) |
The private secrets input is declared only in the consuming fleet flake, never here, since this flake must remain evaluable by anyone.
What a Consumer Declares
A consuming flake declares othrys, nixpkgs and the inputs whose modules it imports itself. home-manager, impermanence, disko, sops-nix, stylix and nixos-wsl are for a host that imports the matching othrys export, and none of them is required. Each is typically written as follows = "othrys/<name>", so hosts build against the exact versions this library is locked to (see Host Configuration). A flake whose hosts import nixosModules.full declares none of the first five, since that export imports each upstream module from this flake’s lock. full leaves NixOS-WSL out, so a WSL host declares nixos-wsl itself.
It declares none of ashell, hyprland, nixvim, nix-index-database, llm-agents or niri. flake/modules.nix hands the first five to the modules from this flake’s lock, as a module argument named othrysInputs, and imports niri-flake’s module directly. An input of one of those names in the consuming flake is not read by any module.
A consumer changes what a module builds from in one of two ways.
- A
packageoption.othrys.desktop.compositors.hyprland.packageandportalPackage, andothrys.desktop.ashell.package, take any package. The defaults are the packages of the locked flakes. - A
followson this flake’s input.inputs.othrys.inputs.<name>.follows = "<name>"replaces the locked flake with the consumer’s own. It is the only way to change nixvim and nix-index-database, which are Home Manager modules with no package to set.
inputs = {
othrys.url = "github:<owner>/othrys.nix";
# The consumer's own nixvim, in place of the one othrys locks.
nixvim.url = "github:nix-community/nixvim";
othrys.inputs.nixvim.follows = "nixvim";
};
The Hyprland input deliberately does not follow nixpkgs, so its packages match what hyprland.cachix.org serves. A follows that replaces it, or a package from another source, gives up those cache hits.
The llm-agents input does not follow nixpkgs either, for the same reason. Upstream builds and tests against its own pin, and cache.numtide.com serves those derivations. A host trusts that cache only while a module whose package comes from the input is on.