From fa2c7dc7961e2933d9194ec63851ca227e31a9a1 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 24 Oct 2024 18:35:19 -0400 Subject: [PATCH] refactor(nix): Split omnix configuration --- flake.nix | 34 +--------------------------------- nix/omnix.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 33 deletions(-) create mode 100644 nix/omnix.nix diff --git a/flake.nix b/flake.nix index dec639fb..6705e455 100644 --- a/flake.nix +++ b/flake.nix @@ -10,38 +10,6 @@ lib = import ./nix/lib.nix; - # CI configuration; to run locally, `nix --accept-flake-config github:juspay/omnix ci` - om.ci.default = let overrideInputs = { "services-flake" = ./.; }; in { - simple-example = { - inherit overrideInputs; - dir = "./example/simple"; - }; - llm-example = { - inherit overrideInputs; - dir = "./example/llm"; - }; - share-services-example = { - overrideInputs = { - inherit (overrideInputs) services-flake; - northwind = ./example/share-services/northwind; - }; - dir = "./example/share-services/pgweb"; - }; - without-flake-parts-example = { - inherit overrideInputs; - dir = "./example/without-flake-parts"; - }; - test = { - inherit overrideInputs; - dir = "./test"; - }; - dev = { - inherit overrideInputs; - dir = "./dev"; - }; - doc = { - dir = "./doc"; - }; - }; + om = import ./nix/omnix.nix; }; } diff --git a/nix/omnix.nix b/nix/omnix.nix new file mode 100644 index 00000000..3f971a1e --- /dev/null +++ b/nix/omnix.nix @@ -0,0 +1,38 @@ +let + root = ../.; +in +{ + # CI configuration; to run locally, `nix --accept-flake-config github:juspay/omnix ci` + ci.default = let overrideInputs = { "services-flake" = root; }; in { + simple-example = { + inherit overrideInputs; + dir = "./example/simple"; + }; + llm-example = { + inherit overrideInputs; + dir = "./example/llm"; + }; + share-services-example = { + overrideInputs = { + inherit (overrideInputs) services-flake; + northwind = (root + /example/share-services/northwind); + }; + dir = "./example/share-services/pgweb"; + }; + without-flake-parts-example = { + inherit overrideInputs; + dir = "./example/without-flake-parts"; + }; + test = { + inherit overrideInputs; + dir = "./test"; + }; + dev = { + inherit overrideInputs; + dir = "./dev"; + }; + doc = { + dir = "./doc"; + }; + }; +}