Skip to content

Instantly share code, notes, and snippets.

@mitchellh
mitchellh / example.nix
Created May 10, 2020 16:29
Nix function for creating a derivation (package) that installs binaries from releases.hashicorp.com
self: super: {
consul-bin = self.callPackage ./hashicorp-generic.nix {
name = "consul";
version = "1.7.3";
sha256 = "0k03n7h5h8miqhh3n3y47894vhwdcp8m611w55f826swmq9angl1";
};
# and so on...
}
@mbbx6spp
mbbx6spp / 00README.adoc
Last active February 8, 2021 01:39
My ${HOME}/.nixpkgs/config.nix to setup my dev and desktop environments the way I like them :)

User env setup

Setup your user environment just the way you want with Nix.

  1. Add packageOverrides to the attrset returned by your ${HOME}/.nixpkgs/config.nix (see my example above).

  2. Then with one command you can setup your whole environment: nix-env -i desktop-mbbx6spp.

Then all you need is a simple ~/.bash_profile script like so: