-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(example/without-flake-parts): init (#372)
A useful addition that demonstrates more ways to use `services-flake`
- Loading branch information
1 parent
fdc39a6
commit 99ba371
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
|
||
- [[share-services]]# | ||
- [[llm]]# | ||
- [[without-flake-parts]]# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Services for flakes without flake-parts | ||
|
||
`process-compose-flake` provides the [`makeProcessCompose`](https://github.com/Platonic-Systems/process-compose-flake/blob/644a8a129f17d23df9e6cf58c9bb1097a0959ab1/nix/lib.nix#L48-L53) function, which accepts custom configurations and returns the [process-compose](https://github.com/F1bonacc1/process-compose) package. | ||
|
||
For usage, refer to <https://github.com/juspay/services-flake/tree/main/example/without-flake-parts>. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
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 = inputs: | ||
let | ||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" ]; | ||
forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems; | ||
in | ||
{ | ||
packages = forAllSystems (system: ( | ||
let | ||
pkgs = inputs.nixpkgs.legacyPackages.${system}; | ||
in | ||
{ | ||
redis = (import inputs.process-compose-flake.lib { inherit pkgs; }).makeProcessCompose { | ||
modules = [ | ||
inputs.services-flake.processComposeModules.default | ||
{ | ||
services.redis."r1".enable = true; | ||
} | ||
]; | ||
}; | ||
} | ||
)); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters