Last year, Discourse added support for automatic color theme switching based on device preferences: Dark Mode Automatic Theme Switcher - theme-component - Discourse Meta.
Would you enable this for the NixOS instance? You might have to set some instance-wide theme defaults. It should work regardless of whether visitors are signed in, I think. See https://discourse.codinghorror.com for a live example.