Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

mkFlake / mkConfiguration

nixy.mkFlake {
  nixpkgs;          # required - nixpkgs input
  imports ? [ ];    # directories or files to scan
  args ? { };       # passed to all modules
  exclude ? null;   # filter function
}

imports

Accepts paths, directories, or inline modules:

imports = [
  ./.           # scan current directory
  ./modules     # scan specific directory
  ./special.nix # single file
  { ... }       # inline module
];

args

Passed to framework modules and NixOS/Darwin/HM modules:

args = { inherit inputs; myCustomArg = "value"; };

exclude

Filter scanned files. Default excludes _*, .*, flake.nix, default.nix:

exclude = { name, path }:
  name == "test.nix" || lib.hasPrefix "_" name;

Top-level Options

OptionDescription
systemsTarget systems (default: x86_64/aarch64 linux/darwin)
modules.*Module definitions
nodes.*Node definitions
targets.*Target builders
rulesBuild-time assertions
perSystemPer-system outputs
flake.*Extra flake outputs