2022-05-09 13:20:43 +02:00
|
|
|
dirname: inputs: let
|
|
|
|
|
2023-06-16 02:14:51 +02:00
|
|
|
inherit (inputs.config.rename) setup installer;
|
2022-05-09 13:20:43 +02:00
|
|
|
|
2023-06-16 02:14:51 +02:00
|
|
|
doRenames = if setup == "setup" && installer == "installer" then (x: x) else (builtins.mapAttrs (name: path: (
|
2022-05-09 13:20:43 +02:00
|
|
|
builtins.toFile name (builtins.replaceStrings
|
2023-06-16 02:14:51 +02:00
|
|
|
[ "@{config.setup." "@{#config.setup." "@{!config.setup." "@{config.installer." "@{#config.installer." "@{!config.installer." ]
|
|
|
|
[ "@{config.${setup}." "@{#config.${setup}." "@{!config.${setup}." "@{config.${installer}." "@{#config.${installer}." "@{!config.${installer}." ]
|
2022-05-09 13:20:43 +02:00
|
|
|
(builtins.readFile path)
|
|
|
|
)
|
|
|
|
)));
|
|
|
|
|
2023-06-16 02:14:51 +02:00
|
|
|
in doRenames (inputs.functions.lib.getFilesExt "sh(.md)?" dirname)
|