{ pkgs ? (import <nixpkgs> {}), ... }:
with pkgs;
let
otp = beam.packages.erlangR25;
basePackages = [
otp.elixir_1_13
];
# Hot reloading stuff
inputs = basePackages ++ lib.optionals stdenv.isLinux [ inotify-tools ]
++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]);
in pkgs.mkShell {
buildInputs = inputs;
# keep your shell history in iex
ERL_AFLAGS = "-kernel shell_history enabled";
shellHook = ''
# this isolates mix to work only in local directory
mkdir -p .nix-mix .nix-hex
export MIX_HOME=$PWD/.nix-mix
export HEX_HOME=$PWD/.nix-hex
# make hex from Nixpkgs available
# `mix local.hex` will install hex into MIX_HOME and should take precedence
export MIX_PATH="${otp.hex}/lib/erlang/lib/hex/ebin"
export PATH=$MIX_HOME/bin:$HEX_HOME/bin:$PATH
'';
}
Just add guix as a package manager and it will install the binaries as a “foreign” system.
If you want to install guix as a full-blown OS, then you can add the nonguix repositories and get non-free stuff working. No one advertises it, but it works. Also, some packages I’ve installed via flatpak (like firefox).
I started off with nix myself, but everytime I had to update, I had this complete dread that I would destroy the system. No such feeling with guix.
While I like Scheme, I personally find Guix derivations harder to read than Nix. Also almost hostility towards non-free packages (in FSF sense) and host systems make Guix no-go zone for me.
For me FSF approach towards the software is on the “absurd” side of the spectrum, just like Oracle or Nintendo is on the exact opposite of spectrum in the “absurd” region.
Idea is glorious, but execution - not much. I am happy user of Nix on Darwin and while I always wanted to try Guix, their community and approach to people with other requirements/goals is something that keeps me out of it. Fortunately Nix is learning their lesson and they are fixing CLI into more useable and manageable form.
Yeah I looked quickly into Guix but i stopped at “flatpak”. First it defeats the purpose of having a reproducible OS configuration, and secondly in particular flatpak has not been nice with me Though it is interesting.
I suck at sysadmin, but my needs are quite simple.
How interesting. I don’t know if I’ve run into those members of the community. Obviously, the stance is that of the FSF, which is inherently impractical, however, it does serve a function as a signpost. Other than Stallman, those I have interacted with are fairly practical. I haven’t had to use nonguix yet, but apparently it is really good on the gaming side.
I use it for firefox because guix has icecat of a dubious version. It does have chromium though. I believe that you can also pull from nix packages, but I haven’t done it myself.
I really wanted to like Nix, but I struggled for an untold number of hours. I do think guix is much easier, but perhaps that’s because I just use a browser and emacs…