mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
chromium: add nativeMessagingHosts option
This commit is contained in:
parent
e83414058e
commit
10b0e3108b
1 changed files with 24 additions and 1 deletions
|
@ -137,6 +137,18 @@ let
|
|||
List of ${name} dictionaries to install.
|
||||
'';
|
||||
};
|
||||
nativeMessagingHosts = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExpression ''
|
||||
[
|
||||
pkgs.kdePackages.plasma-browser-integration
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
List of ${name} native messaging hosts to install.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
browserConfig = cfg:
|
||||
|
@ -178,6 +190,11 @@ let
|
|||
value.source = pkg;
|
||||
};
|
||||
|
||||
nativeMessagingHostsJoined = pkgs.symlinkJoin {
|
||||
name = "${drvName}-native-messaging-hosts";
|
||||
paths = cfg.nativeMessagingHosts;
|
||||
};
|
||||
|
||||
package = if cfg.commandLineArgs != [ ] then
|
||||
cfg.package.override {
|
||||
commandLineArgs = concatStringsSep " " cfg.commandLineArgs;
|
||||
|
@ -189,7 +206,13 @@ let
|
|||
home.packages = [ package ];
|
||||
home.file = optionalAttrs (!isProprietaryChrome) (listToAttrs
|
||||
((map extensionJson cfg.extensions)
|
||||
++ (map dictionary cfg.dictionaries)));
|
||||
++ (map dictionary cfg.dictionaries)) // {
|
||||
"${configDir}/NativeMessagingHosts" = {
|
||||
source =
|
||||
"${nativeMessagingHostsJoined}/etc/chromium/native-messaging-hosts";
|
||||
recursive = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
in {
|
||||
|
|
Loading…
Reference in a new issue