l browsers: use new xjail interface

This commit is contained in:
lassulus 2018-04-01 16:19:28 +02:00
parent 0f47b98e81
commit 1a5b58c828

View File

@ -21,14 +21,10 @@ let
$BIN "$@"
'';
createChromiumUser = name: groups: precedence:
createUser = script: name: groups: precedence: dpi:
{
lass.xjail.${name} = {
user = name;
script = pkgs.writeDash name ''
${pkgs.chromium}/bin/chromium "$@"
'';
inherit groups;
inherit script groups dpi;
};
environment.systemPackages = [ config.lass.xjail-bins.${name} ];
lass.browser.paths.${name} = {
@ -37,40 +33,20 @@ let
};
};
createChromiumUser = name: groups: precedence:
createUser (pkgs.writeDash name ''
${pkgs.chromium}/bin/chromium "$@"
'') name groups precedence 80;
createFirefoxUser = name: groups: precedence:
{
lass.xjail.${name} = {
user = name;
script = pkgs.writeDash name ''
createUser (pkgs.writeDash name ''
${pkgs.firefox-devedition-bin}/bin/firefox-devedition "$@"
'';
inherit groups;
};
environment.systemPackages = [ config.lass.xjail-bins.${name} ];
lass.browser.paths.${name} = {
path = config.lass.xjail-bins.${name};
inherit precedence;
};
};
'') name groups precedence 80;
createQuteUser = name: groups: precedence:
{
lass.xjail.${name} = {
user = name;
script = pkgs.writeDash name ''
createUser (pkgs.writeDash name ''
${pkgs.qutebrowser}/bin/qutebrowser "$@"
'';
inherit groups;
};
environment.systemPackages = [ config.lass.xjail-bins.${name} ];
lass.browser.paths.${name} = {
path = config.lass.xjail-bins.${name};
inherit precedence;
};
};
#TODO: abstract this
'') name groups precedence 60;
in {