summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-07-04 13:00:04 +0200
committertv <tv@krebsco.de>2023-07-04 13:00:04 +0200
commit537fa18f762e28f2f475f9e00dedf71914a0c8f6 (patch)
treec10975a55a2def686c10068e9058d9a421b73791
parent6ad13152c49b86de002b519e9c8bb95085d540f1 (diff)
treewide: replaceChars -> replaceStrings
-rw-r--r--krebs/2configs/shack/prometheus/unifi.nix2
-rw-r--r--krebs/3modules/acl.nix2
-rw-r--r--krebs/5pkgs/simple/netcup/default.nix2
-rw-r--r--lib/pure.nix4
-rw-r--r--makefu/3modules/snapraid.nix2
5 files changed, 6 insertions, 6 deletions
diff --git a/krebs/2configs/shack/prometheus/unifi.nix b/krebs/2configs/shack/prometheus/unifi.nix
index 401ecb02..34e47add 100644
--- a/krebs/2configs/shack/prometheus/unifi.nix
+++ b/krebs/2configs/shack/prometheus/unifi.nix
@@ -5,6 +5,6 @@
unifiAddress = "https://unifi.shack:8443/";
unifiInsecure = true;
unifiUsername = "prometheus"; # needed manual login after setup to confirm the password
- unifiPassword = lib.replaceChars ["\n"] [""] (builtins.readFile <secrets/shack/unifi-prometheus-pw>);
+ unifiPassword = lib.replaceStrings ["\n"] [""] (builtins.readFile <secrets/shack/unifi-prometheus-pw>);
};
}
diff --git a/krebs/3modules/acl.nix b/krebs/3modules/acl.nix
index d2370649..05f7e824 100644
--- a/krebs/3modules/acl.nix
+++ b/krebs/3modules/acl.nix
@@ -33,7 +33,7 @@ in {
default = {};
};
config = {
- systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" {
+ systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceStrings ["/"] ["_"] path}" {
wantedBy = [ "multi-user.target" ];
path = [
pkgs.acl
diff --git a/krebs/5pkgs/simple/netcup/default.nix b/krebs/5pkgs/simple/netcup/default.nix
index 408672ef..750e9cfa 100644
--- a/krebs/5pkgs/simple/netcup/default.nix
+++ b/krebs/5pkgs/simple/netcup/default.nix
@@ -3,7 +3,7 @@ with stockholm.lib;
let
readJSON = path: fromJSON (readFile path);
- sed.escape = replaceChars ["/"] ["\\/"]; # close enough
+ sed.escape = replaceStrings ["/"] ["\\/"]; # close enough
PATH = makeBinPath [
coreutils
curl
diff --git a/lib/pure.nix b/lib/pure.nix
index bb2d586f..3329db02 100644
--- a/lib/pure.nix
+++ b/lib/pure.nix
@@ -26,7 +26,7 @@ let
krops = import ../submodules/krops/lib;
shell = import ./shell.nix { inherit (stockholm) lib; };
systemd = {
- encodeName = replaceChars ["/"] ["\\x2f"];
+ encodeName = replaceStrings ["/"] ["\\x2f"];
};
types = nixpkgs-lib.types // import ./types.nix { lib = stockholm.lib; };
uri = import ./uri.nix { inherit (stockholm) lib; };
@@ -79,7 +79,7 @@ let
string = toJSON x; # close enough
}.${type} or reject;
- indent = replaceChars ["\n"] ["\n "];
+ indent = replaceStrings ["\n"] ["\n "];
stripAttr = converge (filterAttrsRecursive (n: v: v != {} && v != null));
diff --git a/makefu/3modules/snapraid.nix b/makefu/3modules/snapraid.nix
index 1a2c0847..25254c14 100644
--- a/makefu/3modules/snapraid.nix
+++ b/makefu/3modules/snapraid.nix
@@ -4,7 +4,7 @@ with import <stockholm/lib>;
let
# returns dirname without / , used as disk name
- dname = dir: replaceChars ["/"] [""] (head (reverseList (splitString "/" dir)));
+ dname = dir: replaceStrings ["/"] [""] (head (reverseList (splitString "/" dir)));
snapraid-conf = ''
# Disks
${concatMapStringsSep "\n" (d: "disk ${dname d} ${d}") cfg.disks}