about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-06-03 16:18:28 +0200
committerGitHub <noreply@github.com>2020-06-03 16:18:28 +0200
commita448d9156b54cb5970725c5b9bc17f93667b4cac (patch)
tree90f075af201c4f93f55319d3b029a05e28ac5759 /nixos/modules
parentb759127127d8d5f47bbd4c3be54b3a27e0533780 (diff)
parenta6afdbb70bad2c8c400de8288155f8cb325cadd6 (diff)
downloadnixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar.gz
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar.bz2
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar.lz
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar.xz
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.tar.zst
nixlib-a448d9156b54cb5970725c5b9bc17f93667b4cac.zip
Merge pull request #89407 from primeos/empty-hostname-fix
nixos: Allow empty hostnames again
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index a28111049447..78d669669499 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -381,7 +381,7 @@ in
       # syntax). Note: We also allow underscores for compatibility/legacy
       # reasons (as undocumented feature):
       type = types.strMatching
-        "^[[:alpha:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
+        "^$|^[[:alpha:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
       description = ''
         The name of the machine. Leave it empty if you want to obtain it from a
         DHCP server (if using DHCP). The hostname must be a valid DNS label (see