Add open-urls-in-browser combinator
This commit is contained in:
parent
f5cc61ef63
commit
d35e9df391
2 changed files with 37 additions and 0 deletions
|
|
@ -1122,6 +1122,24 @@ in rec {
|
|||
;
|
||||
};
|
||||
|
||||
open-urls-in-browser = {
|
||||
sig = "Combinator";
|
||||
doc = ''
|
||||
Allows access to open URLs in `$BROWSER`.
|
||||
|
||||
This works by creating a pipe that is mounted into the jail that forwards
|
||||
all URLs to the `$BROWSER` outside of the jail. This way the jailed
|
||||
program can launch your browser, even if it has a subset of the
|
||||
permissions your browser has.
|
||||
'';
|
||||
__functor = _:
|
||||
compose [
|
||||
(jail-to-host-channel "browserchannel" ''"$BROWSER" "$1"'')
|
||||
(set-env "BROWSER" "browserchannel")
|
||||
]
|
||||
;
|
||||
};
|
||||
|
||||
############################################
|
||||
# deprecated
|
||||
persisthome = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue