mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
librewolf: use mkFirefoxModule
This commit is contained in:
parent
f3a2ff6958
commit
18462998b1
1 changed files with 27 additions and 16 deletions
|
@ -14,20 +14,33 @@ let
|
||||||
'') prefs)}
|
'') prefs)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
modulePath = [ "programs" "librewolf" ];
|
||||||
|
|
||||||
|
mkFirefoxModule = import ./firefox/mkFirefoxModule.nix;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.onny ];
|
meta.maintainers = [ maintainers.chayleaf maintainers.onny ];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(mkFirefoxModule {
|
||||||
|
inherit modulePath;
|
||||||
|
name = "LibreWolf";
|
||||||
|
description = "LibreWolf is a privacy enhanced Firefox fork.";
|
||||||
|
wrappedPackageName = "librewolf";
|
||||||
|
unwrappedPackageName = "librewolf-unwrapped";
|
||||||
|
|
||||||
|
platforms.linux = {
|
||||||
|
vendorPath = ".librewolf";
|
||||||
|
configPath = ".librewolf";
|
||||||
|
};
|
||||||
|
platforms.darwin = {
|
||||||
|
vendorPath = "Library/Application Support/LibreWolf";
|
||||||
|
configPath = "Library/Application Support/LibreWolf";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
options.programs.librewolf = {
|
options.programs.librewolf = {
|
||||||
enable =
|
|
||||||
mkEnableOption "Librewolf browser, a privacy enhanced Firefox fork";
|
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = pkgs.librewolf;
|
|
||||||
defaultText = literalExpression "pkgs.librewolf";
|
|
||||||
description = "The LibreWolf package to use.";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (either bool (either int str));
|
type = with types; attrsOf (either bool (either int str));
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -38,7 +51,7 @@ in {
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Attribute set of LibreWolf settings and overrides. Refer to
|
Attribute set of global LibreWolf settings and overrides. Refer to
|
||||||
<https://librewolf.net/docs/settings/>
|
<https://librewolf.net/docs/settings/>
|
||||||
for details on supported values.
|
for details on supported values.
|
||||||
'';
|
'';
|
||||||
|
@ -51,9 +64,7 @@ in {
|
||||||
lib.platforms.linux)
|
lib.platforms.linux)
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
home.file.".librewolf/librewolf.overrides.cfg" =
|
||||||
|
lib.mkIf (cfg.settings != { }) { text = mkOverridesFile cfg.settings; };
|
||||||
home.file.".librewolf/librewolf.overrides.cfg".text =
|
|
||||||
mkOverridesFile cfg.settings;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue