mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Browser/Firefox] refactor firefox to use callPackage
Move overrides to a config option Add gnome support
This commit is contained in:
parent
776c6e3060
commit
539e85ed95
5 changed files with 23 additions and 4 deletions
|
|
@ -4,6 +4,16 @@ let
|
|||
cfg = config.aviallon.desktop;
|
||||
generalCfg = config.aviallon.general;
|
||||
in {
|
||||
options.aviallon.desktop.browser = {
|
||||
firefox.overrides = mkOption {
|
||||
internal = true;
|
||||
description = "Override firefox package settings";
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
example = { enablePlasmaIntegration = true; };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && !generalCfg.minimal) {
|
||||
environment.systemPackages = with pkgs; []
|
||||
++ optionals (!generalCfg.minimal) [
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ in {
|
|||
environment.systemPackages = with pkgs; []
|
||||
++ [
|
||||
guake
|
||||
|
||||
(myFirefox.override { enableGnomeExtensions = true; })
|
||||
]
|
||||
++ (with gnome; [
|
||||
gnome-software
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ in {
|
|||
ark
|
||||
kolourpaint
|
||||
krdc
|
||||
|
||||
(myFirefox.override { enablePlasmaBrowserIntegration = true; })
|
||||
];
|
||||
|
||||
environment.profileRelativeSessionVariables = {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ in
|
|||
# Use bleeding-edge linux firmware
|
||||
linux-firmware = super.unstable.linux-firmware;
|
||||
|
||||
myFirefox = (import ./packages/firefox.nix { pkgs = self; inherit lib; });
|
||||
myFirefox = (super.callPackage ./packages/firefox.nix config.aviallon.desktop.browser.firefox.overrides);
|
||||
})
|
||||
(final: prev: {
|
||||
# Use our kernel for generating linux man pages
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
{pkgs, lib,
|
||||
{lib,
|
||||
firefox-esr-unwrapped,
|
||||
wrapFirefox,
|
||||
enablePlasmaBrowserIntegration ? false,
|
||||
enableGnomeExtensions ? false,
|
||||
extraNativeMessengingHosts ? [],
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
|
@ -12,12 +17,12 @@ let
|
|||
(key: value: ''${prefFuncName}(${builtins.toJSON key}, ${builtins.toJSON value});'' )
|
||||
prefs
|
||||
);
|
||||
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
||||
in wrapFirefox firefox-esr-unwrapped {
|
||||
cfg = {
|
||||
smartcardSupport = true;
|
||||
pipewireSupport = true;
|
||||
ffmpegSupport = true;
|
||||
enablePlasmaBrowserIntegration = true;
|
||||
inherit enablePlasmaBrowserIntegration enableGnomeExtensions extraNativeMessengingHosts;
|
||||
};
|
||||
|
||||
extraPolicies = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue