KiKaraage / ArcWTF

A userChrome.css theme to bring Arc Browser look on Windows to Firefox. Work with Windows, Linux and macOS ✨
1.33k stars 28 forks source link

Nix configurations #69

Open arunoruto opened 4 months ago

arunoruto commented 4 months ago

This isn't much of an issue, but I wanted to track how to automate the ArcWTF configuration using Nix. Here is a list of things that should be done and what I have already managed to automate:

Bonus:

Here is a sample arcwtf.nix file:

{pkgs, ...}: let
  arcwtf = pkgs.fetchFromGitHub {
    owner = "KiKaraage";
    repo = "ArcWTF";
    # rev = "v1.2-firefox"; # This tag can't be used, since the URL bar has still issues
    rev = "bb6f2b7ef7e3d201e23d86bf8636e5d0ea4bd68b";
    hash = "sha256-gyJiIVnyZOYVX6G3m4SSbsb7K9g4zKZWlrHphEIQwsY=";
  };
  profile = "default";
in {
  programs.firefox = {
    profiles.${profile}.settings = {
      "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
      "svg.context-properties.content.enabled" = true;
      "uc.tweak.popup-search" = true;
      "uc.tweak.hide-sidebar-header" = true;
    };
  };

  home.file = {
    ".mozilla/firefox/${profile}/chrome" = {
      source = arcwtf;
      recursive = true;
    };
  };
}

If things change, I will update this issue!

beracira commented 4 months ago

I love it! It'd be awesome if we can find a way to config both sidebery and userchrome toggle in a single .nix file.

ArtemChandragupta commented 3 months ago

You can't configure sidebery and userchrome toggle in nix because they can't read files due to firefox limitations.

Instead of this you can set custom welcome page with first-startup instructions - as example with sidebery stile content and some words where to paste it. This is what I am doing now.

For about:config setting you should do this:

programs.firefox.profiles.${profile}.settings = {
      "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
      "svg.context-properties.content.enabled" = true;
};