mirror of
https://github.com/juspay/services-flake.git
synced 2024-09-19 08:17:11 +03:00
dafaeb048d
* explicitly define project root in treefmt * define `projectRootFile` in `treefmt` * make `treefmt.projectRoot` as `inputs.services-flake` * use github flake url * flake.nix as projectRootFile * add comment * force override-input in test flake --------- Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
53 lines
1.9 KiB
Nix
53 lines
1.9 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
systems.url = "github:nix-systems/default";
|
|
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
|
|
services-flake = { };
|
|
};
|
|
outputs = inputs:
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = import inputs.systems;
|
|
imports = [
|
|
inputs.process-compose-flake.flakeModule
|
|
];
|
|
perSystem = { self', pkgs, system, lib, ... }: {
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
# Required for elastic search
|
|
config.allowUnfree = true;
|
|
};
|
|
process-compose =
|
|
let
|
|
mkPackageFor = mod:
|
|
let
|
|
# Derive name from filename
|
|
name = lib.pipe mod [
|
|
builtins.baseNameOf
|
|
(builtins.match "(.*)_test.nix")
|
|
builtins.head
|
|
];
|
|
in
|
|
lib.nameValuePair name {
|
|
imports = [
|
|
inputs.services-flake.processComposeModules.default
|
|
mod
|
|
];
|
|
};
|
|
in
|
|
builtins.listToAttrs (builtins.map mkPackageFor [
|
|
"${inputs.services-flake}/nix/apache-kafka_test.nix"
|
|
"${inputs.services-flake}/nix/clickhouse/clickhouse_test.nix"
|
|
"${inputs.services-flake}/nix/elasticsearch_test.nix"
|
|
"${inputs.services-flake}/nix/mysql_test.nix"
|
|
"${inputs.services-flake}/nix/nginx_test.nix"
|
|
"${inputs.services-flake}/nix/postgres/postgres_test.nix"
|
|
"${inputs.services-flake}/nix/redis_test.nix"
|
|
"${inputs.services-flake}/nix/redis-cluster_test.nix"
|
|
"${inputs.services-flake}/nix/zookeeper_test.nix"
|
|
]);
|
|
};
|
|
};
|
|
}
|