changed nitter to standalone
This commit is contained in:
parent
687569a09f
commit
0344604a14
1 changed files with 25 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
domain = "t.mc-fucker.cool";
|
domain = "t.mc-fucker.cool";
|
||||||
|
nitter_port = "23145";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nitter = {
|
services.nitter = {
|
||||||
|
|
@ -10,6 +11,7 @@ in
|
||||||
server = {
|
server = {
|
||||||
hostname = domain;
|
hostname = domain;
|
||||||
https = true;
|
https = true;
|
||||||
|
port = (lib.strings.toInt nitter_port);
|
||||||
};
|
};
|
||||||
preferences = {
|
preferences = {
|
||||||
hlsPlayback = true;
|
hlsPlayback = true;
|
||||||
|
|
@ -18,6 +20,28 @@ in
|
||||||
replaceYouTube = "y${domain}";
|
replaceYouTube = "y${domain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
#extraConfig = ''
|
||||||
|
# proxy_set_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||||
|
# proxy_set_header X-Content-Type-Options nosniff;
|
||||||
|
# proxy_set_header X-Frame-Options DENY;
|
||||||
|
# proxy_set_header X-XSS-Protection "1; mode=block";
|
||||||
|
#'';
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${nitter_port}";
|
||||||
|
};
|
||||||
|
|
||||||
|
#"/robots.txt" = {
|
||||||
|
# #return = ''"User-agent: *\nDisallow: /\n"'';
|
||||||
|
# extraConfig = "add_header Content-Type text/plain;";
|
||||||
|
#};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set et ts=2 sw=2 ai:
|
# vim: set et ts=2 sw=2 ai:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue