Skip to content

Commit b583164

Browse files
committed
sandboxed qutebrowser
1 parent 437305d commit b583164

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

nix/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ in {
776776
(import ./vidmaker.nix)
777777
(import ./clipmaker.nix)
778778
(import ./bar.nix {inherit pkgs;})
779+
(import ./qute.nix {inherit pkgs;})
779780
(import ./bip39-wordlist.nix)
780781
];
781782
programs.git = {

nix/qute.nix

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{pkgs}: let
2+
nixpak = import ./nixpak.nix;
3+
mkNixPak = nixpak.lib.nixpak {
4+
inherit (pkgs) lib;
5+
inherit pkgs;
6+
};
7+
app = pkgs.writeShellApplication {
8+
name = "qute";
9+
text = ''
10+
${pkgs.qutebrowser}/bin/qutebrowser "$@"
11+
'';
12+
};
13+
sandbox = mkNixPak {
14+
config = {sloth, ...}: {
15+
app.package = app;
16+
gpu.enable = true;
17+
gpu.provider = "bundle";
18+
fonts.enable = true;
19+
locale.enable = true;
20+
etc.sslCertificates.enable = true;
21+
bubblewrap = {
22+
network = true;
23+
sockets.pulse = true;
24+
sockets.wayland = true;
25+
bind.ro = [
26+
[
27+
(toString ../cfg/qutebrowser.py)
28+
(
29+
sloth.concat'
30+
sloth.homeDir
31+
".config/qutebrowser/config.py"
32+
)
33+
]
34+
];
35+
bind.rw = [
36+
[
37+
(sloth.mkdir (sloth.concat' sloth.homeDir "/qute"))
38+
sloth.homeDir
39+
]
40+
];
41+
tmpfs = [
42+
"/tmp"
43+
];
44+
};
45+
};
46+
};
47+
in
48+
sandbox.config.env

0 commit comments

Comments
 (0)