-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make overlays working #48
Comments
Hey! There's no secret sauce to it, actually! Just plain ol' overlays in a separate file, which you can export to other people and/or use on your own config. The included overlays are just examples, really. But, to actually use Second, using {pkgs, libs, inputs, outputs, ...}:
{
nixpkgs.overlays = [
outputs.overlays.unstable-packages
(final: prev: {
nginxStable = prev.nginxStable.override { openssl = final.pkgs.libressl; };
})
(final: prev: {
wordpressPackages = final.unstable.callPackage inputs.wp4nix { };
})
];
} Notice that overlays is an list, the order matters. Overlays are basically applied one after the other. Also, It's not the easiest concept to grasp, but the first argument (in this example, You usually always use |
This is what I'm doing to apply my own Neovim flake to my overlays in nixpkgs-unstable. I'm new to Nix so I'm sticking with stable and had problems adding the flake to it, since it follows unstable. Can this be considered a good practice?
# This file defines overlays
{inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs {pkgs = final;};
# This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays
modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec {
# ...
# });
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
overlays = [
inputs.neovim-flake.overlays.default
];
};
};
} |
Hi, thank you for your well made config 😁
But it's taking me time to comprehend how your config works 😅
Currently i'm struggling with the overlays (i'm not really familiar with them)
My overlays look like:
and some of my uses are:
and:
and in all the cases overlays don't seem to work
so the syncthing is using 23.05, and wp4nix is not overlayed
there's probably something else i need to show here, but i'm not sure how the logic of your config works 😥
The text was updated successfully, but these errors were encountered: