about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-05-03 19:04:00 +0200
committerGitHub <noreply@github.com>2019-05-03 19:04:00 +0200
commit966ee252c27a35793d5ff29b092979ee5c58e3d1 (patch)
tree41d2e71f6f95c9827ab460041c644b0df2709826 /nixos
parentc0a369fee3b9e40cb19b421b0ec6f579f6bd6bee (diff)
parentf975bbae114682523197385e820b4f51dcd04cf6 (diff)
downloadnixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar.gz
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar.bz2
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar.lz
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar.xz
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.tar.zst
nixlib-966ee252c27a35793d5ff29b092979ee5c58e3d1.zip
Merge pull request #59367 from Ma27/fix-hostapd-interface-naming
nixos/hostapd: escape interface names for hostapd
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/hostapd.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/hostapd.nix b/nixos/modules/services/networking/hostapd.nix
index 3fbc08e90607..7add48308f80 100644
--- a/nixos/modules/services/networking/hostapd.nix
+++ b/nixos/modules/services/networking/hostapd.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, utils, ... }:
 
 # TODO:
 #
@@ -12,6 +12,8 @@ let
 
   cfg = config.services.hostapd;
 
+  escapedInterface = utils.escapeSystemdPath cfg.interface;
+
   configFile = pkgs.writeText "hostapd.conf" ''
     interface=${cfg.interface}
     driver=${cfg.driver}
@@ -157,8 +159,8 @@ in
       { description = "hostapd wireless AP";
 
         path = [ pkgs.hostapd ];
-        after = [ "sys-subsystem-net-devices-${cfg.interface}.device" ];
-        bindsTo = [ "sys-subsystem-net-devices-${cfg.interface}.device" ];
+        after = [ "sys-subsystem-net-devices-${escapedInterface}.device" ];
+        bindsTo = [ "sys-subsystem-net-devices-${escapedInterface}.device" ];
         requiredBy = [ "network-link-${cfg.interface}.service" ];
 
         serviceConfig =