summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/ergo.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-01-09 00:43:23 +0100
committerlassulus <lassulus@lassul.us>2022-01-09 00:43:23 +0100
commit545b424ecbd69df2b507f827b26ee6e38f1648c3 (patch)
tree3ec14efb568d219ce4ad31513306049887eea67c /krebs/3modules/ergo.nix
parentdbc238752043078de95aac231d31cc5fd88a329f (diff)
krebs: use ergo instead of solanum everywhere
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}";
};
};
});