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

43 lines
915 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, ... }:
{
2021-02-22 11:45:12 +01:00
imports = [
2021-10-03 00:17:24 +02:00
../../../lib
2021-02-22 11:45:12 +01:00
../../../lib/lxc-container.nix
2019-07-04 00:31:45 +02:00
../../../lib/shared.nix
../../../lib/admins.nix
];
2021-10-02 19:31:56 +02:00
environment.systemPackages = with pkgs; [ mongodb-tools ];
2019-07-04 00:31:45 +02:00
networking = {
hostName = "mongo";
2021-02-22 11:45:12 +01:00
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 = {
2021-02-22 11:45:12 +01:00
allowedTCPPorts = [ 22 27017 ];
2019-07-04 04:23:39 +02:00
enable = true;
};
2019-07-04 00:31:45 +02:00
};
services.openssh = {
enable = true;
};
services.mongodb = {
enable = true;
bind_ip = "0.0.0.0";
dbpath = "/srv/mongodb";
};
system.stateVersion = "19.03"; # Did you read the comment?
}