From 47f16b7b81f67a5932f98633132dfd88f3bbc269 Mon Sep 17 00:00:00 2001 From: shivaraj-bh Date: Sun, 13 Oct 2024 23:51:15 +0530 Subject: [PATCH] nixify-haskell: Part 4 --- en/nixify-haskell.md | 1 + en/nixify-services-flake.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 en/nixify-services-flake.md diff --git a/en/nixify-haskell.md b/en/nixify-haskell.md index 1aac19a7..332a75e9 100644 --- a/en/nixify-haskell.md +++ b/en/nixify-haskell.md @@ -6,6 +6,7 @@ This is a #[[tutorial|tutorial]] series on nixifying #[[haskell]] projects. In p 1. [x] [[nixify-haskell-nixpkgs]]# 2. [ ] [[nixify-haskell-parts]]# 3. [ ] [[nixify-haskell-flake]]# +4. [ ] [[nixify-services-flake]]# [^other]: There are also other approaches (like [haskell.nix](https://github.com/input-output-hk/haskell.nix), [stacklock2nix](https://github.com/cdepillabout/stacklock2nix)). diff --git a/en/nixify-services-flake.md b/en/nixify-services-flake.md new file mode 100644 index 00000000..ba7f8206 --- /dev/null +++ b/en/nixify-services-flake.md @@ -0,0 +1,16 @@ +--- +short-title: 4. Using services-flake +--- + +# Integrating external services using services-flake + +>[!warning] TODO: Write this! +> For now, see the code: https://github.com/juspay/todo-app/pull/22 + +Things to highlight: + +- `services-flake` provides pre-defined configurations for many services, reducing a bunch of lines to just `services...enable = true;` +- Data directory for all services in `services-flake` is local to the project working directory, by default +- Best practices: + - Use Unix sockets for local development and CI to avoid binding to ports (which is global to the interface) + - Write integration tests using the reserved `test` process in `process-compose-flake`.