• Stars
    star
    139
  • Rank 254,026 (Top 6 %)
  • Language
    Nix
  • License
    MIT License
  • Created 11 months ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NixOS-like services for Nix flakes

project chat

services-flake

services-flake provides declarative, composable, and reproducible services for Nix development environment, as a process-compose-flake module (based on flake-parts). Enabling users to have NixOS-like service on MacOS and Linux.

Demo

Motivation

With services-flake, we aim to solve the following problems:

  • Run external services like databases, Redis, etc. natively across platforms.
  • Enable users to configure multiple instances of these external services.
  • Provide project-specific service configuration and data isolation.

Consider a scenario where we are juggling two projects, located at ~/code/foo and ~/code/bar. The foo project integrates postgres and nginx, while bar encompasses postgres, pgAdmin, and kafka. It's crucial that the postgres data remains segregated across these projects. Additionally, the bar project is designed to facilitate multiple instances of postgres. Both projects are equipped with a flake app, streamlining the launch of their respective service stacks. Consequently, anyone using a Linux or macOS system can effortlessly clone either project and execute nix run .#services to activate the full suite of services without the need for manual configuration.

Getting Started

See https://community.flake.parts/services-flake/start

Services available

List of supported services is available at https://community.flake.parts/services-flake/services

Comparison with other tools

services-flake devenv services
macOS support ✔️ ✔️
Pure Flakes ✔️ ✖️1
Services as flake apps ✔️ ✖️2
Multiple instances of a service ✔️ ✖️3
Share services ✔️ ✖️4
No coupling ✔️ ✖️5

Want to compare with other tools? Let us know.

Service data directory

See https://community.flake.parts/services-flake/guide/datadir

Discussions

To discuss the project, please join our Zulip.

Contributing & Development

See https://community.flake.parts/services-flake/contributing

Credits

Thanks to the devenv project on which much of our services implementation is based on.

Footnotes

  1. Devenv's flakes integration requires you use run the nix shell in impure mode by passing --impure.

  2. services-flake produces a flake app that you can run using the Nix command (nix run) outside of the devShell, whereas with devenv you must use devenv's CLI, devenv up, inside of devShell. See here.

  3. services-flake allows you to configure multiple instances of the same service, whereas devenv does not.

  4. services-flake is built on top of flake-parts, thus you may share your service and process modules for re-use across flakes (see example), whilst making them general enough for customization based on the module system. With devenv, as far as we can ascertain, you can only share whole devenv configuration as modules. See here.

  5. service-flake exposes process-compose-flake modules for each service, which can be reused as long as your project is using flake-parts. With devenv, decoupling is not possible (nor prioritized in future) unless you buy into the whole devenv ecosystem.

More Repositories

1

hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
Rust
10,394
star
2

purescript-presto

Write Apps like Mathematical Equations!
PureScript
192
star
3

euler-hs

EulerHS: full-fledged framework for creating web backends
Haskell
87
star
4

nix-browser

🚧 A graphical interface to working with Nix & Flakes; and various related crates
Rust
49
star
5

presto-ui

Framework to build native apps using javascript.
JavaScript
45
star
6

jrec

Literally the best anonymous records
Haskell
35
star
7

purescript-presto-backend

Flow Monad for your Backend
PureScript
32
star
8

atlas

Implementation of Open Mobility Platform on Beckn
Haskell
26
star
9

medea

A JSON schema language
Haskell
25
star
10

hyperswitch-card-vault

Hyperswitch Card Vault is an open-source sensitive information storage system built on Rust.
Rust
25
star
11

hyperswitch-web

ReScript
25
star
12

hyperswitch-control-center

Open sourced control center for managing Hyperswitch - an open sourced payment switch.
ReScript
24
star
13

card-validator

Card validation helpers for payment forms.
JavaScript
23
star
14

nix-dev-home

A `home-manager` template providing useful tools & settings for Nix-based development (macOS & Linux supported)
Nix
23
star
15

jenkins-nix-ci

A NixOS module for Jenkins, optimized specifically for running projects using Nix.
Nix
23
star
16

cachix-push

A flake app that can push packages and devshells to cachix
Nix
19
star
17

flakular.in

MOVED TO https://github.com/nixos-asia/website and https://github.com/flake-parts/community.flake.parts
MDX
19
star
18

purescript-sequelize

Purescript wrapper for Sequelize - http://docs.sequelizejs.com/
PureScript
15
star
19

purescript-flow

Generic typesafe UI and API flows for mobile and web apps
PureScript
15
star
20

remote-development

NixOS configuration for shared remote development via SSH
Nix
14
star
21

dui-android

DUI is a framework to build native android apps using javascript
Java
14
star
22

mystique

Javascript framework for building platform independent apps
JavaScript
11
star
23

medea-ps

A JSON schema validator
PureScript
11
star
24

fencer

Fencer is a port of https://github.com/lyft/ratelimit into Haskell.
Haskell
9
star
25

hoogleverse

Host Hoogle via Nix / NixOS, with handpicked list of packages
Nix
8
star
26

hyperswitch-docs

7
star
27

superposition

Superposition is a context-based configuration management system designed to facilitate safe and flexible rollout of config changes
Rust
6
star
28

todo-app

WIP: A demo Haskell app showing the use of `flake-parts` to enable various dev workflows
Haskell
5
star
29

atlas-gateway

Beckn Gateway Implementation
Haskell
5
star
30

upi-sdk

Java
5
star
31

hyper-sdk-react

React Native Plugin over Hyper SDK
TypeScript
5
star
32

purescript-logoot-core

A library for creating a collaborative real-time editor using commutative replicated data types
PureScript
5
star
33

purescript-redis

PureScript
5
star
34

hyper-pay-sample-integration

Java
4
star
35

zipkin-instrumentation-mysql

JavaScript
4
star
36

ec-python-client-server-demo

Express Checkout Python Website - ReactJS Client code, Flask REST APIs
JavaScript
3
star
37

ec-android-demo

express-checkout-android-demo
Java
3
star
38

atlas-shared-kernel

Core Modules for Beckn Protocol
Haskell
3
star
39

juspay-sdk-integration-demo

Integration examples for Juspay SDKs
Java
3
star
40

hyperswitch-helm

Smarty
3
star
41

streamly-extras-monitoring

Helper functions for logging and metrics of streams
Haskell
3
star
42

godel-integ-examples

Integration Examples for integrating godel library in your Android project
Java
3
star
43

JuspaySafeBrowser

Objective-C
3
star
44

hyperswitch-sdk-android

Kotlin
3
star
45

expresscheckout-ios-release

ExpressCheckout
Ruby
2
star
46

purescript-backtrack

A monad transformer for handling backtrack in continuation based programs
PureScript
2
star
47

hyperswitch-sdk-ios

Swift
2
star
48

hyperswitch-client-core

ReScript
2
star
49

purescript-bq

Purescript bindings for nodejs-bigquery library
PureScript
2
star
50

MVisa

Ruby
2
star
51

streamly-extras

Haskell
2
star
52

Godel-Integration-Document

Integration document for Juspay's Godel library
2
star
53

purescript-node-websocket

Bindings to node/npm's "websocket" library
PureScript
2
star
54

nix-training

Nix
2
star
55

hyperswitch-woocommerce-plugin

PHP
2
star
56

fast-time

A custom parser of date-time implemented in Haskell
Haskell
2
star
57

hyper-sdk-flutter

Flutter Plugin over Hyper SDK
Dart
2
star
58

hyperswitch-pods

CocoaPods hosting for Hyperswitch iOS SDK
Ruby
2
star
59

direnv-rs

Rust bindings for direnv
Rust
2
star
60

payments-sdk-android-sample-integration

Sample Android Integration Example for Juspay's Payment's SDK
Java
2
star
61

hyper-webview-flutter

Flutter Library to enhance Juspay's Hyper Checkout Experience for Payment Links opened in WebView
Kotlin
2
star
62

ec-headless-cordova-pulgin

Express Checkout Cordova Integration / Headless Plugin
Java
1
star
63

mocky

Haskell
1
star
64

ec-react-native-library

React Native wrapper for Juspay Express Checkout SDK
Java
1
star
65

purescript-reflex-dom

Reflex.DOM style UI building library on top of halogen-vdom and PrestoUI
PureScript
1
star
66

just-flake

Convenient way to use `just` in your Nix devShells
Nix
1
star
67

rust-flake

WIP: Like the famous `haskell-flake`, but for Rust.
Nix
1
star
68

purescript-data-access

Database abstractions.
PureScript
1
star
69

purescript-prom-client

PureScript
1
star
70

purescript-parser

Code for learning parsers
PureScript
1
star
71

haskell-sequelize

A port of https://github.com/juspay/purescript-sequelize into Haskell
Haskell
1
star
72

hyperpay-swiftui-demo

Swift
1
star
73

canon

Haskell
1
star
74

ec-node-client

Node.js Client for ExpressCheckout
JavaScript
1
star
75

nix-rs

Rust
1
star
76

hyperswitch-cdk

TypeScript
1
star
77

expresscheckout-php-sdk

PHP
1
star
78

purescript-tracker

PureScript
1
star
79

hyperswitch-suite

An open source payments switch to make payments fast, reliable and affordable
1
star