From 27982b408e465554b8831f492362bc87ed0ec02a Mon Sep 17 00:00:00 2001 From: danbst Date: Sat, 26 Jan 2019 21:44:05 +0200 Subject: types.optionSet: deprecate and remove last usages --- nixos/modules/testing/service-runner.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'nixos/modules/testing') diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix index 5ead75788e5c1..17d5e33769086 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); }; }; } -- cgit 1.4.1