setup blog
This commit is contained in:
		
							parent
							
								
									b6352e1b51
								
							
						
					
					
						commit
						7ed0ad0d91
					
				
					 4 changed files with 27 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -5,5 +5,6 @@
 | 
			
		|||
    ./traefik
 | 
			
		||||
    ./borgbackup.nix
 | 
			
		||||
    ./mpd.nix
 | 
			
		||||
    ./httpd.nix
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								nixos/viridian/services/httpd.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								nixos/viridian/services/httpd.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
{ ... }:
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  services.httpd = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    virtualHosts."sajenim.dev" = {
 | 
			
		||||
      documentRoot = "/var/www/sajenim.dev";
 | 
			
		||||
      listen = [{
 | 
			
		||||
        ip = "192.168.1.102";
 | 
			
		||||
        port = 5624;
 | 
			
		||||
      }];
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  environment.persistence."/persist" = {
 | 
			
		||||
    directories = [
 | 
			
		||||
      "/var/www/sajenim.dev"
 | 
			
		||||
    ];
 | 
			
		||||
    hideMounts = true;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2,11 +2,15 @@
 | 
			
		|||
 | 
			
		||||
{ 
 | 
			
		||||
  services.traefik.dynamicConfigOptions.http.routers = {
 | 
			
		||||
    blog = {
 | 
			
		||||
      rule = "Host(`sajenim.dev`)";
 | 
			
		||||
      entryPoints = [
 | 
			
		||||
        "websecure"
 | 
			
		||||
      ];
 | 
			
		||||
      middlewares = [
 | 
			
		||||
        "geoblock"
 | 
			
		||||
      ];
 | 
			
		||||
      service = "blog";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    homarr = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,8 @@
 | 
			
		|||
 | 
			
		||||
{
 | 
			
		||||
  services.traefik.dynamicConfigOptions.http.services = {
 | 
			
		||||
    blog.loadBalancer.servers = [
 | 
			
		||||
      { url = "http://192.168.1.102:5624"; }
 | 
			
		||||
    ];
 | 
			
		||||
    homarr.loadBalancer.servers = [
 | 
			
		||||
      { url = "http://192.168.1.102:7575"; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue