File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
nixos/modules/services/web-apps
pkgs/by-name/me/meme-bingo-web Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 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.
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 ] ;
7589 InaccessiblePaths = [
7690 "/dev/shm"
7791 "/sys"
92+ "/run/dbus"
93+ "/run/user"
94+ "/run/nscd"
7895 ] ;
7996 LockPersonality = true ;
8097 PrivateDevices = true ;
110127 RemoveIPC = true ;
111128 NoNewPrivileges = true ;
112129 MemoryDenyWriteExecute = true ;
130+ ExecPaths = [ "/nix/store" ] ;
131+ NoExecPaths = [ "/" ] ;
113132 } ;
114133 } ;
115134 } ;
Original file line number Diff line number Diff line change 88
99rustPlatform . 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 ;
You can’t perform that action at this time.
0 commit comments