-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (49 loc) · 1.23 KB
/
flake.nix
File metadata and controls
55 lines (49 loc) · 1.23 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "xDoor Development Environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
# Define packages needed for both devShell and build
commonPackages = with pkgs; [
gnumake
pkg-config
xz
squashfsTools
fwup
coreutils-prefixed
sops
];
elixirPackages = with pkgs.beam28Packages; [
elixir
erlang
elixir-ls
];
nixTools = with pkgs; [
alejandra
nixpkgs-fmt
];
in {
devShells.default = pkgs.mkShell {
buildInputs = commonPackages ++ nixTools ++ elixirPackages;
shellHook = ''
export LANG=en_US.UTF-8
export ERL_AFLAGS="-kernel shell_history enabled"
export HEX_HOME="$PWD/.nix-hex"
export MIX_HOME="$PWD/.nix-mix"
export PATH="$MIX_HOME/bin:$HEX_HOME/bin:$PATH"
'';
};
}
);
}