Auto brightness at GDM login screen

I am not sure when it started, but probably when I moved my NixOS config to flakes, I started noticing brightness changes on my login screen. It seems like it uses the built in ambient sensor, and I was able to disable it in my user settings just fine, but it drives me crazy on the login screen, especially since I have to change the brightness when I log into my account!

It would be amazing if I could somehow change the dconf option [org/gnome/settings-daemon/plugins/power] to ambient-enabled=false for the gdm user, but I am not sure how…

See Changing GDM `gsettings` decoratively

Thanks a lot!
I finally found a solution to this problem:

programs.dconf.profiles.gdm.databases = [
        {
          settings."org/gnome/settings-daemon/plugins/power" = {
            ambient-enabled = false;
          };
        }
];

By adding this config snippet, the brightness doesn’t change anymore!