Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix configurations #69

Open
6 of 17 tasks
arunoruto opened this issue Jun 28, 2024 · 2 comments
Open
6 of 17 tasks

Nix configurations #69

arunoruto opened this issue Jun 28, 2024 · 2 comments

Comments

@arunoruto
Copy link

arunoruto commented Jun 28, 2024

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:

  • Install sidebery and userchrome toggle. This can be done either done the standard way using the store and syncing it with the profile or using the NUR. Both extensions can be found in the repository of rycee.
  • Configure userchrome toggle
    • Disable notifications
    • Set the || prefix for the Style Toggle 1
  • Configure sidebery css
  • Apply the CSS theme
    • Clone the repo
    • Link to .mozilla/firefox/<profile>/chrome
    • Set toolkit.legacyUserProfileCustomizations.stylesheets to true
    • Set svg.context-properties.content.enabled to true

Bonus:

  • Replace Firefox icon on Start Menu and Taskbar
  • Activate popup search/URL bar launchpad
  • Hide header sidebar, containing space/tab panel name
  • Extend sidebar length to 250px (original: 200px)
  • Other tweaks (some might've already preapplied here)
  • Use Segoe UI Variable (Windows 11 default font) as Firefox UI font, as shown on preview screenshots
  • Additional addons for theming

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
Copy link
Contributor

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
Copy link

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;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants