Hello,
I’m trying to call a why-depends
on a package in my flake config, but this package is part of my unstablePkgs
input and not the standard pkgs
one. I might be using the wrong terms, sorry, I’m quite new to this and please do correct me.
Here is my flake for reference:
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-flatpak.url = "github:gmodena/nix-flatpak";
impermanence.url = "github:nix-community/impermanence/master";
};
outputs = { self, nixpkgs, unstable, home-manager, nixos-hardware, agenix, nix-flatpak, impermanence }:
let
system = "x86_64-linux";
allowUnfree = { nixpkgs.config.allowUnfree = true; };
in {
nixosConfigurations.champignon = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
unstablePkgs = unstable.legacyPackages.${system};
};
modules = [
nixos-hardware.nixosModules.lenovo-thinkpad-t480
impermanence.nixosModules.impermanence
allowUnfree
./hosts/champignon/nixos/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.martin = import ./hosts/champignon/home/home.nix;
extraSpecialArgs = {
unstablePkgs = import unstable { config.allowUnfree = true; inherit system; };
agenix = agenix;
agenixPkgs = agenix.packages.${system};
nix-flatpak = nix-flatpak;
};
};
}
];
};
};
}
Now, if I do a nix why-depends .#nixosConfigurations.champignon.config.system.build.toplevel .#nixosConfigurations.champignon.pkgs.tilix
, tilix being a package from the nixpkgs input, I do find it. But if I do a nix why-depends .#nixosConfigurations.champignon.config.system.build.toplevel .#nixosConfigurations.champignon.pkgs.logseq
, logseq being a package from the unstable input, I don’t find it. Now, I guess that it’s because pkgs.logseq
is actually the logseq package from the current channel and not the unstable one. How could I specify that I want the unstable one ?
Subsequent question, I found this path .#nixosConfigurations.champignon.pkgs.logseq
but is there actually a way to explore the structure of the derivation so that I could have answered my question myself, like finding all the keys after nixosConfiguration.champignon
?
Thanks in advance !