1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-06 16:57:03 +00:00

firefox: remove with keyword use

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
Ihar Hrachyshka 2025-02-18 15:46:33 -05:00 committed by Austin Horstman
parent 4eef197913
commit 5f5ff39778

View file

@ -1,7 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
let let
inherit (pkgs.stdenv) isDarwin; inherit (pkgs.stdenv) isDarwin;
@ -22,22 +20,25 @@ let
else else
".mozilla/native-messaging-hosts"; ".mozilla/native-messaging-hosts";
in { in {
meta.maintainers = meta.maintainers = with lib.maintainers; [
[ maintainers.booxter maintainers.rycee hm.maintainers.bricked ]; booxter
rycee
lib.hm.maintainers.bricked
];
options.mozilla = { options.mozilla = {
firefoxNativeMessagingHosts = mkOption { firefoxNativeMessagingHosts = lib.mkOption {
internal = true; internal = true;
type = with types; listOf package; type = with lib.types; listOf package;
default = [ ]; default = [ ];
description = '' description = ''
List of Firefox native messaging hosts to configure. List of Firefox native messaging hosts to configure.
''; '';
}; };
thunderbirdNativeMessagingHosts = mkOption { thunderbirdNativeMessagingHosts = lib.mkOption {
internal = true; internal = true;
type = with types; listOf package; type = with lib.types; listOf package;
default = [ ]; default = [ ];
description = '' description = ''
List of Thunderbird native messaging hosts to configure. List of Thunderbird native messaging hosts to configure.
@ -45,7 +46,7 @@ in {
}; };
}; };
config = mkIf (cfg.firefoxNativeMessagingHosts != [ ] config = lib.mkIf (cfg.firefoxNativeMessagingHosts != [ ]
|| cfg.thunderbirdNativeMessagingHosts != [ ]) { || cfg.thunderbirdNativeMessagingHosts != [ ]) {
home.file = if isDarwin then home.file = if isDarwin then
let let
@ -59,14 +60,14 @@ in {
}; };
in { in {
"${thunderbirdNativeMessagingHostsPath}" = "${thunderbirdNativeMessagingHostsPath}" =
mkIf (cfg.thunderbirdNativeMessagingHosts != [ ]) { lib.mkIf (cfg.thunderbirdNativeMessagingHosts != [ ]) {
source = source =
"${thunderbirdNativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts"; "${thunderbirdNativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts";
recursive = true; recursive = true;
}; };
"${firefoxNativeMessagingHostsPath}" = "${firefoxNativeMessagingHostsPath}" =
mkIf (cfg.firefoxNativeMessagingHosts != [ ]) { lib.mkIf (cfg.firefoxNativeMessagingHosts != [ ]) {
source = source =
"${firefoxNativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts"; "${firefoxNativeMessagingHostsJoined}/lib/mozilla/native-messaging-hosts";
recursive = true; recursive = true;