diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-07 21:23:17 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-07 21:23:17 +0200 |
commit | aba0092ea50e38c73ab87e7c659e9162596fc021 (patch) | |
tree | cca9381e70e715dcf41a2d1b1edc6b821a55c559 | |
parent | More container stuff (diff) | |
download | Rory-Open-Architecture-aba0092ea50e38c73ab87e7c659e9162596fc021.tar.xz |
More container stuff
-rwxr-xr-x | host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix index aa64814..d100f4d 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix @@ -14,6 +14,24 @@ allow_registration = false; }; }; + + systemd.services.matrix-conduit-reg-token = { + description = "Random registration token for Conduit."; + before = ["conduit.service"]; # So the registration can be used by Conduit. + + script = '' + reg_token=`cat /dev/urandom | tr -dc a-zA-Z0-9 | fold -w 256 | head -n 1` + mkdir -p /run/systemd/system/conduit.service.d + echo $reg_token > /run/conduit-registration-token + echo Environment=\"CONDUIT_REGISTRATION_TOKEN=${reg_token}\" > /run/systemd/system/conduit.service.d/override.conf + systemctl daemon-reload + systemctl try-restart conduit.service''; + serviceConfig = { + User = "root"; + Group = "root"; + }; + }; + system.stateVersion = "22.11"; # DO NOT EDIT! } |