blob: 81473a20d8b5e63a1f72a3b7c832f681f01cffcb [file] [log] [blame]
Skyler Grey1e2187f2023-03-03 22:45:10 +00001{ config, pkgs, ... }: {
Skyler Grey4f3e6062023-03-04 01:29:29 +00002 environment.systemPackages = [ pkgs.mongosh pkgs.mongodb-tools ];
Skyler Grey1e2187f2023-03-03 22:45:10 +00003 services.mongodb.enable = true;
4 services.mongodb.enableAuth = true;
Skyler Grey4f3e6062023-03-04 01:29:29 +00005 services.mongodb.bind_ip = "0.0.0.0";
6 services.mongodb.initialRootPassword = "changeme";
Skyler Grey1e2187f2023-03-03 22:45:10 +00007 services.mongodb.package = pkgs.mongodb-6_0;
Skyler Grey629d2bb2023-05-12 00:28:27 +00008
Skyler Greyfe1740c2023-10-21 01:24:18 +00009 networking.firewall.extraCommands =
10 "iptables -A INPUT -s 192.168.0.4 -p tcp --dport 27017 -j ACCEPT";
Skyler Grey1e2187f2023-03-03 22:45:10 +000011}