Skip to content

Commit a400206

Browse files
meme-bingo-web: 1.1.0 → 1.2.0 (#373278)
2 parents c6bcac5 + 4d2bb49 commit a400206

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

nixos/modules/services/web-apps/meme-bingo-web.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ in
3636
default = "http://localhost:41678/";
3737
example = "https://bingo.example.com/";
3838
};
39+
address = mkOption {
40+
description = ''
41+
The address the webserver will bind to.
42+
'';
43+
type = types.str;
44+
default = "localhost";
45+
example = "::";
46+
};
3947
port = mkOption {
4048
description = ''
4149
Port to be used for the web server.
@@ -44,16 +52,22 @@ in
4452
default = 41678;
4553
example = 21035;
4654
};
55+
openFirewall = mkEnableOption ''
56+
Opens the specified port in the firewall.
57+
'';
4758
};
4859
};
4960

5061
config = mkIf cfg.enable {
62+
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
63+
5164
systemd.services.meme-bingo-web = {
5265
description = "A web app for playing meme bingos";
5366
wantedBy = [ "multi-user.target" ];
5467

5568
environment = {
5669
MEME_BINGO_BASE = cfg.baseUrl;
70+
MEME_BINGO_ADDRESS = cfg.address;
5771
MEME_BINGO_PORT = toString cfg.port;
5872
};
5973
path = [ cfg.package ];
@@ -75,6 +89,9 @@ in
7589
InaccessiblePaths = [
7690
"/dev/shm"
7791
"/sys"
92+
"/run/dbus"
93+
"/run/user"
94+
"/run/nscd"
7895
];
7996
LockPersonality = true;
8097
PrivateDevices = true;
@@ -110,6 +127,8 @@ in
110127
RemoveIPC = true;
111128
NoNewPrivileges = true;
112129
MemoryDenyWriteExecute = true;
130+
ExecPaths = [ "/nix/store" ];
131+
NoExecPaths = [ "/" ];
113132
};
114133
};
115134
};

pkgs/by-name/me/meme-bingo-web/package.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
rustPlatform.buildRustPackage rec {
1010
pname = "meme-bingo-web";
11-
version = "1.1.0";
11+
version = "1.2.0";
1212

1313
src = fetchFromGitea {
1414
domain = "codeberg.org";
1515
owner = "annaaurora";
1616
repo = "meme-bingo-web";
1717
rev = "v${version}";
18-
hash = "sha256-AKY0EjeoOnliRN3XSnlCgzCvnWOkZPQz/9QIcr8+hQM=";
18+
hash = "sha256-0ahyyuihpwmAmaBwZv7lNmjuy8UsAm1a9XUhWcYq76w=";
1919
};
2020

2121
useFetchCargoVendor = true;

0 commit comments

Comments
 (0)