mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +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;
|
cfg = config.aviallon.desktop;
|
||||||
generalCfg = config.aviallon.general;
|
generalCfg = config.aviallon.general;
|
||||||
in {
|
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) {
|
config = mkIf (cfg.enable && !generalCfg.minimal) {
|
||||||
environment.systemPackages = with pkgs; []
|
environment.systemPackages = with pkgs; []
|
||||||
++ optionals (!generalCfg.minimal) [
|
++ optionals (!generalCfg.minimal) [
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ in {
|
||||||
environment.systemPackages = with pkgs; []
|
environment.systemPackages = with pkgs; []
|
||||||
++ [
|
++ [
|
||||||
guake
|
guake
|
||||||
|
|
||||||
|
(myFirefox.override { enableGnomeExtensions = true; })
|
||||||
]
|
]
|
||||||
++ (with gnome; [
|
++ (with gnome; [
|
||||||
gnome-software
|
gnome-software
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ in {
|
||||||
ark
|
ark
|
||||||
kolourpaint
|
kolourpaint
|
||||||
krdc
|
krdc
|
||||||
|
|
||||||
|
(myFirefox.override { enablePlasmaBrowserIntegration = true; })
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.profileRelativeSessionVariables = {
|
environment.profileRelativeSessionVariables = {
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ in
|
||||||
# Use bleeding-edge linux firmware
|
# Use bleeding-edge linux firmware
|
||||||
linux-firmware = super.unstable.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: {
|
(final: prev: {
|
||||||
# Use our kernel for generating linux man pages
|
# 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;
|
with lib;
|
||||||
|
|
@ -12,12 +17,12 @@ let
|
||||||
(key: value: ''${prefFuncName}(${builtins.toJSON key}, ${builtins.toJSON value});'' )
|
(key: value: ''${prefFuncName}(${builtins.toJSON key}, ${builtins.toJSON value});'' )
|
||||||
prefs
|
prefs
|
||||||
);
|
);
|
||||||
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
in wrapFirefox firefox-esr-unwrapped {
|
||||||
cfg = {
|
cfg = {
|
||||||
smartcardSupport = true;
|
smartcardSupport = true;
|
||||||
pipewireSupport = true;
|
pipewireSupport = true;
|
||||||
ffmpegSupport = true;
|
ffmpegSupport = true;
|
||||||
enablePlasmaBrowserIntegration = true;
|
inherit enablePlasmaBrowserIntegration enableGnomeExtensions extraNativeMessengingHosts;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPolicies = {
|
extraPolicies = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue