d51cd34fb7
Subflakes should provide their wares as outputs, so wire up the pkgs flake to reflect that. Due to the unstable nature of flakes, updating the root flake doesn't currently update the subflake lock file. Therefore, add additional logic to flk update script in order to do this behind the scenes. Nix is now pulled in from the "nix" registry flake in order for users to take advantage of improvements to the UI since its last update in nixpkgs. |
||
---|---|---|
.. | ||
default.nix | ||
README.md |
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.