diff options
author | danbst <abcz2.uprola@gmail.com> | 2019-07-14 13:46:10 +0300 |
---|---|---|
committer | danbst <abcz2.uprola@gmail.com> | 2019-07-14 13:46:10 +0300 |
commit | 3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca (patch) | |
tree | 49c4e3646c960459328b09bcac5d7812d7a2b909 /nixos/modules/services | |
parent | 69920dafbffcd757acff23f659263ec4b952a017 (diff) | |
download | nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar.gz nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar.bz2 nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar.lz nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar.xz nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.tar.zst nixpkgs-3b0534310c89d04fc3a9c5714b5a4d0f9fb0efca.zip |
mass replace "flip map -> foreach"
See `foreach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /foreach /g' ```
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/monitoring/ups.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/consul.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/hylafax/systemd.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/ssh/sshd.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/xautolock.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index bc755612fd9..57f0bfec574 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -225,7 +225,7 @@ in '' maxstartdelay = ${toString cfg.maxStartDelay} - ${flip concatStringsSep (flip map (attrValues cfg.ups) (ups: ups.summary)) " + ${flip concatStringsSep (foreach (attrValues cfg.ups) (ups: ups.summary)) " "} ''; diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index 3a92a883fbf..78fca9326d3 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -15,7 +15,7 @@ let ++ cfg.extraConfigFiles; devices = attrValues (filterAttrs (_: i: i != null) cfg.interface); - systemdDevices = flip map devices + systemdDevices = foreach devices (i: "sys-subsystem-net-devices-${utils.escapeSystemdPath i}.device"); in { diff --git a/nixos/modules/services/networking/hylafax/systemd.nix b/nixos/modules/services/networking/hylafax/systemd.nix index ef177e4be34..527026c0076 100644 --- a/nixos/modules/services/networking/hylafax/systemd.nix +++ b/nixos/modules/services/networking/hylafax/systemd.nix @@ -7,7 +7,7 @@ let inherit (lib) concatStringsSep optionalString; cfg = config.services.hylafax; - mapModems = lib.flip map (lib.attrValues cfg.modems); + mapModems = lib.foreach (lib.attrValues cfg.modems); mkConfigFile = name: conf: # creates hylafax config file, diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 0f9d2420903..005d8bfb61f 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -502,7 +502,7 @@ in assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true; message = "cannot enable X11 forwarding without setting xauth location";}] - ++ flip map cfg.listenAddresses ({ addr, ... }: { + ++ foreach cfg.listenAddresses ({ addr, ... }: { assertion = addr != null; message = "addr must be specified in each listenAddresses entry"; }); diff --git a/nixos/modules/services/x11/xautolock.nix b/nixos/modules/services/x11/xautolock.nix index cbe000058dc..51bdcae992e 100644 --- a/nixos/modules/services/x11/xautolock.nix +++ b/nixos/modules/services/x11/xautolock.nix @@ -129,7 +129,7 @@ in assertion = cfg.killer != null -> cfg.killtime >= 10; message = "killtime has to be at least 10 minutes according to `man xautolock`"; } - ] ++ (lib.flip map [ "locker" "notifier" "nowlocker" "killer" ] + ] ++ (lib.foreach [ "locker" "notifier" "nowlocker" "killer" ] (option: { assertion = cfg."${option}" != null -> builtins.substring 0 1 cfg."${option}" == "/"; diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 82730c5e80c..4d28a45c2ce 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -75,7 +75,7 @@ let in imap1 mkHead cfg.xrandrHeads; xrandrDeviceSection = let - monitors = flip map xrandrHeads (h: '' + monitors = foreach xrandrHeads (h: '' Option "monitor-${h.config.output}" "${h.name}" ''); # First option is indented through the space in the config but any |