|
|
|
@ -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 {};
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
@ -103,6 +104,7 @@ in {
|
|
|
|
|
"iomfats.cryto.net"
|
|
|
|
|
"castleroland.cryto.net"
|
|
|
|
|
"awesomedude.cryto.net"
|
|
|
|
|
"matrix-rooms.cryto.net"
|
|
|
|
|
])
|
|
|
|
|
(httpsHosts [
|
|
|
|
|
# "haless.cryto.net"
|
|
|
|
@ -111,6 +113,7 @@ in {
|
|
|
|
|
"iomfats.cryto.net"
|
|
|
|
|
"castleroland.cryto.net"
|
|
|
|
|
"awesomedude.cryto.net"
|
|
|
|
|
"matrix-rooms.cryto.net"
|
|
|
|
|
])
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
@ -210,6 +213,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/")
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -272,5 +279,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";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|