meme-bingo-web: 1.1.0 → 1.2.0 (#373278)
This commit is contained in:
@@ -36,6 +36,14 @@ in
|
||||
default = "http://localhost:41678/";
|
||||
example = "https://bingo.example.com/";
|
||||
};
|
||||
address = mkOption {
|
||||
description = ''
|
||||
The address the webserver will bind to.
|
||||
'';
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
example = "::";
|
||||
};
|
||||
port = mkOption {
|
||||
description = ''
|
||||
Port to be used for the web server.
|
||||
@@ -44,16 +52,22 @@ in
|
||||
default = 41678;
|
||||
example = 21035;
|
||||
};
|
||||
openFirewall = mkEnableOption ''
|
||||
Opens the specified port in the firewall.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
|
||||
|
||||
systemd.services.meme-bingo-web = {
|
||||
description = "A web app for playing meme bingos";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
environment = {
|
||||
MEME_BINGO_BASE = cfg.baseUrl;
|
||||
MEME_BINGO_ADDRESS = cfg.address;
|
||||
MEME_BINGO_PORT = toString cfg.port;
|
||||
};
|
||||
path = [ cfg.package ];
|
||||
@@ -75,6 +89,9 @@ in
|
||||
InaccessiblePaths = [
|
||||
"/dev/shm"
|
||||
"/sys"
|
||||
"/run/dbus"
|
||||
"/run/user"
|
||||
"/run/nscd"
|
||||
];
|
||||
LockPersonality = true;
|
||||
PrivateDevices = true;
|
||||
@@ -110,6 +127,8 @@ in
|
||||
RemoveIPC = true;
|
||||
NoNewPrivileges = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
ExecPaths = [ "/nix/store" ];
|
||||
NoExecPaths = [ "/" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "meme-bingo-web";
|
||||
version = "1.1.0";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "annaaurora";
|
||||
repo = "meme-bingo-web";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-AKY0EjeoOnliRN3XSnlCgzCvnWOkZPQz/9QIcr8+hQM=";
|
||||
hash = "sha256-0ahyyuihpwmAmaBwZv7lNmjuy8UsAm1a9XUhWcYq76w=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
Reference in New Issue
Block a user