dotfiles/roles/quassel.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2016-01-28 02:59:31 +01:00
{config, pkgs, lib, ...}:
{
containers.quassel = {
config = { config, pkgs, ... }: {
2016-12-25 00:14:47 +01:00
services.postgresql = {
enable = true;
package = pkgs.postgresql94;
extraConfig = ''
max_connections = 10
shared_buffers = 1GB
effective_cache_size = 4GB
work_mem = 50MB
maintenance_work_mem = 100MB
'';
};
2016-01-28 02:59:31 +01:00
services.quassel = {
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/networking/quassel.nix
enable = true;
2016-04-30 14:03:45 +02:00
interfaces = ["0.0.0.0"];
2016-01-28 02:59:31 +01:00
};
environment.systemPackages = [
2017-04-08 23:14:57 +02:00
pkgs.quasselDaemon
2016-01-28 02:59:31 +01:00
];
networking.firewall.allowedTCPPorts = [4242];
};
privateNetwork = true;
hostAddress = "192.168.125.1";
localAddress = "192.168.125.11";
};
# give the containers networking
networking.nat = {
enable = true;
internalInterfaces = ["ve-+"];
externalInterface = "enp2s0";
forwardPorts = [
{ sourcePort = 4242; destination = "192.168.125.11:4242"; }
];
};
networking.firewall.allowedTCPPorts = [4242];
}