Skip to content

Instantly share code, notes, and snippets.

@garbas
Created November 22, 2016 19:07
Show Gist options
  • Save garbas/14cb6c2edb254f6b02d84577d4d0740f to your computer and use it in GitHub Desktop.
Save garbas/14cb6c2edb254f6b02d84577d4d0740f to your computer and use it in GitHub Desktop.
Profit with Nix!
{ allowUnfree = true; # allow packages like skype to be installed
allowBroken = true; # you probably want this since on osx since quite
# some packages are marked as not tested (aka broken)
# on darwin platform. packages that are marked as
# broken/untested will be build from source (no binary
# exists for them)
allowUnfreeRedistributable = true;
# some packages require this option to be set
# explicitly. this is sometimes a way to "confirm" that
# you agree with terms and conditions of upstream
# redistribution. since nix handles everything via
# config files also agreement is handled via
# configuration files.
# here you specify a dictionary of packages that you want to override
# original nixpkgs. as you can see packageOverrides expects to be a function
# with one argument, which is a set you are extending from.
# this is also a way how to add new packaes like is a case in example bellow.
# we are create a new package which serves as a meta package which pulls in
# other packages.
# that way you only keep installing (which also means upgrading) one package
# and that pulls in other packages.
# % nix-env -iA nixpkgs.all <- on non-NixOS systems
# % nix-env -iA nixos.all <- on NixOS systems
# next time when you want to have additional package you add it to the list
# bellow. and rerun the above command.
packageOverrides = pkgs: {
all = pkgs.buildEnv {
name = "all";
paths = with pkgs; [
firefox-beta-bin
git
neovim
];
};
};
# also dont forget to put this file under VCS control :) and profit!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment