Seperate firefox profiles for trusted / work / general

This commit is contained in:
outfoxxed 2024-02-18 04:23:42 -08:00
parent d94fe01659
commit cbb3278b8f
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 264 additions and 48 deletions

View file

@ -0,0 +1,30 @@
{ pkgs, name, theme }: let
json = builtins.toJSON {
manifest_version = 2;
version = "1.0";
browser_specific_settings.gecko = {
id = "theme-${name}@outfoxxed.me";
};
inherit name theme;
};
jsonFile = pkgs.writeTextFile {
name = "manifest.json";
text = json;
};
in pkgs.stdenvNoCC.mkDerivation {
pname = "firefox-theme-${name}.xpi";
version = "1.0";
preferLocalBuild = true;
unpackPhase = "true";
buildPhase = ''
cp ${jsonFile} manifest.json
${pkgs.zip}/bin/zip out.xpi manifest.json
'';
installPhase = ''
mv out.xpi $out
'';
}