mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 03:27:45 +00:00
Compare commits
6 commits
b97f056b00
...
1c2100eb81
Author | SHA1 | Date | |
---|---|---|---|
1c2100eb81 | |||
816ec26d73 | |||
f14c7ccbb3 | |||
65301620ce | |||
9c581803d3 | |||
78c01df6de |
6 changed files with 53 additions and 8 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;
|
||||
|
|
|
@ -63,11 +63,15 @@ in {
|
|||
enable_metrics = true;
|
||||
metrics_flags.known_servers = true;
|
||||
|
||||
allow_public_rooms_without_auth = true;
|
||||
allow_public_rooms_over_federation = true;
|
||||
|
||||
url_preview_enabled = true;
|
||||
dynamic_thumbnails = true;
|
||||
|
||||
enable_registration = false; # Setting it explicitly just in case.
|
||||
expire_access_token = true;
|
||||
|
||||
delete_stale_devices_after = "30d";
|
||||
|
||||
# Trusting Matrix.org.
|
||||
suppress_key_server_warning = true;
|
||||
|
|
|
@ -422,8 +422,3 @@ $env.config.keybindings = [
|
|||
event: { send: enter }
|
||||
}
|
||||
]
|
||||
|
||||
$env.LS_COLORS = (open ~/.config/nushell/ls_colors.txt)
|
||||
source ~/.config/nushell/zoxide.nu
|
||||
|
||||
source ~/.config/nushell/starship.nu
|
||||
|
|
|
@ -7,6 +7,12 @@ $env.ENV_CONVERSIONS.PATH = {
|
|||
}
|
||||
}
|
||||
|
||||
$env.LS_COLORS = (open ~/.config/nushell/ls_colors.txt)
|
||||
|
||||
source ~/.config/nushell/zoxide.nu
|
||||
|
||||
source ~/.config/nushell/starship.nu
|
||||
|
||||
def copy []: string -> nothing {
|
||||
print --no-newline $"(ansi osc)52;c;($in | encode base64)(ansi st)"
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ in {
|
|||
tokei
|
||||
typos
|
||||
uutils-coreutils-noprefix
|
||||
xh
|
||||
yazi
|
||||
yt-dlp
|
||||
;
|
||||
|
|
|
@ -64,11 +64,11 @@ in {
|
|||
}
|
||||
|
||||
map $http_origin $allow_origin {
|
||||
~^https://.+\.${domain}$ $http_origin;
|
||||
~^https://(?:.+\.)?${domain}$ $http_origin;
|
||||
}
|
||||
|
||||
map $http_origin $allow_methods {
|
||||
~^https://.+\.${domain}$ "GET, HEAD, OPTIONS";
|
||||
~^https://(?:.+\.)?${domain}$ "CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, TRACE";
|
||||
}
|
||||
|
||||
${config.services.nginx.headers}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue