Skip to content

Commit

Permalink
Merge branch 'main' into test-mysql-cassandra
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Dec 10, 2024
2 parents dc2a34b + 9bb91e5 commit eb5318a
Show file tree
Hide file tree
Showing 49 changed files with 547 additions and 375 deletions.
1 change: 0 additions & 1 deletion .github/CODE_OF_CONDUCT.md

This file was deleted.

7 changes: 7 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This document, adapted from [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct/), provides community guidelines for a safe, respectful, productive, and collaborative place for any person who is willing to contribute to the associated project. It applies to all “collaborative space”, which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.).

- Participants will be tolerant of opposing views.
- Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
- When interpreting the words and actions of others, participants should always assume good intentions.
- Behaviour which can be reasonably considered harassment will not be tolerated.

11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ jobs:
strategy:
matrix:
# Intel mac excluded; See https://github.com/juspay/services-flake/issues/231
system: [ x86_64-linux, aarch64-darwin ]
system: [x86_64-linux, aarch64-darwin]
steps:
- uses: actions/checkout@v4
- uses: cachix/cachix-action@v14
with:
name: services-flake
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
skipPush: true
- name: om ci
run: om ci --extra-access-tokens "github.com=${{ secrets.GITHUB_TOKEN }}" run --systems "${{ matrix.system }}"
# Push the Nix cache
- name: Push to cachix
if: github.ref == 'refs/heads/main'
run: nix --option system "${{ matrix.system }}" run ./dev#cachix-push
62 changes: 0 additions & 62 deletions ETHIC

This file was deleted.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# services-flake

`services-flake` provides declarative, composable and reproducible services for Nix development environment, as a [process-compose-flake](https://github.com/Platonic-Systems/process-compose-flake) module (based on [flake-parts](https://flake.parts)). It enables users to have NixOS-like services on MacOS and Linux.
`services-flake` provides declarative, composable and reproducible services for Nix development environment, as a [process-compose-flake](https://github.com/Platonic-Systems/process-compose-flake) module (based on [flake-parts](https://flake.parts)). It enables users to have NixOS-like services on macOS and Linux.

![Demo](./doc/demo.gif)

Expand Down Expand Up @@ -58,3 +58,10 @@ See <https://community.flake.parts/services-flake/contributing>
## Credits

Thanks to [the devenv project](https://github.com/cachix/devenv/tree/main/src/modules/services), which originally inspired this project to provide the same for Nix flake users.

### Thanks to all the contributors!

<a href="https://github.com/juspay/services-flake/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=juspay/services-flake" alt="Contributors"/>
</a>

157 changes: 26 additions & 131 deletions dev/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 11 additions & 18 deletions dev/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
treefmt-nix.url = "github:numtide/treefmt-nix";
pre-commit-hooks-nix = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks-nix.flake = false;
cachix-push.url = "github:juspay/cachix-push";

# CI will override `services-flake` to run checks on the latest source
services-flake.url = "github:juspay/services-flake";
};
Expand All @@ -17,19 +15,15 @@
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.flake-root.flakeModule
inputs.treefmt-nix.flakeModule
inputs.pre-commit-hooks-nix.flakeModule
(inputs.pre-commit-hooks-nix + /flake-module.nix)
inputs.cachix-push.flakeModule
./nix/pre-commit.nix
];
perSystem = { pkgs, lib, config, ... }: {
treefmt = {
projectRoot = inputs.services-flake;
projectRootFile = "flake.nix";
# Even though pre-commit-hooks.nix checks it, let's have treefmt-nix
# check as well until #238 is fully resolved.
# flakeCheck = false; # pre-commit-hooks.nix checks this
programs = {
nixpkgs-fmt.enable = true;
perSystem = { self', pkgs, config, ... }: {
cachix-push = {
cacheName = "services-flake";
pathsToCache = {
devshell = self'.devShells.default;
};
};
devShells.default = pkgs.mkShell {
Expand All @@ -39,7 +33,6 @@
config.pre-commit.settings.tools.commitizen
];
inputsFrom = [
config.treefmt.build.devShell
config.pre-commit.devShell
];
shellHook = ''
Expand Down
2 changes: 1 addition & 1 deletion dev/nix/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
check.enable = true;
settings = {
hooks = {
treefmt.enable = true;
nixpkgs-fmt.enable = true;
commitizen.enable = true;
};
};
Expand Down
2 changes: 2 additions & 0 deletions doc/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

- [[share-services]]#
- [[llm]]#
- [[without-flake-parts]]#

Loading

0 comments on commit eb5318a

Please sign in to comment.