summary refs log tree commit diff
path: root/nixos/modules/services/networking/supplicant.nix
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-12-12 03:36:03 +0200
committerArtturin <Artturin@artturin.com>2022-12-15 22:25:51 +0200
commit05a2dfd6744cdc6ab0b57f8ab866cc686b05f519 (patch)
tree9fac9a1b33e1f3053479fe68f7b4ddca25852fac /nixos/modules/services/networking/supplicant.nix
parent084fd6904550d915954791b6923e7a1ac4e9f3ec (diff)
downloadnixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar.gz
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar.bz2
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar.lz
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar.xz
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.tar.zst
nixpkgs-05a2dfd6744cdc6ab0b57f8ab866cc686b05f519.zip
lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

https://github.com/nixos/nix/commit/d6d5885c1567454754a0d260521bafa0bd5e7fdb
Diffstat (limited to 'nixos/modules/services/networking/supplicant.nix')
-rw-r--r--nixos/modules/services/networking/supplicant.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/supplicant.nix b/nixos/modules/services/networking/supplicant.nix
index 0a48e73932e..13d84736e2c 100644
--- a/nixos/modules/services/networking/supplicant.nix
+++ b/nixos/modules/services/networking/supplicant.nix
@@ -13,7 +13,7 @@ let
   serviceName = iface: "supplicant-${if (iface=="WLAN") then "wlan@" else (
                                      if (iface=="LAN") then "lan@" else (
                                      if (iface=="DBUS") then "dbus"
-                                     else (replaceChars [" "] ["-"] iface)))}";
+                                     else (replaceStrings [" "] ["-"] iface)))}";
 
   # TODO: Use proper privilege separation for wpa_supplicant
   supplicantService = iface: suppl:
@@ -27,7 +27,7 @@ let
       driverArg = optionalString (suppl.driver != null) "-D${suppl.driver}";
       bridgeArg = optionalString (suppl.bridge!="") "-b${suppl.bridge}";
       confFileArg = optionalString (suppl.configFile.path!=null) "-c${suppl.configFile.path}";
-      extraConfFile = pkgs.writeText "supplicant-extra-conf-${replaceChars [" "] ["-"] iface}" ''
+      extraConfFile = pkgs.writeText "supplicant-extra-conf-${replaceStrings [" "] ["-"] iface}" ''
         ${optionalString suppl.userControlled.enable "ctrl_interface=DIR=${suppl.userControlled.socketDir} GROUP=${suppl.userControlled.group}"}
         ${optionalString suppl.configFile.writable "update_config=1"}
         ${suppl.extraConf}
@@ -223,7 +223,7 @@ in
         text = ''
           ${flip (concatMapStringsSep "\n") (filter (n: n!="WLAN" && n!="LAN" && n!="DBUS") (attrNames cfg)) (iface:
             flip (concatMapStringsSep "\n") (splitString " " iface) (i: ''
-              ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="${i}", TAG+="systemd", ENV{SYSTEMD_WANTS}+="supplicant-${replaceChars [" "] ["-"] iface}.service", TAG+="SUPPLICANT_ASSIGNED"''))}
+              ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="${i}", TAG+="systemd", ENV{SYSTEMD_WANTS}+="supplicant-${replaceStrings [" "] ["-"] iface}.service", TAG+="SUPPLICANT_ASSIGNED"''))}
 
           ${optionalString (hasAttr "WLAN" cfg) ''
             ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}=="wlan", TAG!="SUPPLICANT_ASSIGNED", TAG+="systemd", PROGRAM="/run/current-system/systemd/bin/systemd-escape -p %E{INTERFACE}", ENV{SYSTEMD_WANTS}+="supplicant-wlan@$result.service"