-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
userContent.css does not apply to newtab or sidebery when installed from nix flake #96
Comments
I am not using Nix so I can't for sure say that this is related, but on macOS I initially symlinked the I'm not sure how Nix does it but could the issue be similar? If so the issue is not with Nix itself but with how macOS handles symlinks I think. |
I just tried installing the Yes, as you say, home-manager (through nix) is linking all configuration files into the nix store (essentially the textfox chrome folder becomes a "package" or derivation that lives in the nix store and each .css file in my personal dotfiles becomes a symlink into that package). If the issue has to with what you say about MacOS, @import directives and symlinks, that at least gives me something to look into further. It would be interesting to know exactly why some css (userChrome.css, content/about.css via userContent.css) applies while other css does not. Edit: As a quick test, I moved the script-installed userContent.css from my chrome folder into a tmp directory, and then symlinked it back in place (all other .css are real files). This immediately made about:home and sidebery css break (although, again, about:config, about:settings etc have font stylings from textfox. Interesting!) |
Interesting finds I assumed the issue would be with the directory not the actual I'm not at the computer so I can't test rn, but do you get the same issue when symlinking the If so this suggests that actual issue with this is how Firefox loads the file rather than the imports failing. |
Yes, same issue. |
A bit of a weird fix, but I've managed to get everything working on my end using this branch: https://github.com/maxbol/textfox/blob/copy-on-activation-mode/nix/hm-module.nix What it does is create a new option for the textfox module called If you want I can clean it up a bit and make it into a PR. Would be interesting to see if someone on Linux can reproduce the issue with symlinked css - my googling hasn't yielded that there should be any difference between Linux and MacOS with regards to this. If there isn't, than symlinking via home manager would never be a valid solution, in which case a bit of complexity can be removed from the module. |
Sure clean it up and send through a PR. |
Is this a problem for all Mac environments? If yes, wouldn't it make sense to not introduce a new option but divide the hm-module into Mac -> copy instead of symlink Pro my argument speaks that textfox would remain nix agnostic. Against my argument speaks that it can be useful for experimenting with textfox while using it via nix home-manager. |
Not sure. Have you tried the flake on Linux? Do you still get full styling of about:newtab and sidebery? (Do you see the ascii logo on the home screen, is the sidebery background matching the global bg, etc?) Any Linux users that could verify that moving userContent.css and symlinking it back into place does NOT break their styling of these things? |
@maxbol I am using linux. I am not sure about all things working, but have a look at this screenshot. You might spot something that is missing which I didn't notice so far... |
It looks correct to me. Did you apply colors by making changes to config.css, or by using Firefox Colors extension? Regardless, the presence of the textfox logo means that userContent.css from textfox is applied, so it is clearly working better for you on Linux out of the box. So perhaps there needs to be separate solutions for Mac OS and Linux in the nix module. |
I have used Firefox Color to set colors yes. |
Testing on MacOS.
When I install testfox via the script on after manually installing Firefox 134.1, everything works as expected.
When installing it via the flake together with home manager installed
firefox-unwrapped
134.0 (only currently Mac OS-installable nix package of Firefox), about:config and most other about pages are styled using user content css. However, about:home/newtab and sidebery are completely unstyled by textfox.When running a recursive diff of the profile chrome between these two scenarios, they are identical with exception of config.css not existing in the manual install. Adding the nix-created config.css does not cause the styling in the manual install to stop working, so even with a 100% identical chrome/, there is a difference in behavior.
I have verified that user.js works in both cases and that all settings defined within it have the right value in both installations.
Edit: userChrome.css works perfectly in both installations.
The text was updated successfully, but these errors were encountered: