summary refs log tree commit diff
path: root/nixos/modules/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r--nixos/modules/tasks/filesystems.nix2
-rw-r--r--nixos/modules/tasks/filesystems/nfs.nix2
-rw-r--r--nixos/modules/tasks/filesystems/zfs.nix5
-rw-r--r--nixos/modules/tasks/lvm.nix2
-rw-r--r--nixos/modules/tasks/network-interfaces.nix19
5 files changed, 14 insertions, 16 deletions
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 4f56504f45e74..225bcbe58e017 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -163,7 +163,7 @@ in
 
     fileSystems = mkOption {
       default = {};
-      example = literalExample ''
+      example = literalExpression ''
         {
           "/".device = "/dev/hda1";
           "/data" = {
diff --git a/nixos/modules/tasks/filesystems/nfs.nix b/nixos/modules/tasks/filesystems/nfs.nix
index fd35c35d32adc..38c3920a78ada 100644
--- a/nixos/modules/tasks/filesystems/nfs.nix
+++ b/nixos/modules/tasks/filesystems/nfs.nix
@@ -35,7 +35,7 @@ in
           <link xlink:href="https://linux.die.net/man/5/idmapd.conf"/>
           for details.
         '';
-        example = literalExample ''
+        example = literalExpression ''
           {
             Translation = {
               GSS-Methods = "static,nsswitch";
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index cb0e66402476d..2c03ef7ba7e0b 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -104,7 +104,7 @@ in
         readOnly = true;
         type = types.package;
         default = if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
-        defaultText = "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
+        defaultText = literalExpression "if config.boot.zfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs";
         description = "Configured ZFS userland tools package.";
       };
 
@@ -150,7 +150,6 @@ in
       devNodes = mkOption {
         type = types.path;
         default = "/dev/disk/by-id";
-        example = "/dev/disk/by-id";
         description = ''
           Name of directory from which to import ZFS devices.
 
@@ -351,7 +350,7 @@ in
 
       settings = mkOption {
         type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
-        example = literalExample ''
+        example = literalExpression ''
           {
             ZED_DEBUG_LOG = "/tmp/zed.debug.log";
 
diff --git a/nixos/modules/tasks/lvm.nix b/nixos/modules/tasks/lvm.nix
index aaa76b49fa303..35316603c38f2 100644
--- a/nixos/modules/tasks/lvm.nix
+++ b/nixos/modules/tasks/lvm.nix
@@ -9,7 +9,7 @@ in {
       type = types.package;
       default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
       internal = true;
-      defaultText = "pkgs.lvm2";
+      defaultText = literalExpression "pkgs.lvm2";
       description = ''
         This option allows you to override the LVM package that's used on the system
         (udev rules, tmpfiles, systemd services).
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 34a44b383a496..47626bf030ac5 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -146,7 +146,7 @@ let
       tempAddress = mkOption {
         type = types.enum (lib.attrNames tempaddrValues);
         default = cfg.tempAddresses;
-        defaultText = literalExample ''config.networking.tempAddresses'';
+        defaultText = literalExpression ''config.networking.tempAddresses'';
         description = ''
           When IPv6 is enabled with SLAAC, this option controls the use of
           temporary address (aka privacy extensions) on this
@@ -257,7 +257,7 @@ let
 
       virtualType = mkOption {
         default = if hasPrefix "tun" name then "tun" else "tap";
-        defaultText = literalExample ''if hasPrefix "tun" name then "tun" else "tap"'';
+        defaultText = literalExpression ''if hasPrefix "tun" name then "tun" else "tap"'';
         type = with types; enum [ "tun" "tap" ];
         description = ''
           The type of interface to create.
@@ -420,7 +420,7 @@ in
           The FQDN is required but cannot be determined. Please make sure that
           both networking.hostName and networking.domain are set properly.
         '';
-      defaultText = literalExample ''''${networking.hostName}.''${networking.domain}'';
+      defaultText = literalExpression ''"''${networking.hostName}.''${networking.domain}"'';
       description = ''
         The fully qualified domain name (FQDN) of this host. It is the result
         of combining networking.hostName and networking.domain. Using this
@@ -578,7 +578,6 @@ in
         options = {
 
           interfaces = mkOption {
-            example = [ "eth0" "eth1" ];
             description = "The physical network interfaces connected by the vSwitch.";
             type = with types; attrsOf (submodule vswitchInterfaceOpts);
           };
@@ -691,7 +690,7 @@ in
         '';
       in mkOption {
         default = { };
-        example = literalExample ''
+        example = literalExpression ''
           {
             bond0 = {
               interfaces = [ "eth0" "wlan0" ];
@@ -720,7 +719,7 @@ in
             driverOptions = mkOption {
               type = types.attrsOf types.str;
               default = {};
-              example = literalExample driverOptionsExample;
+              example = literalExpression driverOptionsExample;
               description = ''
                 Options for the bonding driver.
                 Documentation can be found in
@@ -784,7 +783,7 @@ in
 
     networking.macvlans = mkOption {
       default = { };
-      example = literalExample ''
+      example = literalExpression ''
         {
           wan = {
             interface = "enp2s0";
@@ -819,7 +818,7 @@ in
 
     networking.sits = mkOption {
       default = { };
-      example = literalExample ''
+      example = literalExpression ''
         {
           hurricane = {
             remote = "10.0.0.1";
@@ -883,7 +882,7 @@ in
 
     networking.vlans = mkOption {
       default = { };
-      example = literalExample ''
+      example = literalExpression ''
         {
           vlan0 = {
             id = 3;
@@ -927,7 +926,7 @@ in
 
     networking.wlanInterfaces = mkOption {
       default = { };
-      example = literalExample ''
+      example = literalExpression ''
         {
           wlan-station0 = {
               device = "wlp6s0";