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

lib.modules

lib.modules.setModuleContext

Add context attributes to a module. This creates a new module with the specified context attributes that imports the given module.

Type

setModuleContext :: a -> b -> c

Arguments

context
Context attributes to add.
module
Module to add the context attributes to.

Usage

{inputs, ...}: let
  inherit (inputs.nix-config.lib.modules) setModuleContext;
in # ...

Source

lib/modules/lib.nix:19