docs: Document osConfig module argument (#4103)

As mentioned https://github.com/nix-community/home-manager/issues/393#issuecomment-1259996423.

Otherwise only documented in source code, which isn't very findable.
This commit is contained in:
Midnight Veil 2023-06-19 19:37:28 +10:00 committed by GitHub
parent 0480dabc99
commit a10aa82e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,6 +219,15 @@ the dependency on `NIX_PATH`, which is otherwise used for importing
Nixpkgs. Nixpkgs.
==== ====
[NOTE]
====
Home Manager will pass `osConfig` as a module argument to any modules
you create. This contains the system's NixOS configuration.
[source,nix]
{ lib, pkgs, osConfig, ... }:
====
Once installed you can see <<ch-usage>> for a more detailed Once installed you can see <<ch-usage>> for a more detailed
description of Home Manager and how to use it. description of Home Manager and how to use it.
@ -325,5 +334,14 @@ the dependency on `NIX_PATH`, which is otherwise used for importing
Nixpkgs. Nixpkgs.
==== ====
[NOTE]
====
Home Manager will pass `osConfig` as a module argument to any modules
you create. This contains the system's nix-darwin configuration.
[source,nix]
{ lib, pkgs, osConfig, ... }:
====
Once installed you can see <<ch-usage>> for a more detailed Once installed you can see <<ch-usage>> for a more detailed
description of Home Manager and how to use it. description of Home Manager and how to use it.