about summary refs log tree commit diff
path: root/nixos/modules/testing
diff options
context:
space:
mode:
authordanbst <abcz2.uprola@gmail.com>2019-01-26 21:44:05 +0200
committerdanbst <abcz2.uprola@gmail.com>2019-01-31 00:41:10 +0200
commit27982b408e465554b8831f492362bc87ed0ec02a (patch)
tree9d91ef0747a5e1ed4a425e3e86a1b7172a8a16e4 /nixos/modules/testing
parentaa2e63ce5ed6e24d73eaefe61489ece46f7460d7 (diff)
downloadnixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar.gz
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar.bz2
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar.lz
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar.xz
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.tar.zst
nixlib-27982b408e465554b8831f492362bc87ed0ec02a.zip
types.optionSet: deprecate and remove last usages
Diffstat (limited to 'nixos/modules/testing')
-rw-r--r--nixos/modules/testing/service-runner.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix
index 5ead75788e5c..17d5e3376908 100644
--- a/nixos/modules/testing/service-runner.nix
+++ b/nixos/modules/testing/service-runner.nix
@@ -92,23 +92,24 @@ let
       exit($mainRes & 127 ? 255 : $mainRes << 8);
     '';
 
+  opts = { config, name, ... }: {
+    options.runner = mkOption {
+    internal = true;
+    description = ''
+        A script that runs the service outside of systemd,
+        useful for testing or for using NixOS services outside
+        of NixOS.
+    '';
+    };
+    config.runner = makeScript name config;
+  };
+
 in
 
 {
   options = {
     systemd.services = mkOption {
-      options =
-        { config, name, ... }:
-        { options.runner = mkOption {
-            internal = true;
-            description = ''
-              A script that runs the service outside of systemd,
-              useful for testing or for using NixOS services outside
-              of NixOS.
-            '';
-          };
-          config.runner = makeScript name config;
-        };
+      type = with types; attrsOf (submodule opts);
     };
   };
 }