Merge branch 'master' of git.cryto.net:joepie91/morph-rc
This commit is contained in:
commit
4337e920ff
|
@ -8,6 +8,7 @@ let
|
|||
nodeApplication = self.callPackage ./lib/node-application.nix {};
|
||||
unpack = self.callPackage ./lib/unpack.nix {};
|
||||
mobileProxy = self.callPackage ./packages/mobile-proxy { configFile = null; };
|
||||
matrixRooms = self.callPackage ./packages/matrix-rooms {};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
@ -106,6 +107,7 @@ in {
|
|||
"iomfats.cryto.net"
|
||||
"castleroland.cryto.net"
|
||||
"awesomedude.cryto.net"
|
||||
"matrix-rooms.cryto.net"
|
||||
])
|
||||
(httpsHosts [
|
||||
# "haless.cryto.net"
|
||||
|
@ -114,6 +116,7 @@ in {
|
|||
"iomfats.cryto.net"
|
||||
"castleroland.cryto.net"
|
||||
"awesomedude.cryto.net"
|
||||
"matrix-rooms.cryto.net"
|
||||
])
|
||||
];
|
||||
|
||||
|
@ -128,6 +131,10 @@ in {
|
|||
return 404;
|
||||
'';
|
||||
};
|
||||
"modular-matrix.cryto.net" = lib.mkMerge [
|
||||
(nginxPresets.letsEncrypt)
|
||||
{ root = ./sources/modular-matrix; }
|
||||
];
|
||||
"haless.cryto.net" = lib.mkMerge [
|
||||
(nginxPresets.letsEncrypt)
|
||||
{
|
||||
|
@ -209,6 +216,10 @@ in {
|
|||
(nginxPresets.letsEncrypt)
|
||||
(nginxPresets.reverseProxy "http://127.0.0.1:3000/")
|
||||
];
|
||||
"matrix-rooms.cryto.net" = lib.mkMerge [
|
||||
(nginxPresets.letsEncrypt)
|
||||
(nginxPresets.reverseProxy "http://127.0.0.1:3842/")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -271,5 +282,35 @@ in {
|
|||
HOME = "/tmp/mobile-proxy-home";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.matrix-rooms = {
|
||||
description = "mobile-proxy Service User";
|
||||
};
|
||||
|
||||
systemd.services.matrix-rooms = let
|
||||
package = pkgs.cryto.matrixRooms;
|
||||
in {
|
||||
description = "Matrix Room List Viewer";
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network.target"];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${package}/bin/matrix-room-list-viewer"; /* FIXME: Change binary name in its package.json at some point */
|
||||
User = "matrix-rooms";
|
||||
Restart = "on-failure";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
|
||||
# FIXME: Is a fake homes necessary for this application?
|
||||
preStart = ''
|
||||
mkdir -m 0700 -p /tmp/matrix-rooms-home
|
||||
chown matrix-rooms /tmp/matrix-rooms-home
|
||||
'';
|
||||
|
||||
environment = {
|
||||
HOME = "/tmp/matrix-rooms-home";
|
||||
NODE_ENV = "production";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
18
configuration/packages/matrix-rooms/default.nix
Normal file
18
configuration/packages/matrix-rooms/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.cryto.nodeApplication {
|
||||
name = "matrix-rooms";
|
||||
source = pkgs.stdenv.mkDerivation {
|
||||
name = "matrix-rooms-application";
|
||||
src = pkgs.cryto.fetchFromCrytoGit {
|
||||
owner = "joepie91";
|
||||
repo = "matrix-room-list-viewer";
|
||||
rev = "5912b79024cba33ee7e291f325d0286b8304af99";
|
||||
sha256 = "199in3m3vll0i0qsz869x2q6zqn1xxgyvia3fxnmschvfmybbf8r";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
tar -xzvf $src -C $out
|
||||
'';
|
||||
};
|
||||
}
|
23
configuration/sources/modular-matrix/index.html
Normal file
23
configuration/sources/modular-matrix/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Modular Matrix</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Modular Matrix</h1>
|
||||
<p>
|
||||
<em><strong>NOTE:</strong> If you're looking for the Matrix website, go to <a href="https://matrix.org">Matrix.org</a>. If you're looking for the Matrix hosting service, go to <a href="https://modular.im/">Modular.im</a>. This project is not affiliated with either of those two.</em>
|
||||
</p>
|
||||
<p>
|
||||
Hi! This will eventually be the website for Modular Matrix, a project to build a modular JavaScript SDK for the <a href="https://matrix.org">Matrix protocol</a>, as an alternative to the <code>matrix-js-sdk</code>.
|
||||
</p>
|
||||
<p>
|
||||
Currently there's not really anything here yet, though you can have a look at the <a href="https://www.npmjs.com/org/modular-matrix?tab=packages">already-published packages</a> if you're curious about how things are going.
|
||||
</p>
|
||||
<p>
|
||||
You can contact me on Matrix as <a href="https://matrix.to/#/@joepie91:pixie.town">@joepie91:pixie.town</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue