danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
902 stars 105 forks source link

stylix: clean up `fromOs` #407

Closed danth closed 2 weeks ago

danth commented 1 month ago

A common question/issue is that the fallback default value for stylix.image is null, which is not a path or package. This produces a type error when it should simply state that the option has not been set.

This PR removes the fromOs function, and replaces it with a module which copies listed settings.

Fixes #406 Fixes #345

danth commented 1 month ago

Regarding my two comments above, the easiest solution would be to merge followSystem and autoImport into a single option, such as enableHomeManagerIntegration.

danth commented 3 weeks ago

A new use of fromOs was added in #372 (note to self)

danth commented 3 weeks ago

Another new usage in #244

danth commented 2 weeks ago

This now respects followSystem as before, however it only works when autoImport is also being used.

I doubt anyone was actually using followSystem without autoImport, given that it was only applicable to multi-user configurations, and even then was probably not the best way to organise things.

I think this is ready to merge :)