summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/ergo.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-01-26 17:59:53 +0100
committermakefu <github@syntax-fehler.de>2022-01-26 17:59:53 +0100
commit54aaf5af8ed4d62a2e6645b7ca662ffac310e86c (patch)
treeb3b1a1797791cd8cf763254a3fd88f7d35a2340c /krebs/3modules/ergo.nix
parentef48f536a3e539b215bb004b512e62c2d0f96907 (diff)
parent31fc5a95c735ab3b9b832d407195e422c07cd4c0 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/ergo.nix')
-rw-r--r--krebs/3modules/ergo.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/krebs/3modules/ergo.nix b/krebs/3modules/ergo.nix
index 3153e4cfc..50c5ab628 100644
--- a/krebs/3modules/ergo.nix
+++ b/krebs/3modules/ergo.nix
@@ -2,6 +2,13 @@
options = {
krebs.ergo = {
enable = lib.mkEnableOption "Ergo IRC daemon";
+ openFilesLimit = lib.mkOption {
+ type = lib.types.int;
+ default = 1024;
+ description = ''
+ Maximum number of open files. Limits the clients and server connections.
+ '';
+ };
config = lib.mkOption {
type = (pkgs.formats.json {}).type;
description = ''
@@ -54,8 +61,8 @@
multiclient = {
enabled = true;
allowed-by-default = true;
- always-on = "opt-in";
- auto-away = "opt-in";
+ always-on = "opt-out";
+ auto-away = "opt-out";
};
};
channels = {
@@ -111,13 +118,15 @@
systemd.services.ergo = {
description = "Ergo IRC daemon";
wantedBy = [ "multi-user.target" ];
- reloadIfChanged = true;
+ # reload currently not working as expected
+ # reloadIfChanged = true;
restartTriggers = [ configFile ];
serviceConfig = {
ExecStart = "${pkgs.ergo}/bin/ergo run --conf /etc/ergo.yaml";
ExecReload = "${pkgs.util-linux}/bin/kill -HUP $MAINPID";
DynamicUser = true;
StateDirectory = "ergo";
+ LimitNOFILE = "${toString cfg.openFilesLimit}";
};
};
});