nix-config/hosts/containers/mongo/configuration.nix

46 lines
950 B
Nix
Raw Normal View History

2019-07-04 00:31:45 +02:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
imports =
[ ../../../lib/lxc-container.nix
../../../lib/shared.nix
../../../lib/admins.nix
];
environment.systemPackages = with pkgs; [
vim
2019-08-15 18:12:55 +02:00
mongodb-tools
2019-07-04 00:31:45 +02:00
];
networking = {
hostName = "mongo";
interfaces.eth0.ipv4.addresses = [ { address = "172.20.73.21"; prefixLength = 26; } ];
defaultGateway = "172.20.73.1";
2019-07-04 04:23:39 +02:00
firewall = {
allowedTCPPorts = [
22
27017
];
enable = true;
};
2019-07-04 00:31:45 +02:00
};
services.openssh = {
enable = true;
permitRootLogin = "yes";
};
services.mongodb = {
enable = true;
bind_ip = "0.0.0.0";
dbpath = "/srv/mongodb";
};
system.stateVersion = "19.03"; # Did you read the comment?
}