Setup mail server and restructure some things
This commit is contained in:
		
					parent
					
						
							
								fa3db3bad6
							
						
					
				
			
			
				commit
				
					
						4a802ab44d
					
				
			
		
					 90 changed files with 512 additions and 66 deletions
				
			
		
							
								
								
									
										17
									
								
								config/hosts/nitter/configuration.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								config/hosts/nitter/configuration.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
  boot.loader.grub = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    device = "/dev/vda";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  networking = {
 | 
			
		||||
    hostName = "nitter";
 | 
			
		||||
    firewall = {
 | 
			
		||||
      enable = true;
 | 
			
		||||
      allowedTCPPorts = [ 8443 ];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  system.stateVersion = "23.05";
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								config/hosts/nitter/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								config/hosts/nitter/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
  imports = [
 | 
			
		||||
    ./configuration.nix
 | 
			
		||||
    ./nginx.nix
 | 
			
		||||
    ./nitter.nix
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								config/hosts/nitter/nginx.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								config/hosts/nitter/nginx.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
{ config, ... }:
 | 
			
		||||
{
 | 
			
		||||
  services.nginx = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    virtualHosts."birdsite.nekover.se" = {
 | 
			
		||||
      forceSSL = true;
 | 
			
		||||
      enableACME = true;
 | 
			
		||||
      locations."/robots.txt" = {
 | 
			
		||||
        return = "200 \"User-agent: *\\nDisallow: /\\n\"";
 | 
			
		||||
      };
 | 
			
		||||
      locations."/" = {
 | 
			
		||||
        proxyPass = "http://${config.services.nitter.server.address}:${builtins.toString config.services.nitter.server.port}";
 | 
			
		||||
        proxyWebsockets = true;
 | 
			
		||||
      };
 | 
			
		||||
      extraConfig = ''
 | 
			
		||||
        listen 0.0.0.0:8443 http2 ssl proxy_protocol;
 | 
			
		||||
 | 
			
		||||
        set_real_ip_from 10.202.41.100;
 | 
			
		||||
        real_ip_header proxy_protocol;
 | 
			
		||||
      '';
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										21
									
								
								config/hosts/nitter/nitter.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								config/hosts/nitter/nitter.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
{
 | 
			
		||||
  services.nitter = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
 | 
			
		||||
    server = {
 | 
			
		||||
      title = "Birdsite";
 | 
			
		||||
      https = true;
 | 
			
		||||
      address = "127.0.0.1";
 | 
			
		||||
      port = 8080;
 | 
			
		||||
      hostname = "birdsite.nekover.se";
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
    preferences = {
 | 
			
		||||
      theme = "Mastodon";
 | 
			
		||||
      replaceTwitter = "birdsite.nekover.se";
 | 
			
		||||
      infiniteScroll = true;
 | 
			
		||||
      hlsPlayback = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue