-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathflake.nix
More file actions
36 lines (35 loc) · 1.16 KB
/
flake.nix
File metadata and controls
36 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
description = "A demo of services-flake usage without flake-parts";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
services-flake.url = "github:juspay/services-flake";
};
outputs = { nixpkgs, process-compose-flake, services-flake, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f rec {
pkgs = import nixpkgs { inherit system; };
servicesMod = (import process-compose-flake.lib { inherit pkgs; }).evalModules {
modules = [
services-flake.processComposeModules.default
{
services.redis."r1".enable = true;
}
];
};
});
in
{
packages = forAllSystems ({ servicesMod, ... }: {
default = servicesMod.config.outputs.package;
});
devShells = forAllSystems ({ pkgs, servicesMod }: {
default = pkgs.mkShell {
inputsFrom = [
servicesMod.config.services.outputs.devShell
];
};
});
};
}