danth / stylix

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

Home Manager scripts should use `run` wrapper #313

Open danth opened 3 months ago

danth commented 3 months ago

As described in the documentation, scripts inside home.activation should include run before each effectual command so that they are not executed in dry-run mode.

trueNAHO commented 3 months ago

As described in the documentation, scripts inside home.activation should include run before each effectual command so that they are not executed in dry-run mode.

Should printf and echo commands writing to stdout or stderr for debugging purposes instead of writing to a file also be passed to the provided run function?

danth commented 3 months ago

run is only necessary for commands which actually produce a change.

However, we should consider using this for debug output:

You can also use the provided shell function verboseEcho, which acts as echo when verbose output is enabled.

It may also be useful to restore the echo commands that were removed in #304, but using that function. I wasn't aware of it until now.

trueNAHO commented 3 months ago

You can also use the provided shell function verboseEcho, which acts as echo when verbose output is enabled.

It may also be useful to restore the echo commands that were removed in #304, but using that function. I wasn't aware of it until now.

I added this to https://github.com/danth/stylix/issues/306.