Skyler Grey | 1e2187f | 2023-03-03 22:45:10 +0000 | [diff] [blame] | 1 | { config, pkgs, ... }: { |
Skyler Grey | 4f3e606 | 2023-03-04 01:29:29 +0000 | [diff] [blame] | 2 | environment.systemPackages = [ pkgs.mongosh pkgs.mongodb-tools ]; |
Skyler Grey | 1e2187f | 2023-03-03 22:45:10 +0000 | [diff] [blame] | 3 | services.mongodb.enable = true; |
| 4 | services.mongodb.enableAuth = true; |
Skyler Grey | 4f3e606 | 2023-03-04 01:29:29 +0000 | [diff] [blame] | 5 | services.mongodb.bind_ip = "0.0.0.0"; |
| 6 | services.mongodb.initialRootPassword = "changeme"; |
Skyler Grey | 1e2187f | 2023-03-03 22:45:10 +0000 | [diff] [blame] | 7 | services.mongodb.package = pkgs.mongodb-6_0; |
Skyler Grey | 629d2bb | 2023-05-12 00:28:27 +0000 | [diff] [blame] | 8 | |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame^] | 9 | networking.firewall.extraCommands = |
| 10 | "iptables -A INPUT -s 192.168.0.4 -p tcp --dport 27017 -j ACCEPT"; |
Skyler Grey | 1e2187f | 2023-03-03 22:45:10 +0000 | [diff] [blame] | 11 | } |