1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 03:27:45 +00:00

Compare commits

...

6 commits

6 changed files with 53 additions and 8 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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)"
}

View file

@ -21,6 +21,7 @@ in {
tokei
typos
uutils-coreutils-noprefix
xh
yazi
yt-dlp
;

View file

@ -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}