diff --git a/lib/options.nix b/lib/options.nix
index d1a161cf7633..63798c4faa3b 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -98,7 +98,8 @@ rec {
representation of derivations is very large (on the order of
megabytes) and is not actually used by the manual generator. */
scrubOptionValue = x:
- if isDerivation x then { type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; }
+ if isDerivation x then
+ { type = "derivation"; drvPath = x.name; outPath = x.name; name = x.name; }
else if isList x then map scrubOptionValue x
else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) (removeAttrs x ["_args"])
else x;
diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl
index f4bdc6288b10..6d11ad7a6c4a 100644
--- a/nixos/doc/manual/options-to-docbook.xsl
+++ b/nixos/doc/manual/options-to-docbook.xsl
@@ -157,14 +157,7 @@
-
-
- (download of )
-
-
- (build of )
-
-
+ (build of )
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix
index 239da2859e9e..1d9b89a0b0ff 100644
--- a/nixos/modules/misc/nixpkgs.nix
+++ b/nixos/modules/misc/nixpkgs.nix
@@ -59,7 +59,7 @@ in
};
nixpkgs.system = mkOption {
- default = pkgs.stdenv.system;
+ type = types.str;
description = ''
Specifies the Nix platform type for which NixOS should be built.
If unset, it defaults to the platform type of your host system
@@ -70,4 +70,8 @@ in
};
};
+
+ config = {
+ nixpkgs.system = pkgs.stdenv.system;
+ };
}
diff --git a/nixos/modules/services/networking/openvpn.nix b/nixos/modules/services/networking/openvpn.nix
index 8cc19506e21b..400cb74f7d9f 100644
--- a/nixos/modules/services/networking/openvpn.nix
+++ b/nixos/modules/services/networking/openvpn.nix
@@ -75,36 +75,36 @@ in
services.openvpn.servers = mkOption {
default = {};
- example = {
+ example = literalExample ''
+ {
+ server = {
+ config = '''
+ # Simplest server configuration: http://openvpn.net/index.php/documentation/miscellaneous/static-key-mini-howto.html.
+ # server :
+ dev tun
+ ifconfig 10.8.0.1 10.8.0.2
+ secret /root/static.key
+ ''';
+ up = "ip route add ...";
+ down = "ip route del ...";
+ };
- server = {
- config = ''
- # Simplest server configuration: http://openvpn.net/index.php/documentation/miscellaneous/static-key-mini-howto.html.
- # server :
- dev tun
- ifconfig 10.8.0.1 10.8.0.2
- secret /root/static.key
- '';
- up = "ip route add ...";
- down = "ip route del ...";
- };
-
- client = {
- config = ''
- client
- remote vpn.example.org
- dev tun
- proto tcp-client
- port 8080
- ca /root/.vpn/ca.crt
- cert /root/.vpn/alice.crt
- key /root/.vpn/alice.key
- '';
- up = "echo nameserver $nameserver | ${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev";
- down = "${pkgs.openresolv}/sbin/resolvconf -d $dev";
- };
-
- };
+ client = {
+ config = '''
+ client
+ remote vpn.example.org
+ dev tun
+ proto tcp-client
+ port 8080
+ ca /root/.vpn/ca.crt
+ cert /root/.vpn/alice.crt
+ key /root/.vpn/alice.key
+ ''';
+ up = "echo nameserver $nameserver | ''${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev";
+ down = "''${pkgs.openresolv}/sbin/resolvconf -d $dev";
+ };
+ }
+ '';
description = ''
Each attribute of this option defines an Upstart job to run an
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index e9cf9ae5e3e6..d21b6da0e772 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -445,7 +445,7 @@ in
extraModules = mkOption {
type = types.listOf types.unspecified;
default = [];
- example = [ "proxy_connect" { name = "php5"; path = "${php}/modules/libphp5.so"; } ];
+ example = literalExample ''[ "proxy_connect" { name = "php5"; path = "''${php}/modules/libphp5.so"; } ]'';
description = ''
Additional Apache modules to be used. These can be
specified as a string in the case of modules distributed
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index 65b634f9482e..0910708002bd 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -204,16 +204,17 @@ in
session = mkOption {
default = [];
- example = [
- {
- manage = "desktop";
- name = "xterm";
- start = "
- ${pkgs.xterm}/bin/xterm -ls &
- waitPID=$!
- ";
- }
- ];
+ example = literalExample
+ ''
+ [ { manage = "desktop";
+ name = "xterm";
+ start = '''
+ ''${pkgs.xterm}/bin/xterm -ls &
+ waitPID=$!
+ ''';
+ }
+ ]
+ '';
description = ''
List of sessions supported with the command used to start each
session. Each session script can set the
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index e18a1d4c112c..56cb7cbeaa69 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -156,7 +156,7 @@ in
extraFiles = mkOption {
default = {};
example = literalExample ''
- { "memtest.bin" = "${pkgs.memtest86plus}/memtest.bin"; }
+ { "memtest.bin" = "''${pkgs.memtest86plus}/memtest.bin"; }
'';
description = ''
A set of files to be copied to /boot.
diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix
index 30d0119c293e..b22259b6d632 100644
--- a/nixos/modules/system/etc/etc.nix
+++ b/nixos/modules/system/etc/etc.nix
@@ -32,13 +32,14 @@ in
environment.etc = mkOption {
type = types.loaOf types.optionSet;
default = {};
- example =
+ example = literalExample ''
{ hosts =
{ source = "/nix/store/.../etc/dir/file.conf.example";
mode = "0440";
};
"default/useradd".text = "GROUP=100 ...";
- };
+ }
+ '';
description = ''
Set of files that have to be linked in /etc.
'';