mirror of
https://github.com/divnix/digga.git
synced 2024-11-23 03:05:59 +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:
parent
e67b49c280
commit
d5276195f7
@ -2,30 +2,27 @@
|
|||||||
Each NixOS host follows one channel. But many times it is useful to get packages
|
Each NixOS host follows one channel. But many times it is useful to get packages
|
||||||
or modules from different channels.
|
or modules from different channels.
|
||||||
|
|
||||||
This is what the overrides are for. You can make use of the `overrides.nix` to
|
## Packages
|
||||||
override specific packages to be pulled from other channels. Any overlay may get
|
You can make use of `overlays/overrides.nix` to override specific packages in the
|
||||||
`channels` as their first argument.
|
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
|
Pulling the manix package from the `latest` channel:
|
||||||
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:
|
|
||||||
```nix
|
```nix
|
||||||
channels: final: prev: {
|
channels: final: prev: {
|
||||||
inherit (pkgs.latest) manix;
|
inherit (pkgs.latest) manix;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Modules
|
## Modules
|
||||||
|
|
||||||
You can also pull modules from other channels. All modules have access to the
|
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
|
`modulesPath` for each channel as `<channelName>ModulesPath`. And you can use
|
||||||
`disabledModules` to remove modules from the current channel.
|
`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
|
```nix
|
||||||
{ latestModulesPath }: {
|
{ latestModulesPath }: {
|
||||||
modules = [ "${latestModulesPath}/programs/zsh/zsh.nix" ];
|
modules = [ "${latestModulesPath}/programs/zsh/zsh.nix" ];
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
(devos.lib.pathsIn ./overlays)
|
(devos.lib.pathsIn ./overlays)
|
||||||
./pkgs/default.nix
|
./pkgs/default.nix
|
||||||
pkgs.overlay # for `srcs`
|
pkgs.overlay # for `srcs`
|
||||||
./overrides.nix # from "latest" channel
|
|
||||||
nur.overlay
|
nur.overlay
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user