diff --git a/lib.nix b/lib.nix index b234920..8e80817 100644 --- a/lib.nix +++ b/lib.nix @@ -50,10 +50,12 @@ in in pkgs.writeShellApplication { inherit name; - text = checks ++ '' - PC_CONFIG_FILES=${configFile} ${pkgs.process-compose}/bin/process-compose "$@" + text = + checks + + '' + PC_CONFIG_FILES=${configFile} ${pkgs.process-compose}/bin/process-compose "$@" - ''; + ''; }; mkPostgres = { @@ -87,17 +89,17 @@ in else if false == value then "no" else if lib.isString value then - "'${lib.replaceStrings [ "'" ] [ "''" value ]}'" + "'${lib.replaceStrings [ "'" ] [ "''" ] value}'" else builtins.toString value; configFile = pkgs.writeTextDir "postgresql.conf" ( - lib.concatStringSep "\n" ( - lib.mapAttrsToList (n: v: "${n} = ${toStr v}") (lib.filterAttrs ( - lib.const (x: x != null) - )) merged_config + lib.concatStringsSep "\n" ( + lib.mapAttrsToList (n: v: "${n} = ${toStr v}") ( + lib.filterAttrs (lib.const (x: x != null)) merged_config + ) ) ); - configFileCheck = pkgs.writeShellScript { + configFileCheck = pkgs.writeShellApplication { name = "check"; text = '' ${package}/bin/postgres -D${configFile} -C config_file