1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-22 18:58:21 +03:00

move overrides.nix to overlays

also update overrides docs
it is a pure devos overlay now, it makes sense to go in overlays
This commit is contained in:
Pacman99 2021-04-27 09:38:20 -07:00
parent e67b49c280
commit d5276195f7
3 changed files with 8 additions and 12 deletions

View File

@ -2,30 +2,27 @@
Each NixOS host follows one channel. But many times it is useful to get packages
or modules from different channels.
This is what the overrides are for. You can make use of the `overrides.nix` to
override specific packages to be pulled from other channels. Any overlay may get
`channels` as their first argument.
## Packages
You can make use of `overlays/overrides.nix` to override specific packages in the
default channel to be pulled from other channels. That file is simply an example
of how any overlay can get `channels` as their first argument.
## Example
You can add overlays to any channel to override packages from other channels.
### Packages
The override packages are defined as a regular overlay with an extra arguement
`channels`. This refers to all channels defined in `flake.nix`.
Pulling the manix package from the latest flake:
Pulling the manix package from the `latest` channel:
```nix
channels: final: prev: {
inherit (pkgs.latest) manix;
}
```
### Modules
## Modules
You can also pull modules from other channels. All modules have access to the
`modulesPath` for each channel as `<channelName>ModulesPath`. And you can use
`disabledModules` to remove modules from the current channel.
Pulling the zsh module from the latest flake:
Pulling the zsh module from the `latest` channel:
```nix
{ latestModulesPath }: {
modules = [ "${latestModulesPath}/programs/zsh/zsh.nix" ];

View File

@ -45,7 +45,6 @@
(devos.lib.pathsIn ./overlays)
./pkgs/default.nix
pkgs.overlay # for `srcs`
./overrides.nix # from "latest" channel
nur.overlay
];
};