summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNicolas Pierron <nicolas.b.pierron@gmail.com>2014-08-29 18:43:03 +0200
committerNicolas Pierron <nicolas.b.pierron@gmail.com>2014-08-29 18:43:03 +0200
commit8c19690d99af8e25a58ce1a96ffda74340b88700 (patch)
treebea55a0a2b3494123a17f03409e4755564b24dad /nixos
parent43e52ef0017790d303db0758edb52c46ab6f545a (diff)
downloadnixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar.gz
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar.bz2
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar.lz
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar.xz
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.tar.zst
nixpkgs-8c19690d99af8e25a58ce1a96ffda74340b88700.zip
Remove useless use of optionSet.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/znc.nix174
-rw-r--r--nixos/modules/system/boot/luksroot.nix67
2 files changed, 117 insertions, 124 deletions
diff --git a/nixos/modules/services/networking/znc.nix b/nixos/modules/services/networking/znc.nix
index 2aa63c6e7df..5aed20ee3e0 100644
--- a/nixos/modules/services/networking/znc.nix
+++ b/nixos/modules/services/networking/znc.nix
@@ -25,85 +25,6 @@ let
     paths = cfg.modulePackages;
   };
 
-  confOptions = { ... }: {
-    options = {
-      modules = mkOption {
-        type = types.listOf types.string;
-        default = [ "partyline" "webadmin" "adminlog" "log" ];
-        example = [ "partyline" "webadmin" "adminlog" "log" ];
-        description = ''
-          A list of modules to include in the `znc.conf` file.
-        '';
-      };
-
-      userModules = mkOption {
-        type = types.listOf types.string;
-        default = [ ];
-        example = [ "fish" "push" ];
-        description = ''
-          A list of user modules to include in the `znc.conf` file.
-        '';
-      };
-
-      userName = mkOption {
-        default = defaultUserName;
-        example = "johntron";
-        type = types.string;
-        description = ''
-          The user name to use when generating the `znc.conf` file.
-          This is the user name used by the user logging into the ZNC web admin. 
-        '';
-      };
-
-      nick = mkOption {
-        default = "znc-user";
-        example = "john";
-        type = types.string;
-        description = ''
-          The IRC nick to use when generating the `znc.conf` file.
-        '';
-      };
-
-      passBlock = mkOption {
-        default = defaultPassBlock;
-        example = "Must be the block generated by the `znc --makepass` command.";
-        type = types.string;
-        description = ''
-          The pass block to use when generating the `znc.conf` file.
-          This is the password used by the user logging into the ZNC web admin.
-          This is the block generated by the `znc --makepass` command.
-          !!! If not specified, please change this after starting the service. !!!
-        '';
-      };
-
-      port = mkOption {
-        default = 5000;
-        example = 5000;
-        type = types.int;
-        description = ''
-          Specifies the port on which to listen.
-        '';
-      };
- 
-      useSSL = mkOption {
-        default = true;
-        example = true;
-        type = types.bool;
-        description = ''
-          Indicates whether the ZNC server should use SSL when listening on the specified port.
-        '';
-      };
-
-      extraZncConf = mkOption {
-        default = "";
-        type = types.lines;
-        description = ''
-          Extra config to `znc.conf` file
-        '';
-      };
-    };
-  };
-
   # Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
   mkZncConf = confOpts: ''
     // Also check http://en.znc.in/wiki/Configuration
@@ -211,18 +132,91 @@ in
         '';
       };
 
-      confOptions = mkOption {
-        default = {};
-        example = {
-          modules = [ "log" ];
-          userName = "john";
-          nick = "johntron";
+      /* TODO: add to the documentation of the current module:
+
+         Values to use when creating a `znc.conf` file.
+
+           confOptions = {
+             modules = [ "log" ];
+             userName = "john";
+             nick = "johntron";
+           };
+      */
+      confOptions = {
+        modules = mkOption {
+          type = types.listOf types.string;
+          default = [ "partyline" "webadmin" "adminlog" "log" ];
+          example = [ "partyline" "webadmin" "adminlog" "log" ];
+          description = ''
+            A list of modules to include in the `znc.conf` file.
+          '';
+        };
+
+        userModules = mkOption {
+          type = types.listOf types.string;
+          default = [ ];
+          example = [ "fish" "push" ];
+          description = ''
+            A list of user modules to include in the `znc.conf` file.
+          '';
+        };
+
+        userName = mkOption {
+          default = defaultUserName;
+          example = "johntron";
+          type = types.string;
+          description = ''
+            The user name to use when generating the `znc.conf` file.
+            This is the user name used by the user logging into the ZNC web admin.
+          '';
+        };
+
+        nick = mkOption {
+          default = "znc-user";
+          example = "john";
+          type = types.string;
+          description = ''
+            The IRC nick to use when generating the `znc.conf` file.
+          '';
+        };
+
+        passBlock = mkOption {
+          default = defaultPassBlock;
+          example = "Must be the block generated by the `znc --makepass` command.";
+          type = types.string;
+          description = ''
+            The pass block to use when generating the `znc.conf` file.
+            This is the password used by the user logging into the ZNC web admin.
+            This is the block generated by the `znc --makepass` command.
+            !!! If not specified, please change this after starting the service. !!!
+          '';
+        };
+
+        port = mkOption {
+          default = 5000;
+          example = 5000;
+          type = types.int;
+          description = ''
+            Specifies the port on which to listen.
+          '';
+        };
+
+        useSSL = mkOption {
+          default = true;
+          example = true;
+          type = types.bool;
+          description = ''
+            Indicates whether the ZNC server should use SSL when listening on the specified port.
+          '';
+        };
+
+        extraZncConf = mkOption {
+          default = "";
+          type = types.lines;
+          description = ''
+            Extra config to `znc.conf` file
+          '';
         };
-        type = types.optionSet;
-        description = ''
-          Values to use when creating a `znc.conf` file.
-        '';
-        options = confOptions; 
       };
 
       modulePackages = mkOption {
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
index 68392e3cfe2..70ff1d588a3 100644
--- a/nixos/modules/system/boot/luksroot.nix
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -342,40 +342,39 @@ in
               description = "Path where the ramfs used to update the LUKS key will be mounted in stage-1";
             };
 
-            storage = mkOption {
-              type = types.optionSet;
-              description = "Options related to the storing the salt";
-
-              options = {
-                device = mkOption {
-                  default = "/dev/sda1";
-                  type = types.path;
-                  description = ''
-                    An unencrypted device that will temporarily be mounted in stage-1.
-                    Must contain the current salt to create the challenge for this LUKS device.
-                  '';
-                };
-
-                fsType = mkOption {
-                  default = "vfat";
-                  type = types.string;
-                  description = "The filesystem of the unencrypted device";
-                };
-
-                mountPoint = mkOption {
-                  default = "/crypt-storage";
-                  type = types.string;
-                  description = "Path where the unencrypted device will be mounted in stage-1";
-                };
-
-                path = mkOption {
-                  default = "/crypt-storage/default";
-                  type = types.string;
-                  description = ''
-                    Absolute path of the salt on the unencrypted device with
-                    that device's root directory as "/".
-                  '';
-                };
+            /* TODO: Add to the documentation of the current module:
+
+               Options related to the storing the salt.
+            */
+            storage = {
+              device = mkOption {
+                default = "/dev/sda1";
+                type = types.path;
+                description = ''
+                  An unencrypted device that will temporarily be mounted in stage-1.
+                  Must contain the current salt to create the challenge for this LUKS device.
+                '';
+              };
+
+              fsType = mkOption {
+                default = "vfat";
+                type = types.string;
+                description = "The filesystem of the unencrypted device";
+              };
+
+              mountPoint = mkOption {
+                default = "/crypt-storage";
+                type = types.string;
+                description = "Path where the unencrypted device will be mounted in stage-1";
+              };
+
+              path = mkOption {
+                default = "/crypt-storage/default";
+                type = types.string;
+                description = ''
+                  Absolute path of the salt on the unencrypted device with
+                  that device's root directory as "/".
+                '';
               };
             };
           };