mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 06:18:03 +03:00
helium & extensions
This commit is contained in:
1 parent
9c3f671acf
commit
7beff3b25f
2 files changed
+104
-2
No files matched your search
@@ -0,0 +1,100 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
# sidechery "sidebery" ported to chromium for helium built from source and side-loaded.
|
||||||
|
flake.homeModules.home-browser-helium-sidechery =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sidechery = pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "sidechery";
|
||||||
|
version = (builtins.fromJSON (builtins.readFile "${inputs.sidechery}/package.json")).version;
|
||||||
|
src = inputs.sidechery;
|
||||||
|
|
||||||
|
pnpmDeps = pkgs.fetchPnpmDeps {
|
||||||
|
inherit (finalAttrs) pname version src;
|
||||||
|
pnpm = pkgs.pnpm_10;
|
||||||
|
fetcherVersion = 4;
|
||||||
|
hash = "sha256-c05e5Wchb3mq45cHcjjiUCAzi9RrhtKWunYJ7QK30wM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.nodejs
|
||||||
|
pkgs.pnpm_10
|
||||||
|
pkgs.pnpmConfigHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
pnpm run build:chrome
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
cp -r .output/chrome-mv3 $out
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
panelColors = [
|
||||||
|
"red"
|
||||||
|
"orange"
|
||||||
|
"yellow"
|
||||||
|
"green"
|
||||||
|
"cyan"
|
||||||
|
"purple"
|
||||||
|
"pink"
|
||||||
|
];
|
||||||
|
|
||||||
|
sidechery-styled = pkgs.runCommand "sidechery-styled" { } ''
|
||||||
|
cp -r ${sidechery} $out
|
||||||
|
chmod -R u+w $out
|
||||||
|
cat ${pkgs.writeText "sidechery-extra.css" config.elars.sidechery.extraCss} >> $out/styles/sidebar.css
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.elars.sidechery.extraCss = lib.mkOption {
|
||||||
|
type = lib.types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
CSS appended to sidechery's sidebar stylesheet at build time, so
|
||||||
|
styling doesn't depend on the in-extension styles editor.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
config.xdg.configFile."sidechery/panels.json".text = builtins.toJSON {
|
||||||
|
ver = sidechery.version;
|
||||||
|
sidebar = {
|
||||||
|
panels = lib.genAttrs panelColors (color: {
|
||||||
|
type = 2; # PanelType.tabs
|
||||||
|
id = color;
|
||||||
|
name = color;
|
||||||
|
inherit color;
|
||||||
|
iconSVG = "icon_circle";
|
||||||
|
});
|
||||||
|
nav = panelColors ++ [
|
||||||
|
"collapse"
|
||||||
|
"settings"
|
||||||
|
"create_snapshot"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.programs.helium = {
|
||||||
|
extraFlags = [ "--load-extension=${sidechery-styled}" ];
|
||||||
|
|
||||||
|
preferences = {
|
||||||
|
helium.browser.layout = 2;
|
||||||
|
extensions.commands."linux:Ctrl+S" = {
|
||||||
|
command_name = "_execute_action";
|
||||||
|
extension = "napehjbogfncaoogcckddbidjgcapclg";
|
||||||
|
global = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,6 +11,10 @@
|
|||||||
package = inputs.helium.packages.${system}.helium-widevine;
|
package = inputs.helium.packages.${system}.helium-widevine;
|
||||||
|
|
||||||
extensions = [
|
extensions = [
|
||||||
|
{
|
||||||
|
id = "clngdbkpkpeebahjckkjfobafhncgmne";
|
||||||
|
hash = "sha256-82toCWp5v/Crf35et50ISOw2Q66ZhJrCx59rhDVTRPk=";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
id = "dkdnancajokhfclpjpplkhlkbhaeejob";
|
id = "dkdnancajokhfclpjpplkhlkbhaeejob";
|
||||||
hash = "sha256-hkEGW2JVQzeRmTpoPrWFoVG3sbCgHohnsr2b12rfeMg=";
|
hash = "sha256-hkEGW2JVQzeRmTpoPrWFoVG3sbCgHohnsr2b12rfeMg=";
|
||||||
@@ -57,7 +61,6 @@
|
|||||||
|
|
||||||
preferences = {
|
preferences = {
|
||||||
helium.browser = {
|
helium.browser = {
|
||||||
layout = 2;
|
|
||||||
zen_mode = true;
|
zen_mode = true;
|
||||||
zen_mode_sidebar_pinned = true;
|
zen_mode_sidebar_pinned = true;
|
||||||
zen_mode_top_chrome_pinned = true;
|
zen_mode_top_chrome_pinned = true;
|
||||||
@@ -65,7 +68,6 @@
|
|||||||
minimal_location_bar = true;
|
minimal_location_bar = true;
|
||||||
rounded_frame = false;
|
rounded_frame = false;
|
||||||
new_tab_next_to_active = false;
|
new_tab_next_to_active = false;
|
||||||
vertical_right_aligned = false;
|
|
||||||
show_back_button = true;
|
show_back_button = true;
|
||||||
show_extensions_button = true;
|
show_extensions_button = true;
|
||||||
show_media_button = true;
|
show_media_button = true;
|
||||||
|
|||||||
Reference in new issue
Block a user