Util: Rename catContent to readFiles.
This commit is contained in:
parent
b05a3504a4
commit
487d56501d
|
@ -15,7 +15,7 @@ let
|
|||
tgdata = secret.tg.dt "false";
|
||||
tgdatasilent = secret.tg.dt "true";
|
||||
|
||||
modulesRaw = pkgs.writeText "bash-user-modules-raw" (util.catContent (util.ls ./module));
|
||||
modulesRaw = pkgs.writeText "bash-user-modules-raw" (util.readFiles (util.ls ./module));
|
||||
modulesFile = pkgs.replaceVars modulesRaw {
|
||||
inherit
|
||||
accent
|
||||
|
|
|
@ -15,19 +15,22 @@
|
|||
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
||||
|
||||
# Concat all files by `text` key.
|
||||
# TODO: REMOVE
|
||||
catText = files: args: builtins.foldl' (acc: mod: acc + (import mod args).text) "" files;
|
||||
|
||||
# Concat all file paths by `file` key.
|
||||
# TODO: REMOVE
|
||||
catFile =
|
||||
files: args:
|
||||
builtins.foldl' (acc: mod: acc + (builtins.readFile (import mod args).file) + "\n") "" files;
|
||||
|
||||
# Concat all files as a set.
|
||||
# TODO: REMOVE
|
||||
catSet =
|
||||
files: args: builtins.foldl' (acc: mod: acc // mod) { } (map (file: import file args) files);
|
||||
|
||||
# Concat all file contents.
|
||||
catContent = files: builtins.foldl' (acc: mod: acc + (builtins.readFile mod) + "\n") "" files;
|
||||
readFiles = files: builtins.foldl' (acc: mod: acc + (builtins.readFile mod) + "\n") "" files;
|
||||
|
||||
# Systemd service that does not restart with system switch.
|
||||
mkStaticSystemdService =
|
||||
|
|
|
@ -10,7 +10,7 @@ let
|
|||
notificationogg = <static/Notification.ogg>;
|
||||
shortogg = <static/Short.ogg>;
|
||||
|
||||
raw = pkgs.writeText "swayscript-raw" (util.catContent (util.ls ./script));
|
||||
raw = pkgs.writeText "swayscript-raw" (util.readFiles (util.ls ./script));
|
||||
script = pkgs.replaceVars raw {
|
||||
inherit
|
||||
pipewire
|
||||
|
|
Loading…
Reference in a new issue