Nixos-rebuild can't find newly written module from local nixpkgs

I wrote a module for xsettingsd, put it into nixos/modules/services/misc/xsettingsd.nix in my local nixpkgs and added it to nixos/modules/module-list.nix.

In my local nixos configuration flake, i changed inputs.nixpkgs.url to path:/path/to/local/nixpkgs and changed my config to use my newly written module.

When I run sudo nixos-rebuild switch --flake /path/to/configuration/flake#laptop, it doesn’t find my newly written module:

error: The option `services.xsettingsd' does not exist. Definition values:
       - In `/nix/store/yd5zvpwj24s5fj0dpnf8z6kmzii1kdgy-source/config/xsettingsd':
             enable = true;
             settings = ''

Things I have tried:

  • making sure my module is declared as and i use services.xsettingsd in my config
  • git committing the local nixpkgs temporarily because i know sometimes nix doesn’t find stuff if it isn’t known by git
  • nix flake update nixpkgs to update my flake.lock although it should’ve already updated on nixos-rebuild

What is going on? What did I forget to do?