summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParthiv Seetharaman <pachum99@myrdd.info>2022-01-18 08:36:57 -0800
committerParthiv Seetharaman <pachum99@myrdd.info>2022-01-18 08:37:19 -0800
commitfdf79bfbb92748c068df8d54d99f62289edfd4d4 (patch)
tree0d3896af01e5cd118d258fb86ce72542036429c7
parent8c05a809d70aeeb6c6e23d405ba693040ad00730 (diff)
fixup systemd service attribute strings
implement suggestions from @zopieux
-rw-r--r--README.md4
-rw-r--r--module/default.nix6
2 files changed, 4 insertions, 6 deletions
diff --git a/README.md b/README.md
index 39e7294..d75517b 100644
--- a/README.md
+++ b/README.md
@@ -47,14 +47,14 @@ options to
In the preStart script of each appservice, a registration file is automatically
generated with random strings for the important tokens and any data passed
to the `registrationData` option. This file will be available to your `settings`
-and `startScript` as `$REGISTRATION_FILE`.
+and `startupScript` as `$REGISTRATION_FILE`.
After this, a configuration file is generated based on the `settings` passed
to the appservice. Environment variables are also substuted in with envsubst,
so the `environmentFile` option can be used to pass secrets for the appservice.
### Environment Variables
-These variables are available in your `startScript` and `settings`(substituted in):
+These variables are available in your `startupScript` and `settings`(substituted in):
- $REGISTRATION_FILE => The registration file generated automatically
- $SETTINGS_FILE => Settings file generated
- $DIR => Data directory of the appservice
diff --git a/module/default.nix b/module/default.nix
index a368365..f57284d 100644
--- a/module/default.nix
+++ b/module/default.nix
@@ -61,9 +61,7 @@ let
chmod 640 ${settingsFile}
'';
- script = ''
- ${startupScript}
- '';
+ script = startupScript;
serviceConfig = {
Type = "simple";
@@ -79,7 +77,7 @@ let
User = "matrix-as-${name}";
Group = "matrix-as-${name}";
WorkingDirectory = dataDir;
- StateDirectory = "${baseNameOf dataDir}";
+ StateDirectory = baseNameOf dataDir;
StateDirectoryMode = "0750";
UMask = 0027;
} // opts.serviceConfig;