summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/dcpp/hub.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-12-20 21:24:11 +0100
committerlassulus <lassulus@lassul.us>2021-12-20 21:24:11 +0100
commitd77dd95689a33793c88799ce9f616eb21640f1a8 (patch)
treeb69ae9b1deba72996126a9d6c75008f8696f0d0f /makefu/2configs/dcpp/hub.nix
parent5b71cbae401da33c46401eb09196bedad47dadaa (diff)
parent26e0cca2e22fde8ae150354d949d9cfeb8b1833b (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/dcpp/hub.nix')
-rw-r--r--makefu/2configs/dcpp/hub.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/makefu/2configs/dcpp/hub.nix b/makefu/2configs/dcpp/hub.nix
index b8ca49b7..5a88f5ef 100644
--- a/makefu/2configs/dcpp/hub.nix
+++ b/makefu/2configs/dcpp/hub.nix
@@ -63,8 +63,11 @@ in {
networking.firewall.extraCommands = ''
iptables -A PREROUTING -t nat -i ${ext-if} -p tcp --dport 411 -j REDIRECT --to-port 1511
'';
- systemd.services.uhub.serviceConfig = {
+ systemd.services.uhub-home.serviceConfig = {
PrivateTmp = true;
+ DynamicUser = lib.mkForce false;
+ User = "uhub";
+ WorkingDirectory = uhubDir;
PermissionsStartOnly = true;
ExecStartPre = pkgs.writeDash "uhub-pre" ''
cp -f ${toString <secrets/wildcard.krebsco.de.crt>} ${uhubDir}/uhub.crt
@@ -86,6 +89,7 @@ in {
group = "uhub";
};
users.groups.uhub = {};
+
services.uhub.home = {
enable = true;
enableTLS = true;
@@ -103,13 +107,12 @@ in {
}
{
plugin = "${pkgs.uhub}/plugins/mod_welcome.so";
- settings.motd = "shareit";
- settings.rules = "1. Don't be an asshole";
+ settings.motd = toString (pkgs.writeText "motd" "shareit");
+ settings.rules = toString (pkgs.writeText "rules" "1. Don't be an asshole");
}
{
- plugin = "${pkgs.uhub}/plugins/mod_history.so";
- settings.motd = "shareit";
- settings.rules = "1. Don't be an asshole";
+ plugin = "${pkgs.uhub}/plugins/mod_chat_history.so";
+ settings = {};
}
];
};