portal/flake.nix
Mikael Hugo 35f29f42e3 feat: add flake.nix, .envrc, fix config (runtime.exs), deps compile clean
- flake.nix: Elixir 1.18.4 / OTP 27 / Node 22 dev shell
- .envrc: use flake
- config/config.exs: move fetch_env! to runtime.exs (compile-time safe)
- config/runtime.exs: all secrets loaded at runtime via env vars
- mix.lock: generated after mix deps.get
- All 3 apps compile cleanly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 19:55:48 +02:00

31 lines
900 B
Nix

{
description = "CentralCloud unified portal (Elixir/Phoenix umbrella)";
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 = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
elixir
erlang
nodejs_22 # for Phoenix asset pipeline
inotify-tools # LiveReload on Linux
];
shellHook = ''
export MIX_HOME=$HOME/.mix
export HEX_HOME=$HOME/.hex
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
echo "Elixir $(elixir --version | head -1)"
echo "Mix $(mix --version)"
'';
};
});
}