Cannot find 'dusklight' package

Greeting into the forum!

I have two systems, which do only differ in hardware. All other configuration is the same. When providing the package dusklight on one system via `nix-shell -p dusklight` it works, on the other system I get the message `error: undefined variable ‘dusklight’`.

The expected outcome is that the dusklight binary is available in the shell.

How can I troubleshoot this issue? What informations do I need to gather to fix this issue?

Thanks in advance, for beginner help!

EDIT1:
I am running 26.05.20260515.d233902 (Yarara)

Hello,

It seems like you are not running the same channel revision on your two machines. The one you shared predate the addition of dusklight in nixpkgs. Updating your channel should be enough to fix your issue.

On the topic of channel revisions, the one you shared is from May, you probably want to try to stay more up to date.

I forgot to mention that I use a flake.nix to specifiy the source of the package:

    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

When trying to build the system, I received the same error. The flake.lock is the same on both machines.

Have you tried bumping your flake.lock?

If this doesn’t work, could you share your flake.nix, or ideally your whole config if it is public?

What do you mean by ‘bumping your flake.lock’? Indeed, I can make the project temporary public:

By “bumping” I meant updating it, sorry for the confusion.

I glanced at your config, and I cannot see anything obvious which could cause your issue.

But, I’m confused as to why your nixos version would be 26.05.20260515.d233902 (Yarara) seeing as your flake.lock is up to date. I assume you did rebuild your system after updating your flake.lock?

I tried to rebuild the system but upon evaluting the rebuild-command exits with the same error: `error: undefined variable ‘dusklight’`.

One thing I tried is commenting out the `steam.nix` module and then building the system. It went through, but the version is still

26.05.20260515.d233902 (Yarara)

which is weird.

Can I provide more information to troubleshoot?

Could you throw a --show-trace after the rebuild? It should give us more info :slight_smile:

I found the issue. It was completly non-nix related. It clicked when I did a

sudo nixos-rebuild switch --flake .#probook --show-trace

in the root of my project. The error did not appeared. The error just appears when I use my `./rebuild` script. This script copies the files to the `~/os-build`-dir and then builds the system from there.

Because the script does not force overwrite the flake.lock, it differs from the git-repo:

 $ diff flake.lock ~/os-build/flake.lock
5,6c5,6
<         "lastModified": 1788372231,
<         "narHash": "sha256-7aqErvrAEz/5OcPA5p3M+tVOqeYc4oJXkNIPXfCqxAw=",
---
>         "lastModified": 1778869304,
>         "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
9c9
<         "rev": "9387b3fcc0c23c86661636da63faabad4235a0a6",
---

Therefore it was completly my fault.

Nevertheless, thanks for the help!