mirror of
https://github.com/RGBCube/ncc
synced 2025-08-01 12:37:46 +00:00
cinny: use .patch instead of whole repo
This commit is contained in:
parent
9adc4abe96
commit
0e70f7c08d
3 changed files with 331 additions and 50 deletions
70
hosts/best/cinny/default.nix
Normal file
70
hosts/best/cinny/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ 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 = super.cinny-unwrapped.overrideAttrs (old: {
|
||||
patches = old.patches or [] ++ [
|
||||
./all-styles.patch
|
||||
];
|
||||
});
|
||||
})];
|
||||
|
||||
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;
|
||||
|
||||
rewrite ^/sw.js$ /sw.js break;
|
||||
rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break;
|
||||
|
||||
rewrite ^/public/(.*)$ /public/$1 break;
|
||||
rewrite ^/assets/(.*)$ /assets/$1 break;
|
||||
|
||||
rewrite ^(.+)$ /index.html break;
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue