Skip to content

Commit f16c90b

Browse files
committed
openarena
1 parent 51188a9 commit f16c90b

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

nix/bar.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
config = {sloth, ...}: {
1313
app.package = app;
1414
gpu.enable = true;
15-
gpu.provider = "bundle";
1615
fonts.enable = true;
1716
locale.enable = true;
1817
etc.sslCertificates.enable = true;

nix/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ in {
778778
(import ./pdfmaker.nix)
779779
(import ./vidmaker.nix)
780780
(import ./clipmaker.nix)
781+
(import ./openarena.nix)
781782
(import ./bar.nix {inherit pkgs;})
782783
(import ./bip39-wordlist.nix)
783784
];

nix/openarena.nix

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
let
2+
pkgs = import ./nixpkgs.nix;
3+
nixpak = import ./nixpak.nix;
4+
mkNixPak = nixpak.lib.nixpak {
5+
inherit (pkgs) lib;
6+
inherit pkgs;
7+
};
8+
app = pkgs.writeShellApplication {
9+
name = "openarena";
10+
text = ''
11+
${pkgs.openarena}/bin/openarena \
12+
+set fs_homepath ~/.openarena \
13+
+set fs_game rat
14+
'';
15+
};
16+
rat = pkgs.fetchurl {
17+
url = "https://github.com/rdntcntrl/ratarena_release/releases/download/v0.18.2/z-ratmod-v0.18.2.pk3";
18+
hash = "sha256-CvO2696RgeM/ovI4OSIiGqtljk9YwGDgLHhkLbfB+oU=";
19+
};
20+
sandbox = mkNixPak {
21+
config = {sloth, ...}: {
22+
app.package = app;
23+
gpu.enable = true;
24+
fonts.enable = true;
25+
locale.enable = true;
26+
etc.sslCertificates.enable = true;
27+
bubblewrap = {
28+
network = true;
29+
sockets.pulse = true;
30+
sockets.wayland = true;
31+
bind.rw = [
32+
[
33+
(sloth.mkdir (sloth.concat' sloth.homeDir "/openarena/.openarena/rat"))
34+
(sloth.concat' sloth.homeDir "/.openarena/rat")
35+
]
36+
];
37+
bind.ro = [
38+
[
39+
(toString ../cfg/q3.cfg)
40+
(
41+
sloth.concat'
42+
sloth.homeDir
43+
"/.openarena/rat/autoexec.cfg"
44+
)
45+
]
46+
[
47+
(toString rat)
48+
(
49+
sloth.concat'
50+
sloth.homeDir
51+
"/.openarena/rat/z-ratmod-v0.18.2.pk3"
52+
)
53+
]
54+
];
55+
tmpfs = [
56+
"/tmp"
57+
];
58+
};
59+
};
60+
};
61+
in
62+
sandbox.config.env

0 commit comments

Comments
 (0)