Skip to content

Commit

Permalink
Migrate to flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
vereis committed Nov 15, 2023
1 parent 0d830e1 commit fa3055b
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ cover/
apps/**/cover/
priv/plts/
doc/
.direnv/
61 changes: 61 additions & 0 deletions flake.lock

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

32 changes: 32 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };

# `sha256` can be programmatically obtained via running the following:
# `nix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz`
elixir_1_15_7 = (pkgs.beam.packagesWith pkgs.erlangR26).elixir_1_15.override {
version = "1.15.7";
sha256 = "0yfp16fm8v0796f1rf1m2r0m2nmgj3qr7478483yp1x5rk4xjrz8";
};
in
with pkgs; {
devShells.default = mkShell {
buildInputs = [ elixir_1_15_7 inotify-tools docker-compose ];
env = {
POSTGRES_PORT="5432";
POSTGRES_USER = "postgres";
POSTGRES_PASSWORD = "postgres";
POSTGRES_DB = "endo_repo";
};
};
}
);
}
22 changes: 0 additions & 22 deletions shell.nix

This file was deleted.

0 comments on commit fa3055b

Please sign in to comment.