{
  config,
  lib,
  inputs,
  pkgs,
  system,
  ...
}:
let
  cfg = config.modules.chromium;
in
{
  options.modules.chromium = {
    enable = lib.mkEnableOption "Chromium";
  };
  config = lib.mkIf cfg.enable {
    programs.chromium = {
      enable = true;
      extensions = [
        { id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # ProtonPass
        #{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublok
        { id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; } # Ublock lite
        { id = "kpmjjdhbcfebfjgdnpjagcndoelnidfj"; } # Control panel for twitter
        { id = "aighbdamfnndbemigjcbkdklkegkgmpl"; } # Better twitter embeds
        { id = "enamippconapkdmgfgjchkhakpfinmaj"; } # DeArrow
        { id = "bjcnpgekponkjpincbcoflgkdomldlnl"; } # Website Blocker
      ];
      package = pkgs.chromium.override { enableWideVine = true; };
    };
    xdg.mimeApps.defaultApplications = {
      "text/html" = "chromium.desktop";
      "x-scheme-handler/http" = "chromium.desktop";
      "x-scheme-handler/https" = "chromium.desktop";
      "x-scheme-handler/about" = "chromium.desktop";
      "x-scheme-handler/unknown" = "chromium.desktop";
    };
  };
}
