summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-01-05 14:12:30 -0500
committerBen Sima <ben@bsima.me>2022-01-05 14:12:30 -0500
commit354af91cdaded78f89d1879f229ff1fee4e96869 (patch)
treedefe1b1a1322dcff1e948a24acbf6d076dd69405
parent9a10f244693f4d0c17f4e758e64dbdc014299c9f (diff)
Small infra updates
- notes about dovecot and ssl certs - disable matrix because its not setup properly and i don't use it - format some stuff - fix path to git repos
-rw-r--r--Biz/Cloud/Chat.nix2
-rw-r--r--Biz/Cloud/Mail.nix10
-rw-r--r--Biz/Cloud/Web.nix2
-rwxr-xr-xBiz/Dragons/get-examples.sh32
4 files changed, 34 insertions, 12 deletions
diff --git a/Biz/Cloud/Chat.nix b/Biz/Cloud/Chat.nix
index 6f8ac3a..0c29f3f 100644
--- a/Biz/Cloud/Chat.nix
+++ b/Biz/Cloud/Chat.nix
@@ -21,7 +21,7 @@ in {
# https://nixos.org/nixos/manual/index.html#module-services-matrix
#
services.matrix-synapse = {
- enable = true;
+ enable = false;
server_name = config.networking.domain;
registration_shared_secret = "AkGRWSQLga3RoKRFnHhKoeCEIeZzu31y4TRzMRkMyRbBnETkVTSxilf24qySLzQn";
listeners = [
diff --git a/Biz/Cloud/Mail.nix b/Biz/Cloud/Mail.nix
index ecb64ff..4ff3fd6 100644
--- a/Biz/Cloud/Mail.nix
+++ b/Biz/Cloud/Mail.nix
@@ -1,5 +1,15 @@
{ ... }:
+/*
+
+Known issues:
+
+- when the acme cert gets refreshed, you need to manually restart dovecot
+- when restarting dovecot, it might hang, in that case do:
+ systemctl --job-mode=ignore-dependencies restart dovecot2 postfix
+
+*/
+
{
mailserver = {
enable = true;
diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix
index 5d951e8..08e2267 100644
--- a/Biz/Cloud/Web.nix
+++ b/Biz/Cloud/Web.nix
@@ -99,7 +99,7 @@ in
# these depend on order, scan-path must come last
(builtins.toFile "cgitrc" ''
strict-export=git-daemon-export-ok
- scan-path=/srv/git/repositories
+ scan-path=/var/git/repositories
'')
];
};
diff --git a/Biz/Dragons/get-examples.sh b/Biz/Dragons/get-examples.sh
index 35f024f..c7e4bc7 100755
--- a/Biz/Dragons/get-examples.sh
+++ b/Biz/Dragons/get-examples.sh
@@ -1,14 +1,26 @@
#!/usr/bin/env bash
-if [ "$#" == "0" ]
-then
+#
+##
+ if [ "$#" == "0" ]
+ then
echo "usage: $(basename $0) <cookie>"
echo "copy the cookie from the browser dev console"
exit 1
-fi
-cookie="$1"
-curl 'https://dragons.dev/analysis' \
- -d "owner=github&repo=training-kit" \
- -X POST \
- -H 'Content-Type: application/x-www-form-urlencoded' \
- -H "Cookie: JWT-Cookie=$cookie" \
- --compressed
+ else
+ cookie="$1"
+ curl 'https://dragons.dev/analysis' \
+ -d "owner=github&repo=training-kit" \
+ -X POST \
+ -H 'Content-Type: application/x-www-form-urlencoded' \
+ -H "Cookie: JWT-Cookie=$cookie" \
+ --silent \
+ --compressed
+ if [[ $? -eq 0 ]]; then
+ echo done
+ exit 0
+ else
+ echo error
+ exit 1
+ fi
+ fi
+##