python312Packages.dissect-extfs: 3.11 -> 3.12
[NixPkgs.git] / nixos / modules / services / desktops / gnome / gnome-browser-connector.nix
blob4f0c36883a3f5669492e3805b2e971689414f478
1 { config, lib, pkgs, ... }:
3 let
4   inherit (lib) mkEnableOption mkIf mkRenamedOptionModule teams;
5 in
8   meta = {
9     maintainers = teams.gnome.members;
10   };
12   options = {
13     services.gnome.gnome-browser-connector.enable = mkEnableOption ''
14       native host connector for the GNOME Shell browser extension, a DBus service
15       allowing to install GNOME Shell extensions from a web browser
16     '';
17   };
19   config = mkIf config.services.gnome.gnome-browser-connector.enable {
20     environment.etc = {
21       "chromium/native-messaging-hosts/org.gnome.browser_connector.json".source = "${pkgs.gnome-browser-connector}/etc/chromium/native-messaging-hosts/org.gnome.browser_connector.json";
22       "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";
23       # Legacy paths.
24       "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";
25       "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";
26     };
28     environment.systemPackages = [ pkgs.gnome-browser-connector ];
30     services.dbus.packages = [ pkgs.gnome-browser-connector ];
32     programs.firefox.nativeMessagingHosts.packages = [ pkgs.gnome-browser-connector ];
33   };