mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
cinny: configure
This commit is contained in:
parent
b97f056b00
commit
78c01df6de
1 changed files with 39 additions and 0 deletions
|
@ -1,8 +1,42 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) flip merge;
|
||||
inherit (lib.strings) toJSON;
|
||||
|
||||
fqdn = "cinny.rgbcu.be";
|
||||
root = pkgs.cinny;
|
||||
|
||||
cinnyConfig = {
|
||||
allowCustomHomeservers = false;
|
||||
homeserverList = [ "rgbcu.be" ];
|
||||
defaultHomeserver = 0;
|
||||
|
||||
hashRouter = {
|
||||
enabled = false;
|
||||
basename = "/";
|
||||
};
|
||||
|
||||
featuredCommunities = {
|
||||
openAsDefault = false;
|
||||
|
||||
servers = [
|
||||
"rgbcu.be"
|
||||
"matrix.org"
|
||||
"privatevoid.net"
|
||||
"notashelf.dev"
|
||||
"outfoxxed.me"
|
||||
];
|
||||
|
||||
spaces = [
|
||||
"#nixos-fallout:privatevoid.net"
|
||||
"#ferronweb:matrix.org"
|
||||
];
|
||||
|
||||
rooms = [
|
||||
"#ferronweb-general:matrix.org"
|
||||
"#ferronweb-development:matrix.org"
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixpkgs.overlays = [(self: super: {
|
||||
cinny-unwrapped = flip self.callPackage {} ({
|
||||
|
@ -62,6 +96,11 @@ in {
|
|||
services.nginx.virtualHosts.${fqdn} = merge config.services.nginx.sslTemplate {
|
||||
inherit root;
|
||||
|
||||
locations."= /config.json".extraConfig = /* nginx */ ''
|
||||
default_type application/json;
|
||||
return 200 '${toJSON cinnyConfig}';
|
||||
'';
|
||||
|
||||
extraConfig = /* nginx */ ''
|
||||
rewrite ^/config.json$ /config.json break;
|
||||
rewrite ^/manifest.json$ /manifest.json break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue