Remilia: more updates
services: remove redundant nginx confs and some very minor changes
This commit is contained in:
		
							
								
								
									
										16
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								flake.nix
									
									
									
									
									
								
							@@ -17,8 +17,9 @@
 | 
				
			|||||||
    rust.url = github:oxalica/rust-overlay;
 | 
					    rust.url = github:oxalica/rust-overlay;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  outputs = inputs@{self, nixpkgs, stable, master, old, ... }:
 | 
					  outputs = inputs@{ self, nixpkgs, stable, master, old, ... }:
 | 
				
			||||||
  inputs.utils.lib.eachDefaultSystem (system: 
 | 
					    inputs.utils.lib.eachDefaultSystem
 | 
				
			||||||
 | 
					      (system:
 | 
				
			||||||
        let
 | 
					        let
 | 
				
			||||||
          mkPkgs = channel: system: import channel {
 | 
					          mkPkgs = channel: system: import channel {
 | 
				
			||||||
            inherit system;
 | 
					            inherit system;
 | 
				
			||||||
@@ -44,8 +45,8 @@
 | 
				
			|||||||
              inputs.rust.overlay
 | 
					              inputs.rust.overlay
 | 
				
			||||||
              inputs.emacs.overlay
 | 
					              inputs.emacs.overlay
 | 
				
			||||||
              channels
 | 
					              channels
 | 
				
			||||||
        ( _: _: {
 | 
					              (_: _: {
 | 
				
			||||||
          nbfc-linux=inputs.nbfc.defaultPackage.${system};
 | 
					                nbfc-linux = inputs.nbfc.defaultPackage.${system};
 | 
				
			||||||
                games = inputs.nix-gaming.packages.${system};
 | 
					                games = inputs.nix-gaming.packages.${system};
 | 
				
			||||||
              })
 | 
					              })
 | 
				
			||||||
            ];
 | 
					            ];
 | 
				
			||||||
@@ -69,7 +70,7 @@
 | 
				
			|||||||
          ./modules/min-pkgs.nix
 | 
					          ./modules/min-pkgs.nix
 | 
				
			||||||
          ./modules/min-stuff.nix
 | 
					          ./modules/min-stuff.nix
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
    builder = [ ./modules/builder.nix ];
 | 
					        builders = [ ./modules/x86builder.nix ];
 | 
				
			||||||
      in
 | 
					      in
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        hm-configs = {
 | 
					        hm-configs = {
 | 
				
			||||||
@@ -134,8 +135,9 @@
 | 
				
			|||||||
            ]
 | 
					            ]
 | 
				
			||||||
            ++ commonModules
 | 
					            ++ commonModules
 | 
				
			||||||
            ++ serverModules
 | 
					            ++ serverModules
 | 
				
			||||||
        ++ builder;
 | 
					            ++ builders;
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
  });
 | 
					      }
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,87 +16,63 @@
 | 
				
			|||||||
      package = (pkgs.nginx.overrideAttrs (oa: {
 | 
					      package = (pkgs.nginx.overrideAttrs (oa: {
 | 
				
			||||||
        configureFlags = oa.configureFlags ++ [ "--with-mail" "--with-mail_ssl_module" ];
 | 
					        configureFlags = oa.configureFlags ++ [ "--with-mail" "--with-mail_ssl_module" ];
 | 
				
			||||||
      }));
 | 
					      }));
 | 
				
			||||||
      virtualHosts = {
 | 
					      virtualHosts =
 | 
				
			||||||
 | 
					        let
 | 
				
			||||||
 | 
					          genericHttpRProxy = { addr, ssl ? true, conf ? "" }: {
 | 
				
			||||||
 | 
					            addSSL = true;
 | 
				
			||||||
 | 
					            enableACME = ssl;
 | 
				
			||||||
 | 
					            locations."/" = {
 | 
				
			||||||
 | 
					              proxyPass = toString addr;
 | 
				
			||||||
 | 
					              extraConfig = ''
 | 
				
			||||||
 | 
					                proxy_set_header Host $host;
 | 
				
			||||||
 | 
					              '' + conf;
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        in
 | 
				
			||||||
 | 
					        builtins.listToAttrs [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "vault.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy { addr = "https://10.55.0.2:8800"; };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "consul.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy { addr = "https://10.55.0.2:8500"; };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "ci.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy { addr = "https://10.55.0.2:6666"; };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "radio.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy { addr = "https://10.55.0.3:8000"; };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "git.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy {
 | 
				
			||||||
 | 
					              addr = "https://10.55.0.3:5000";
 | 
				
			||||||
 | 
					              conf = "client_max_body_size 64M;";
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name = "nomad.weirdnatto.in";
 | 
				
			||||||
 | 
					            value = genericHttpRProxy {
 | 
				
			||||||
 | 
					              addr = "https://10.55.0.3:4646";
 | 
				
			||||||
 | 
					              conf = ''
 | 
				
			||||||
 | 
					                proxy_buffering off;
 | 
				
			||||||
 | 
					                proxy_read_timeout 310s;
 | 
				
			||||||
 | 
					              '';
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ] //
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
          "weirdnatto.in" = {
 | 
					          "weirdnatto.in" = {
 | 
				
			||||||
            addSSL = true;
 | 
					            addSSL = true;
 | 
				
			||||||
            enableACME = true;
 | 
					            enableACME = true;
 | 
				
			||||||
            locations."/".proxyPass = "http://10.55.0.2:80";
 | 
					            locations."/".proxyPass = "http://10.55.0.2:80";
 | 
				
			||||||
            serverAliases = [ "www.weirdnatto.in" ];
 | 
					            serverAliases = [ "www.weirdnatto.in" ];
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        "git.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "http://10.55.0.2:5000";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              client_max_body_size 64M;
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
        "vault.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "https://10.55.0.2:8800";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        "consul.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "http://10.55.0.2:8500";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        "nomad.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "http://10.55.0.2:4646";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
              proxy_buffering off;
 | 
					 | 
				
			||||||
              proxy_read_timeout 310s;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        "radio.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "http://10.55.0.3:8000";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
        "ci.weirdnatto.in" = {
 | 
					 | 
				
			||||||
          addSSL = true;
 | 
					 | 
				
			||||||
          enableACME = true;
 | 
					 | 
				
			||||||
          locations."/" = {
 | 
					 | 
				
			||||||
            proxyPass = "http://10.55.0.2:6666";
 | 
					 | 
				
			||||||
            extraConfig = ''
 | 
					 | 
				
			||||||
              proxy_set_header Host $host;
 | 
					 | 
				
			||||||
            '';
 | 
					 | 
				
			||||||
          };
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      /*streamConfig = ''
 | 
					 | 
				
			||||||
        upstream gitea {
 | 
					 | 
				
			||||||
        server 10.55.0.2:222;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        server {
 | 
					 | 
				
			||||||
        listen 22001;
 | 
					 | 
				
			||||||
        proxy_pass gitea;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        '';*/
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    vault-agent = {
 | 
					    vault-agent = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      settings = {
 | 
					      settings = {
 | 
				
			||||||
@@ -154,3 +130,4 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
  security.pki.certificateFiles = [ ../../cert.pem ];
 | 
					  security.pki.certificateFiles = [ ../../cert.pem ];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
    git
 | 
					    git
 | 
				
			||||||
    htop
 | 
					    htop
 | 
				
			||||||
    vim
 | 
					    vim
 | 
				
			||||||
    wireguard
 | 
					    wireguard-tools
 | 
				
			||||||
    vault
 | 
					    vault
 | 
				
			||||||
    tree-sitter
 | 
					    tree-sitter
 | 
				
			||||||
    rnix-lsp
 | 
					    rnix-lsp
 | 
				
			||||||
@@ -31,12 +31,11 @@
 | 
				
			|||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					 | 
				
			||||||
  nix = {
 | 
					  nix = {
 | 
				
			||||||
    package = pkgs.nixUnstable;
 | 
					    package = pkgs.nixUnstable;
 | 
				
			||||||
    extraOptions = ''
 | 
					    extraOptions = ''
 | 
				
			||||||
      experimental-features = nix-command flakes
 | 
					      experimental-features = nix-command flakes
 | 
				
			||||||
    '';
 | 
					    '';
 | 
				
			||||||
    trustedUsers = [ "root" ];
 | 
					    settings.trusted-users = [ "root" ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user