Nixos Modules by Marcos Benevides

:ID: 01b79396-e6d4-4673-9438-95a120543f05

A module is a file containing a Nix expression with a specific structure. It declares options for other modules to define (give a value). It processes them and defines options declared in other modules.

Basics

  {lib, ...}: {
    options = {
      name = lib.mkOption {
        type = lib.types.str;
      };
    };
  }

Lib Utilities

mkMerge

mkOverride

mkIf

mkOrder