nixpkgs/nixos/lib
Maximilian Bosch 113a6b9325
nixos/testing: disallow special chars in machine names in network expressions
These names are referenced by Perl variables inside the testing
frameworks which don't allow chars like `-` as character inside. An exemplary
expression may look like this:

```
{
  x11-vm = {
    services.xserver.enable = true;
  };
}
```

This expression evaluates, e.g. when running `nixos-build-vms`, but when
trying to run `./result/bin/nixos-run-vms`, an error like this occurs:

```
starting VDE switch for network 1
running the VM test script
error: Can't modify subtraction (-) in scalar assignment at (eval 17) line 1, at EOF
Bareword "test" not allowed while "strict subs" in use at (eval 17) line 1.
Can't modify subtraction (-) in scalar assignment at (eval 17) line 1, at EOF
Bareword "test" not allowed while "strict subs" in use at (eval 17) line 1.
vde_switch: EOF on stdin, cleaning up and exiting
cleaning up
```

This can be very confusing for beginners, this change breaks evaluation
if such names are used for machines.
2018-12-18 01:58:56 +01:00
..
test-driver nixos/tests: Fix QEMU flags for SCSI disks 2018-04-30 03:02:59 +02:00
testing jquery & jquery-ui: Move to nixos/lib/testing/ 2018-02-27 20:07:35 +08:00
build-vms.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
eval-config.nix Merge pull request #46341 from obsidiansystems/fix-46320 2018-09-08 09:16:41 -04:00
from-env.nix Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
make-channel.nix Unify NixOS and Nixpkgs channel structure 2015-08-05 17:37:11 +02:00
make-disk-image.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
make-ext4-fs.nix make-ext4-fs: Fix cross compiling 2018-08-21 14:05:23 +03:00
make-iso9660-image.nix [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
make-iso9660-image.sh ISO images: Initialize the Nix database with correct NAR hashes/sizes 2018-02-07 16:54:23 +01:00
make-squashfs.nix ISO images: Initialize the Nix database with correct NAR hashes/sizes 2018-02-07 16:54:23 +01:00
make-system-tarball.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
make-system-tarball.sh make-system-tarball: allow alternate compression methods 2018-04-03 11:30:43 -03:00
qemu-flags.nix reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
testing.nix nixos/testing: disallow special chars in machine names in network expressions 2018-12-18 01:58:56 +01:00
utils.nix nixos: generalize copy-paste from stage-1 and zfs to utils 2016-08-23 18:14:06 +00:00