summaryrefslogtreecommitdiffstats
path: root/2configs/dcpp
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-12-05 14:04:25 +0100
committermakefu <github@syntax-fehler.de>2021-12-05 14:04:33 +0100
commit7b48c923fd1e303ad3124ad21bd00a162c003a04 (patch)
tree5803c51e8786c628978fa07714fdaea5231d74f3 /2configs/dcpp
parent738429a9420c27568aab346e2d7452822fbf75fb (diff)
ma uhub: move to new configuration, add more groups to users
Diffstat (limited to '2configs/dcpp')
-rw-r--r--2configs/dcpp/hub.nix45
1 files changed, 24 insertions, 21 deletions
diff --git a/2configs/dcpp/hub.nix b/2configs/dcpp/hub.nix
index fce607d5e..b8ca49b74 100644
--- a/2configs/dcpp/hub.nix
+++ b/2configs/dcpp/hub.nix
@@ -39,7 +39,9 @@ in {
home = stateDir;
isSystemUser = true;
createHome = true;
+ group = ddclientUser;
};
+ users.groups.${ddclientUser} = {};
systemd.services = {
ddclient-nsupdate-uhub = {
@@ -86,29 +88,30 @@ in {
users.groups.uhub = {};
services.uhub.home = {
enable = true;
- port = 1511;
enableTLS = true;
- hubConfig = ''
- hub_name = "krebshub"
- tls_certificate = ${uhubDir}/uhub.crt
- tls_private_key = ${uhubDir}/uhub.key
- registered_users_only = true
- '';
- plugins = {
- welcome = {
- enable = true;
- motd = "shareit";
- rules = "1. Don't be an asshole";
- };
- history = {
- enable = true;
- };
- authSqlite = {
- enable = true;
- file = "${uhubDir}/uhub.sql";
- };
-
+ settings = {
+ server_port = 1511;
+ hub_name = "krebshub";
+ tls_certificate = "${uhubDir}/uhub.crt";
+ tls_private_key = "${uhubDir}/uhub.key";
+ registered_users_only = true;
};
+ plugins = [
+ {
+ plugin = "${pkgs.uhub}/plugins/mod_auth_sqlite.so";
+ settings.file = "${uhubDir}/uhub.sql";
+ }
+ {
+ plugin = "${pkgs.uhub}/plugins/mod_welcome.so";
+ settings.motd = "shareit";
+ settings.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";
+ }
+ ];
};
networking.firewall.allowedTCPPorts = [ 411 1511 ];
}