about summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-06-03 14:22:13 +0200
committerGitHub <noreply@github.com>2022-06-03 14:22:13 +0200
commit793180cf557e9f5368466f62d6c54a8887895d3e (patch)
tree4316f53c3cceccb15e24358406f7b299cbb6cb77 /nixos/doc/manual/development
parent2a750c302669a59a13d8a2a6fa038cbc6e6cb134 (diff)
parentb92013d842d28cd3d53cdf168e4dd1042cdac4e7 (diff)
Merge branch 'master' into 172325-nixostest-override-python-pkgs-additional-param
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r--nixos/doc/manual/development/option-types.section.md4
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.section.md13
2 files changed, 17 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md
index 00f1d85bdb615..d32d4fc50ad79 100644
--- a/nixos/doc/manual/development/option-types.section.md
+++ b/nixos/doc/manual/development/option-types.section.md
@@ -308,6 +308,10 @@ The option set can be defined directly
 ([Example: Directly defined submodule](#ex-submodule-direct)) or as reference
 ([Example: Submodule defined as a reference](#ex-submodule-reference)).
 
+Note that even if your submodule’s options all have a default value,
+you will still need to provide a default value (e.g. an empty attribute set)
+if you want to allow users to leave it undefined.
+
 ::: {#ex-submodule-direct .example}
 ::: {.title}
 **Example: Directly defined submodule**
diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md
index fff8873e61d0d..f4f4056ad9889 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.section.md
+++ b/nixos/doc/manual/development/writing-nixos-tests.section.md
@@ -332,6 +332,19 @@ repository):
     '';
 ```
 
+Similarly, the type checking of test scripts can be disabled in the following
+way:
+
+```nix
+import ./make-test-python.nix {
+  skipTypeCheck = true;
+  nodes.machine =
+    { config, pkgs, ... }:
+    { configuration…
+    };
+}
+```
+
 ## Failing tests early {#ssec-failing-tests-early}
 
 To fail tests early when certain invariables are no longer met (instead of waiting for the build to time out), the decorator `polling_condition` is provided. For example, if we are testing a program `foo` that should not quit after being started, we might write the following: