mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
48 lines
1.9 KiB
Nix
48 lines
1.9 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) mdDoc mkEnableOption mkIf mkRenamedOptionModule teams;
|
|
in
|
|
|
|
{
|
|
meta = {
|
|
maintainers = teams.gnome.members;
|
|
};
|
|
|
|
imports = [
|
|
# Added 2021-05-07
|
|
(mkRenamedOptionModule
|
|
[ "services" "gnome3" "chrome-gnome-shell" "enable" ]
|
|
[ "services" "gnome" "gnome-browser-connector" "enable" ]
|
|
)
|
|
# Added 2022-07-25
|
|
(mkRenamedOptionModule
|
|
[ "services" "gnome" "chrome-gnome-shell" "enable" ]
|
|
[ "services" "gnome" "gnome-browser-connector" "enable" ]
|
|
)
|
|
];
|
|
|
|
options = {
|
|
services.gnome.gnome-browser-connector.enable = mkEnableOption (mdDoc ''
|
|
native host connector for the GNOME Shell browser extension, a DBus service
|
|
allowing to install GNOME Shell extensions from a web browser
|
|
'');
|
|
};
|
|
|
|
config = mkIf config.services.gnome.gnome-browser-connector.enable {
|
|
environment.etc = {
|
|
"chromium/native-messaging-hosts/org.gnome.browser_connector.json".source = "${pkgs.gnome-browser-connector}/etc/chromium/native-messaging-hosts/org.gnome.browser_connector.json";
|
|
"opt/chrome/native-messaging-hosts/org.gnome.browser_connector.json".source = "${pkgs.gnome-browser-connector}/etc/opt/chrome/native-messaging-hosts/org.gnome.browser_connector.json";
|
|
# Legacy paths.
|
|
"chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.gnome-browser-connector}/etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
|
|
"opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.gnome-browser-connector}/etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.gnome-browser-connector ];
|
|
|
|
services.dbus.packages = [ pkgs.gnome-browser-connector ];
|
|
|
|
programs.firefox.nativeMessagingHosts.packages = [ pkgs.gnome-browser-connector ];
|
|
};
|
|
}
|