summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-rw-r--r--custom/simp_le.nix18
-rw-r--r--custom/ymir-nginx.nix5
2 files changed, 23 insertions, 0 deletions
diff --git a/custom/simp_le.nix b/custom/simp_le.nix
new file mode 100644
index 00000000..ed85fc51
--- /dev/null
+++ b/custom/simp_le.nix
@@ -0,0 +1,18 @@
1{ stdenv, simp_le
2, util-linux
3}:
4dir:
5domain:
6
7let
8 script = bulitins.toFile "cert.sh" ''
9 cd $dir
10 ${simp_le}/bin/simp_le -d ${domain}:/srv/www/acme/${domain}/ \
11 --email "phikeebaogobaegh@141.li" \
12 -f account_key.json \
13 -f cert.pem \
14 -f fullchain.pem \
15 -f key.pem
16 '';
17in
18 "${stdenv}/bin/bash ${script} ${dir} ${domain} > ${util-linux}/bin/logger -p auth.info"
diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix
index 32707ee6..4c3880ce 100644
--- a/custom/ymir-nginx.nix
+++ b/custom/ymir-nginx.nix
@@ -117,9 +117,14 @@ in {
117 117
118 server { 118 server {
119 listen *:80; 119 listen *:80;
120 listen *:443 ssl;
120 listen [::]:80; 121 listen [::]:80;
122 listen [::]:443 ssl;
121 server_name git.yggdrasil.li www.git.yggdrasil.li; 123 server_name git.yggdrasil.li www.git.yggdrasil.li;
122 124
125 ssl_certificate /etc/nginx/ssl/$server_name/fullchain.pem;
126 ssl_certificate_key /etc/nginx/ssl/$server_name/privkey.pem;
127
123 root ${pkgs.cgit}/cgit; 128 root ${pkgs.cgit}/cgit;
124 129
125 try_files $uri @cgit; 130 try_files $uri @cgit;