at 23.05-pre 661 B view raw
1{ config, options, lib, ... }: 2let 3 inherit (lib) mkIf mkOption types; 4in 5{ 6 # This needs options.warnings, which we don't have (yet?). 7 # imports = [ 8 # (lib.mkRenamedOptionModule [ "machine" ] [ "nodes" "machine" ]) 9 # ]; 10 11 options = { 12 machine = mkOption { 13 internal = true; 14 type = types.raw; 15 }; 16 }; 17 18 config = { 19 nodes = mkIf options.machine.isDefined ( 20 lib.warn 21 "In test `${config.name}': The `machine' attribute in NixOS tests (pkgs.nixosTest / make-test-python.nix / testing-python.nix / makeTest) is deprecated. Please set the equivalent `nodes.machine'." 22 { inherit (config) machine; } 23 ); 24 }; 25}