1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-30 19:24:15 +03:00
digga/overrides
Timothy DeHerrera 95c6ee0368
nix: fix #126
* Update the readme to pull from cachix first, so users don't have to
  build nix.
* Pull `nixFlakes` from override for slightly newer ui, and consistency
  for users who change the nixos flake ref to something newer.
2021-02-17 14:15:43 -07:00
..
default.nix nix: fix #126 2021-02-17 14:15:43 -07:00
README.md doc: new mdbook documentation 2021-02-14 02:46:05 -07:00

Overrides

By default, the NixOS systems are based on the latest release. While it is trivial to change this to nixos-unstable or any other branch of nixpkgs by changing the flake url, sometimes all we want is a single package from another branch.

This is what the overrides are for. By default, they are pulled directly from nixpkgs/master, but you can change the override flake input url to nixos-unstable, or even a specific sha revision.

Example

Packages

The override packages are defined as a regular overlay with an extra arguement pkgs. This refers to the packages built from the override flake.

Pulling the manix package from the override flake:

{
  packages = pkgs: final: prev: {
    inherit (pkgs) manix;
  };
}

Modules

You can also pull modules from override. Simply specify their path relative to the nixpkgs modules directory. The old version will be added to disabledModules and the new version imported into the configuration.

Pulling the zsh module from the override flake:

{
  modules = [ "programs/zsh/zsh.nix" ];
}
Note:

Sometimes a modules name will change from one branch to another. This is what the disabledModules list is for. If the module name changes, the old version will not automatically be disabled, so simply put it's old name in this list to disable it.