nixpkgs/nixos/modules/system/activation
Bas van Dijk d06de760f8 nixos/modules/system/activation/top-level.nix: allow overriding system.name
The toplevel derivations of systems that have `networking.hostName`
set to `""` (because they want their hostname to be set by DHCP) used
to be all named
`nixos-system-unnamed-${config.system.nixos.label}`.
This makes them hard to distinguish.

A similar problem existed in NixOS tests where `vmName` is used in the
`testScript` to refer to the VM. It defaulted to the
`networking.hostName` which when set to `""` won't allow you to refer
to the machine from the `testScript`.

This commit makes the `system.name` configurable. It still defaults to:

```
if config.networking.hostName == ""
then "unnamed"
else config.networking.hostName;
```

but in case `networking.hostName` needs to be to `""` the
`system.name` can be set to a distinguishable name.
2020-07-20 13:44:18 +02:00
..
activation-script.nix Revert "add config.environment.ld-linux" 2020-02-02 15:29:49 +01:00
no-clone.nix specialisation: replace nesting with named configurations 2020-04-12 08:12:50 -04:00
switch-to-configuration.pl switch-to-configuration: Add new option X-OnlyManualStart 2020-03-09 11:28:07 +00:00
top-level.nix nixos/modules/system/activation/top-level.nix: allow overriding system.name 2020-07-20 13:44:18 +02:00