summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-04-23 06:58:49 -0400
committerseth <[email protected]>2023-04-23 06:58:49 -0400
commitb4e31ae959e612771f411bd4f9ee05ad16ac8d19 (patch)
tree483563ca6f85d292a86e2508bf91f8d24ff31c0b
parent198ab36214456ba2e660aa71b4e75341dd87c7d4 (diff)
fixup networking for p-body
-rw-r--r--hosts/p-body/default.nix139
1 files changed, 74 insertions, 65 deletions
diff --git a/hosts/p-body/default.nix b/hosts/p-body/default.nix
index 385f5bd..3ee026f 100644
--- a/hosts/p-body/default.nix
+++ b/hosts/p-body/default.nix
@@ -14,6 +14,8 @@
defaultPackages.enable = false;
};
+ nixos.networking.enable = false;
+
networking = {
hostName = "p-body";
firewall = let
@@ -34,69 +36,76 @@
};
services = {
- caddy = {
- enable = true;
-
- email = "[email protected]";
-
- logFormat = ''
- output stdout
- format json
- '';
-
- extraConfig = ''
- (strip-www) {
- redir https://{args.0}{uri}
- }
-
- (common_domain) {
- encode gzip
-
- handle {
- try_files {path} {path}/
- }
-
- handle_errors {
- @404 {
- expression {http.error.status_code} == 404
- }
- rewrite @404 /404.html
- file_server
- }
- }
-
- (no_embeds) {
- header /{args.0} X-Frame-Options DENY
- }
-
- (container_proxy) {
- handle_path /{args.0}/* {
- reverse_proxy {args.1}
- }
- }
- '';
-
- globalConfig = ''
- auto_https off
- '';
-
- virtualHosts = {
- guzzle = rec {
- hostName = "198.199.68.30";
- serverAliases = [
- "www.${hostName}"
- ];
- extraConfig = ''
- root * /var/www
- import common_domain
-
- file_server
-
- import container_proxy api :8000
- '';
- };
- };
- };
+ #caddy = {
+ # enable = true;
+
+ # email = "[email protected]";
+
+ # logFormat = ''
+ # output stdout
+ # format json
+ # '';
+
+ # extraConfig = ''
+ # (strip-www) {
+ # redir https://{args.0}{uri}
+ # }
+
+ # (common_domain) {
+ # encode gzip
+
+ # handle {
+ # try_files {path} {path}/
+ # }
+
+ # handle_errors {
+ # @404 {
+ # expression {http.error.status_code} == 404
+ # }
+ # rewrite @404 /404.html
+ # file_server
+ # }
+ # }
+
+ # (no_embeds) {
+ # header /{args.0} X-Frame-Options DENY
+ # }
+
+ # (container_proxy) {
+ # handle_path /{args.0}/* {
+ # reverse_proxy {args.1}
+ # }
+ # }
+ # '';
+
+ # globalConfig = ''
+ # auto_https off
+ # '';
+
+ # virtualHosts = {
+ # guzzle = rec {
+ # hostName = "167.99.145.73";
+
+ # serverAliases = [
+ # "www.${hostName}"
+ # ];
+
+ # extraConfig = ''
+ # root * /var/www
+ # import common_domain
+
+ # file_server
+
+ # import container_proxy api :8000
+ # '';
+
+ # listenAddresses = [
+ # "127.0.0.1"
+ # "::1"
+ # ];
+ # };
+ # };
+ #};
endlessh = {
enable = true;
@@ -106,8 +115,8 @@
guzzle-api = {
enable = true;
- url = "http://198.199.68.30/api/api";
- port = "8000";
+ url = "http://167.99.145.73";
+ port = "80";
package = guzzle-api-server;
};