mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
parent
cced902dda
commit
b449cb77b1
3 changed files with 52 additions and 0 deletions
|
@ -86,6 +86,17 @@ in
|
||||||
then pkgs.firefox
|
then pkgs.firefox
|
||||||
else pkgs.firefox-unwrapped;
|
else pkgs.firefox-unwrapped;
|
||||||
defaultText = literalExample "pkgs.firefox";
|
defaultText = literalExample "pkgs.firefox";
|
||||||
|
example = literalExample ''
|
||||||
|
pkgs.firefox.override {
|
||||||
|
# See nixpkgs' firefox/wrapper.nix to check which options you can use
|
||||||
|
cfg = {
|
||||||
|
# Gnome shell native connector
|
||||||
|
enableGnomeExtensions = true;
|
||||||
|
# Tridactyl native connector
|
||||||
|
enableTridactylNative = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
The Firefox package to use. If state version ≥ 19.09 then
|
The Firefox package to use. If state version ≥ 19.09 then
|
||||||
this should be a wrapped Firefox package. For earlier state
|
this should be a wrapped Firefox package. For earlier state
|
||||||
|
@ -264,6 +275,13 @@ in
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
warnings = optional (cfg.enableGnomeExtensions or false) ''
|
||||||
|
Using 'programs.firefox.enableGnomeExtensions' has been deprecated and
|
||||||
|
will be removed in the future. Please change to overriding the package
|
||||||
|
configuration using 'programs.firefox.package' instead. You can refer to
|
||||||
|
its example for how to do this.
|
||||||
|
'';
|
||||||
|
|
||||||
home.packages =
|
home.packages =
|
||||||
let
|
let
|
||||||
# The configuration expected by the Firefox wrapper.
|
# The configuration expected by the Firefox wrapper.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
firefox-profile-settings = ./profile-settings.nix;
|
firefox-profile-settings = ./profile-settings.nix;
|
||||||
firefox-state-version-19_09 = ./state-version-19_09.nix;
|
firefox-state-version-19_09 = ./state-version-19_09.nix;
|
||||||
|
firefox-deprecated-native-messenger = ./deprecated-native-messenger.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
enableGnomeExtensions = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
firefox-unwrapped = pkgs.runCommand "firefox-0" {
|
||||||
|
meta.description = "I pretend to be Firefox";
|
||||||
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
} ''
|
||||||
|
mkdir -p "$out/bin"
|
||||||
|
touch "$out/bin/firefox"
|
||||||
|
chmod 755 "$out/bin/firefox"
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
test.asserts.warnings.expected = [''
|
||||||
|
Using 'programs.firefox.enableGnomeExtensions' has been deprecated and
|
||||||
|
will be removed in the future. Please change to overriding the package
|
||||||
|
configuration using 'programs.firefox.package' instead. You can refer to
|
||||||
|
its example for how to do this.
|
||||||
|
''];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue