Initial commit

This commit is contained in:
yuri 2023-07-10 15:30:51 +02:00
commit 10abd93889
20 changed files with 395 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
boot.loader.grub = {
enable = true;
version = 2;
device = "/dev/vda";
};
networking = {
hostName = "nitter";
firewall.enable = false;
};
system.stateVersion = "23.05";
}

8
hosts/nitter/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./configuration.nix
./nginx.nix
./nitter.nix
];
}

29
hosts/nitter/nginx.nix Normal file
View file

@ -0,0 +1,29 @@
{ ... }:
{
services.nginx = {
enable = true;
enableReload = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"nixos-nitter.vs.grzb.de" = {
locations."/robots.txt" = {
return = "200 \"User-agent: *\\nDisallow: /\\n\"";
};
locations."/" = {
proxyPass = "http://localhost:8080";
extraConfig =
"proxy_http_version 1.1;" +
"proxy_set_header Upgrade $http_upgrade;" +
"proxy_set_header Connection \"upgrade\";" +
"proxy_set_header Host $host;"
;
};
};
};
};
}

19
hosts/nitter/nitter.nix Normal file
View file

@ -0,0 +1,19 @@
{ ... }:
{
services.nitter = {
enable = true;
server = {
title = "Birdsite";
https = true;
address = "0.0.0.0";
port = 8080;
};
preferences = {
theme = "Mastodon";
replaceTwitter = "birdsite.nekover.se";
infiniteScroll = true;
};
};
}