mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 20:53:14 +00:00
librewolf: add module
This commit is contained in:
parent
66d7007e43
commit
2c94b9801f
4 changed files with 70 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -148,6 +148,8 @@ Makefile @thiagokokada
|
|||
/modules/programs/lf.nix @owm111
|
||||
/tests/modules/programs/lf @owm111
|
||||
|
||||
/modules/programs/librewolf.nix @onny
|
||||
|
||||
/modules/programs/lieer.nix @tadfisher
|
||||
|
||||
/modules/programs/lsd.nix @marsam
|
||||
|
|
|
@ -597,6 +597,14 @@ in
|
|||
migrate the blur settings to use 'services.picom.settings' instead.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2022-07-13T13:28:54+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'programs.librewolf'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ let
|
|||
./programs/less.nix
|
||||
./programs/lesspipe.nix
|
||||
./programs/lf.nix
|
||||
./programs/librewolf.nix
|
||||
./programs/lieer.nix
|
||||
./programs/lsd.nix
|
||||
./programs/man.nix
|
||||
|
|
59
modules/programs/librewolf.nix
Normal file
59
modules/programs/librewolf.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.librewolf;
|
||||
|
||||
mkOverridesFile = prefs: ''
|
||||
// Generated by Home Manager.
|
||||
|
||||
${concatStrings (mapAttrsToList (name: value: ''
|
||||
defaultPref("${name}", ${builtins.toJSON value});
|
||||
'') prefs)}
|
||||
'';
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.onny ];
|
||||
|
||||
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 LibeWolf package to use.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf (either bool (either int str));
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
"webgl.disabled" = false;
|
||||
"privacy.resistFingerprinting" = false;
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Attribute set of LibreWolf settings and overrides. Refer to
|
||||
<link xlink:href="https://librewolf.net/docs/settings/"/>
|
||||
for details on supported values.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "programs.librewolf" pkgs
|
||||
lib.platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
home.file.".librewolf/librewolf.overrides.cfg".text =
|
||||
mkOverridesFile cfg.settings;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue