Is there a way to override attributes of a package coming from a flake ?
I’m configuring my system using flake.nix
and I want to override a package that comes from a flake, but I cannot figure out how.
flake.nix:
{
inputs = {
# nixpkgs
nixpkgs.url = github:NixOS/nixpkgs;
# hyprland
hyprland = {
url = github:hyprwm/Hyprland;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, hyprland }: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
# ...
specialArgs = { flake-self = self; };
modules = [
hyprland.nixosModules.default
./configuration.nix
# ...
];
};
}
configuration.nix:
{ config, pkgs, flake-self, ... }:
{
# ...
programs.hyprland = {
enable = true;
package = # flake-self.inputs.hyperland ???
};
# ...
}
I want to override the package to add the { nvidiaPatches = true; }
attribute. How can I achieve this ?