summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRoman Volosatovs <rvolosatovs@riseup.net>2019-06-09 19:06:07 +0200
committerRoman Volosatovs <rvolosatovs@riseup.net>2019-06-09 19:09:10 +0200
commit8e489018d334c5825736161655ca533880c59403 (patch)
treeea4723a9ddd361f82d33acd1d5e50ffdffdd8263 /nixos
parent98e3b90b6c8f400ae5438ef868eb992a64b75ce5 (diff)
downloadnixpkgs-8e489018d334c5825736161655ca533880c59403.tar
nixpkgs-8e489018d334c5825736161655ca533880c59403.tar.gz
nixpkgs-8e489018d334c5825736161655ca533880c59403.tar.bz2
nixpkgs-8e489018d334c5825736161655ca533880c59403.tar.lz
nixpkgs-8e489018d334c5825736161655ca533880c59403.tar.xz
nixpkgs-8e489018d334c5825736161655ca533880c59403.tar.zst
nixpkgs-8e489018d334c5825736161655ca533880c59403.zip
systemd-networkd: Only generate [Match] if present
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/networkd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 63a6f7fbe09..882db9130ea 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -669,7 +669,7 @@ let
     };
   };
 
-  commonMatchText = def: ''
+  commonMatchText = def: optionalString (def.matchConfig != {}) ''
     [Match]
     ${attrsToSection def.matchConfig}
   '';