mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
Reduce maintenance burden and increase efficiency by automatically importing modules following a specific convention. Co-authored-by: awwpotato <awwpotato@voidq.com> Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
38 lines
856 B
Nix
38 lines
856 B
Nix
{ lib, config, ... }:
|
|
let
|
|
modulePath = [
|
|
"programs"
|
|
"floorp"
|
|
];
|
|
|
|
cfg = config.programs.floorp;
|
|
|
|
mkFirefoxModule = import ../firefox/mkFirefoxModule.nix;
|
|
in
|
|
{
|
|
meta.maintainers = [ lib.hm.maintainers.bricked ];
|
|
|
|
imports = [
|
|
(mkFirefoxModule {
|
|
inherit modulePath;
|
|
name = "Floorp";
|
|
wrappedPackageName = "floorp";
|
|
unwrappedPackageName = "floorp-unwrapped";
|
|
visible = true;
|
|
|
|
platforms.linux = {
|
|
configPath = ".floorp";
|
|
};
|
|
platforms.darwin = {
|
|
configPath = "Library/Application Support/Floorp";
|
|
};
|
|
})
|
|
];
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
mozilla.firefoxNativeMessagingHosts =
|
|
cfg.nativeMessagingHosts
|
|
# package configured native messaging hosts (entire browser actually)
|
|
++ (lib.optional (cfg.finalPackage != null) cfg.finalPackage);
|
|
};
|
|
}
|