diff --git a/.vscode/settings.json b/.vscode/settings.json index 3c5a082..6203e16 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,596 +1,597 @@ { - "editor.formatOnSave": true, - "editor.formatOnSaveMode": "file", - "explorer.fileNesting.patterns": { - ".gitignore": ".gitattributes, .envrc, readme", - "flake.nix": "flake.lock, shell.nix, secrets.nix" - }, - "files.exclude": { - ".git-crypt": true - }, - "terminal.integrated.defaultProfile.linux": "fish-fhs", - "terminal.integrated.profiles.linux": { - "fish-fhs": { - "args": [ - "--user", - "--pty", - "--quiet", - "--same-dir", - "--service-type=exec", - "fish" - ], - "path": "systemd-run" - } - } , "highlight.regex.regexes": [ - { - "languageIds": [ - "css", - "fish", - "go", - "java", - "javascript", - "jsonc", - "nix", - "postcss", - "rust", - "shellscript", - "svelte", - "typescript", - "yuck" - ], - "regexes": [ - { - "decorations": [ - { - "backgroundColor": "#4ebbff99", - "isWholeLine": true, - "overviewRulerColor": "#4ebbff" - } - ], - "regex": "(<|]" - }, - { - "decorations": [ - { - "color": "#ffa07a" - } - ], - "regex": "script" - } - ], - "regexFlag": "gm" - }, - { - "decorations": [ - { - "backgroundColor": "#ffa07a99", - "isWholeLine": true, - "overviewRulerColor": "#ffa07a" - } - ], - "regex": "(<|]" - }, - { - "decorations": [ - { - "color": "#7ad9ff" - } - ], - "regex": "style" - } - ], - "regexFlag": "gm" - }, - { - "regex": "(/\\*|<\\!--)(.|[\r\n])*?((\\*/|-->)|-->)", - "regexes": [ - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\B:D" - }, - { - "decorations": [ - { - "color": "#f00", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\!\\!\\!" - }, - { - "decorations": [ - { - "color": "#D8A657", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\^\\^" - }, - { - "decorations": [ - { - "color": "#E78A4E", - "fontWeight": "bold", - "index": 1 - }, - { - "color": "#D3869B", - "fontWeight": "bold", - "index": 2 - } - ], - "regex": "(<)(>)" - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#804600", - "color": "#d4be98", - "index": 1, - "overviewRulerColor": "#804600" - } - ], - "regex": "(.*TODO:)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#80460099", - "color": "#d4be98", - "index": 2, - "overviewRulerColor": "#80460099" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#fffacd", - "color": "#282828", - "index": 1, - "overviewRulerColor": "#fffacd" - } - ], - "regex": "(.*NOTE:)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#fffacd99", - "color": "#282828", - "index": 2, - "overviewRulerColor": "#fffacd99" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#6495ed", - "color": "#282828", - "index": 1, - "overviewRulerColor": "#6495ed" - } - ], - "regex": "(.*IDEA:)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#6495ed99", - "color": "#282828", - "index": 2, - "overviewRulerColor": "#6495ed99" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#66cc99", - "color": "#282828", - "index": 1, - "overviewRulerColor": "#66cc99" - } - ], - "regex": "(.*INFO:)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#66cc9999", - "color": "#282828", - "index": 2, - "overviewRulerColor": "#66cc9999" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#591d77", - "color": "#d4be98", - "index": 1, - "overviewRulerColor": "#591d77" - } - ], - "regex": "(.*(?:ABOUT|EXP|\\?+):)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#591d7799", - "color": "#d4be98", - "index": 2, - "overviewRulerColor": "#591d7799" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#a74165", - "color": "#d4be98", - "index": 1, - "overviewRulerColor": "#a74165" - } - ], - "regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#a7416599", - "color": "#d4be98", - "index": 2, - "overviewRulerColor": "#a7416599" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#c36c5c", - "color": "#d4be98", - "index": 1, - "overviewRulerColor": "#c36c5c" - } - ], - "regex": "(.*(?:SKELETON|COMPONENT):)((.|\\r|\\n)*?(\\*/|-->)$)", - "regexes": [ - { - "decorations": [ - { - "index": 0 - }, - { - "backgroundColor": "#c36c5c99", - "color": "#d4be98", - "index": 2, - "overviewRulerColor": "#c36c5c99" - } - ], - "index": 2, - "regex": "([\\s]+)?( .*)" - } - ] - } - ], - "regexFlag": "gm", - "regexLimit": 25000 - }, - { - "regex": "(?<=\\s*)(//|#|;)(.|\r\n)*?$", - "regexes": [ - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\B:D" - }, - { - "decorations": [ - { - "fontWeight": "bold", - "index": 0 - }, - { - "color": "#D8A657", - "index": 1 - }, - { - "color": "#d4be98", - "index": 2 - }, - { - "color": "#d4be98", - "index": 4 - }, - { - "color": "#D8A657", - "index": 5 - } - ], - "regex": "(^/|#|;)(/|#|;)(.*)(/|#|;)(/|#|;$)" - }, - { - "decorations": [ - { - "color": "#f00", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\!\\!\\!" - }, - { - "decorations": [ - { - "color": "#D8A657", - "fontWeight": "bold", - "index": 0 - } - ], - "regex": "\\^\\^" - }, - { - "decorations": [ - { - "color": "#E78A4E", - "fontWeight": "bold", - "index": 1 - }, - { - "color": "#D3869B", - "fontWeight": "bold", - "index": 2 - } - ], - "regex": "(<)(>)" - }, - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#804600", - "index": 1, - "overviewRulerColor": "#804600" - }, - { - "backgroundColor": "#80460099", - "index": 2, - "overviewRulerColor": "#80460099" - } - ], - "regex": "(.*TODO:)(.*)" - }, - { - "decorations": [ - { - "color": "#282828", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#fffacd", - "index": 1, - "overviewRulerColor": "#fffacd" - }, - { - "backgroundColor": "#fffacd99", - "index": 2, - "overviewRulerColor": "#fffacd99" - } - ], - "regex": "(.*NOTE:)(.*)" - }, - { - "decorations": [ - { - "color": "#282828", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#6495ed", - "index": 1, - "overviewRulerColor": "#6495ed" - }, - { - "backgroundColor": "#6495ed99", - "index": 2, - "overviewRulerColor": "#6495ed99" - } - ], - "regex": "(.*IDEA:)(.*)" - }, - { - "decorations": [ - { - "color": "#282828", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#66cc99", - "index": 1, - "overviewRulerColor": "#66cc99" - }, - { - "backgroundColor": "#66cc9999", - "index": 2, - "overviewRulerColor": "#66cc9999" - } - ], - "regex": "(.*INFO:)(.*)" - }, - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#591d77", - "index": 1, - "overviewRulerColor": "#591d77" - }, - { - "backgroundColor": "#591d7799", - "index": 2, - "overviewRulerColor": "#591d7799" - } - ], - "regex": "(.*(?:ABOUT|EXP|\\?+):)(.*)" - }, - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#a74165", - "index": 1, - "overviewRulerColor": "#a74165" - }, - { - "backgroundColor": "#a7416599", - "index": 2, - "overviewRulerColor": "#a7416599" - } - ], - "regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)(.*)" - }, - { - "decorations": [ - { - "color": "#d4be98", - "fontWeight": "bold", - "index": 0 - }, - { - "backgroundColor": "#c36c5c", - "index": 1, - "overviewRulerColor": "#c36c5c" - }, - { - "backgroundColor": "#c36c5c99", - "index": 2, - "overviewRulerColor": "#c36c5c99" - } - ], - "regex": "(.*(?:SKELETON|COMPONENT):)(.*)" - } - ], - "regexFlag": "gm", - "regexLimit": 25000 - } - ] - } - ], -} \ No newline at end of file + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "explorer.fileNesting.patterns": { + ".gitignore": ".gitattributes, .envrc, readme", + "flake.nix": "flake.lock, shell.nix, secrets.nix" + }, + "files.exclude": { + ".git-crypt": true + }, + "terminal.integrated.defaultProfile.linux": "fish-fhs", + "terminal.integrated.profiles.linux": { + "fish-fhs": { + "args": [ + "--user", + "--pty", + "--quiet", + "--same-dir", + "--service-type=exec", + "fish" + ], + "path": "systemd-run" + } + }, + "highlight.regex.regexes": [ + { + "languageIds": [ + "css", + "fish", + "go", + "java", + "javascript", + "jsonc", + "nix", + "postcss", + "rust", + "shellscript", + "svelte", + "typescript", + "yuck" + ], + "regexes": [ + { + "decorations": [ + { + "backgroundColor": "#4ebbff99", + "isWholeLine": true, + "overviewRulerColor": "#4ebbff" + } + ], + "regex": "(<|]" + }, + { + "decorations": [ + { + "color": "#ffa07a" + } + ], + "regex": "script" + } + ], + "regexFlag": "gm" + }, + { + "decorations": [ + { + "backgroundColor": "#ffa07a99", + "isWholeLine": true, + "overviewRulerColor": "#ffa07a" + } + ], + "regex": "(<|]" + }, + { + "decorations": [ + { + "color": "#7ad9ff" + } + ], + "regex": "style" + } + ], + "regexFlag": "gm" + }, + { + "regex": "(/\\*|<\\!--)(.|[\r\n])*?((\\*/|-->)|-->)", + "regexes": [ + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\B:D" + }, + { + "decorations": [ + { + "color": "#f00", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\!\\!\\!" + }, + { + "decorations": [ + { + "color": "#D8A657", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\^\\^" + }, + { + "decorations": [ + { + "color": "#E78A4E", + "fontWeight": "bold", + "index": 1 + }, + { + "color": "#D3869B", + "fontWeight": "bold", + "index": 2 + } + ], + "regex": "(<)(>)" + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#804600", + "color": "#d4be98", + "index": 1, + "overviewRulerColor": "#804600" + } + ], + "regex": "(.*TODO:)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#80460099", + "color": "#d4be98", + "index": 2, + "overviewRulerColor": "#80460099" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#fffacd", + "color": "#282828", + "index": 1, + "overviewRulerColor": "#fffacd" + } + ], + "regex": "(.*NOTE:)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#fffacd99", + "color": "#282828", + "index": 2, + "overviewRulerColor": "#fffacd99" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#6495ed", + "color": "#282828", + "index": 1, + "overviewRulerColor": "#6495ed" + } + ], + "regex": "(.*IDEA:)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#6495ed99", + "color": "#282828", + "index": 2, + "overviewRulerColor": "#6495ed99" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#66cc99", + "color": "#282828", + "index": 1, + "overviewRulerColor": "#66cc99" + } + ], + "regex": "(.*INFO:)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#66cc9999", + "color": "#282828", + "index": 2, + "overviewRulerColor": "#66cc9999" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#591d77", + "color": "#d4be98", + "index": 1, + "overviewRulerColor": "#591d77" + } + ], + "regex": "(.*(?:ABOUT|EXP|\\?+):)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#591d7799", + "color": "#d4be98", + "index": 2, + "overviewRulerColor": "#591d7799" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#a74165", + "color": "#d4be98", + "index": 1, + "overviewRulerColor": "#a74165" + } + ], + "regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#a7416599", + "color": "#d4be98", + "index": 2, + "overviewRulerColor": "#a7416599" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#c36c5c", + "color": "#d4be98", + "index": 1, + "overviewRulerColor": "#c36c5c" + } + ], + "regex": "(.*(?:SKELETON|COMPONENT):)((.|\\r|\\n)*?(\\*/|-->)$)", + "regexes": [ + { + "decorations": [ + { + "index": 0 + }, + { + "backgroundColor": "#c36c5c99", + "color": "#d4be98", + "index": 2, + "overviewRulerColor": "#c36c5c99" + } + ], + "index": 2, + "regex": "([\\s]+)?( .*)" + } + ] + } + ], + "regexFlag": "gm", + "regexLimit": 25000 + }, + { + "regex": "(?<=\\s*)(//|#|;)(.|\r\n)*?$", + "regexes": [ + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\B:D" + }, + { + "decorations": [ + { + "fontWeight": "bold", + "index": 0 + }, + { + "color": "#D8A657", + "index": 1 + }, + { + "color": "#d4be98", + "index": 2 + }, + { + "color": "#d4be98", + "index": 4 + }, + { + "color": "#D8A657", + "index": 5 + } + ], + "regex": "(^/|#|;)(/|#|;)(.*)(/|#|;)(/|#|;$)" + }, + { + "decorations": [ + { + "color": "#f00", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\!\\!\\!" + }, + { + "decorations": [ + { + "color": "#D8A657", + "fontWeight": "bold", + "index": 0 + } + ], + "regex": "\\^\\^" + }, + { + "decorations": [ + { + "color": "#E78A4E", + "fontWeight": "bold", + "index": 1 + }, + { + "color": "#D3869B", + "fontWeight": "bold", + "index": 2 + } + ], + "regex": "(<)(>)" + }, + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#804600", + "index": 1, + "overviewRulerColor": "#804600" + }, + { + "backgroundColor": "#80460099", + "index": 2, + "overviewRulerColor": "#80460099" + } + ], + "regex": "(.*TODO:)(.*)" + }, + { + "decorations": [ + { + "color": "#282828", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#fffacd", + "index": 1, + "overviewRulerColor": "#fffacd" + }, + { + "backgroundColor": "#fffacd99", + "index": 2, + "overviewRulerColor": "#fffacd99" + } + ], + "regex": "(.*NOTE:)(.*)" + }, + { + "decorations": [ + { + "color": "#282828", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#6495ed", + "index": 1, + "overviewRulerColor": "#6495ed" + }, + { + "backgroundColor": "#6495ed99", + "index": 2, + "overviewRulerColor": "#6495ed99" + } + ], + "regex": "(.*IDEA:)(.*)" + }, + { + "decorations": [ + { + "color": "#282828", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#66cc99", + "index": 1, + "overviewRulerColor": "#66cc99" + }, + { + "backgroundColor": "#66cc9999", + "index": 2, + "overviewRulerColor": "#66cc9999" + } + ], + "regex": "(.*INFO:)(.*)" + }, + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#591d77", + "index": 1, + "overviewRulerColor": "#591d77" + }, + { + "backgroundColor": "#591d7799", + "index": 2, + "overviewRulerColor": "#591d7799" + } + ], + "regex": "(.*(?:ABOUT|EXP|\\?+):)(.*)" + }, + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#a74165", + "index": 1, + "overviewRulerColor": "#a74165" + }, + { + "backgroundColor": "#a7416599", + "index": 2, + "overviewRulerColor": "#a7416599" + } + ], + "regex": "(.*(?:FIXME|FIX|BUG|DEBUG|HACK|REMOVE):)(.*)" + }, + { + "decorations": [ + { + "color": "#d4be98", + "fontWeight": "bold", + "index": 0 + }, + { + "backgroundColor": "#c36c5c", + "index": 1, + "overviewRulerColor": "#c36c5c" + }, + { + "backgroundColor": "#c36c5c99", + "index": 2, + "overviewRulerColor": "#c36c5c99" + } + ], + "regex": "(.*(?:SKELETON|COMPONENT):)(.*)" + } + ], + "regexFlag": "gm", + "regexLimit": 25000 + } + ] + } + ] +} diff --git a/hosts/x86/proxy/config/adguard.nix b/hosts/x86/proxy/config/adguard.nix new file mode 100644 index 0000000..6a67d17 --- /dev/null +++ b/hosts/x86/proxy/config/adguard.nix @@ -0,0 +1,72 @@ +{ pkgs, lib, ... }: +/* + TODO: Eventually, when my proxy/DNS/VPN mess is working like I want. + This should be switched to service.adguard not a container +*/ +{ + # Containers + virtualisation.oci-containers.containers."adguard-adguard" = { + image = "adguard/adguardhome:latest"; + volumes = [ + "/etc/adguard/confdir:/opt/adguardhome/conf:rw" + "/etc/adguard/workdir:/opt/adguardhome/work:rw" + "/var/lib/acme:/opt/adguardhome/work/acme:ro" + ]; + ports = [ + "53:53/tcp" + "53:53/udp" + "853:853/tcp" + "3000:3000/tcp" + ]; + log-driver = "journald"; + extraOptions = [ + "--network-alias=adguard" + "--network=adguard_default" + ]; + }; + systemd.services."docker-adguard-adguard" = { + serviceConfig = { + Restart = lib.mkOverride 90 "always"; + RestartMaxDelaySec = lib.mkOverride 90 "1m"; + RestartSec = lib.mkOverride 90 "100ms"; + RestartSteps = lib.mkOverride 90 9; + }; + after = [ + "docker-network-adguard_default.service" + ]; + requires = [ + "docker-network-adguard_default.service" + ]; + partOf = [ + "docker-compose-adguard-root.target" + ]; + wantedBy = [ + "docker-compose-adguard-root.target" + ]; + }; + + # Networks + systemd.services."docker-network-adguard_default" = { + path = [ pkgs.docker ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStop = "docker network rm -f adguard_default"; + }; + script = '' + docker network inspect adguard_default || docker network create adguard_default + ''; + partOf = [ "docker-compose-adguard-root.target" ]; + wantedBy = [ "docker-compose-adguard-root.target" ]; + }; + + # Root service + # When started, this will automatically create all resources and start + # the containers. When stopped, this will teardown all resources. + systemd.targets."docker-compose-adguard-root" = { + unitConfig = { + Description = "Root target generated by compose2nix."; + }; + wantedBy = [ "multi-user.target" ]; + }; +} diff --git a/hosts/x86/proxy/config/caddy.nix b/hosts/x86/proxy/config/caddy.nix index 95ef0fe..87d47ea 100644 --- a/hosts/x86/proxy/config/caddy.nix +++ b/hosts/x86/proxy/config/caddy.nix @@ -2,6 +2,13 @@ services.caddy = { enable = true; virtualHosts = { + "adguard.ryot.foo" = { + useACMEHost = "ryot.foo"; + extraConfig = '' + reverse_proxy localhost:3000 + ''; + }; + "cloudflared.ryot.foo" = { useACMEHost = "ryot.foo"; extraConfig = '' diff --git a/hosts/x86/proxy/config/dnsmasq.nix b/hosts/x86/proxy/config/dnsmasq.nix deleted file mode 100644 index 3e98a8e..0000000 --- a/hosts/x86/proxy/config/dnsmasq.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - services.dnsmasq = { - enable = true; - settings = { - # Listen on eth0 for external clients and lo for local host - interface = [ - "eth0" - "lo" - ]; - - no-hosts = true; - no-resolv = true; - - server = [ - "104.40.3.1" # Query openWRT first - "1.1.1.1" # Redundancy - "1.0.0.1" - "8.8.8.8" - ]; - - # INFO: Why this setup for services? - # - OpenWRT forwards every *ryot.foo and *toph.cc query to this DNS server - # - dnsmasq hands out fixed IPs for those subdomains. - # - Each target host runs Caddy to serve its site. - # No Docker labels, no discovery magic—just reliable routing clearly documented with Nix. - # Its not automated but this is a homelab... ill survive - - address = [ - ## CLOUD ## - "/drive.ryot.foo/104.40.3.24" - - ## PROXY ## - "/cloudflared.ryot.foo/104.40.3.34" - "/ochre.ryot.foo/104.40.3.34" - "/pve.ryot.foo/104.40.3.34" - "/wrt.ryot.foo/104.40.3.34" - - ## KOMO ## - "/auth.ryot.foo/104.40.3.44" - "/frp.ryot.foo/104.40.3.44" - "/git.ryot.foo/104.40.3.44" - "/grafana.ryot.foo/104.40.3.44" - "/home.ryot.foo/104.40.3.44" - "/influx.ryot.foo/104.40.3.44" - "/komodo.ryot.foo/104.40.3.44" - "/mail.ryot.foo/104.40.3.44" - "/map.ryot.foo/104.40.3.44" - "/outline.ryot.foo/104.40.3.44" - "/plane.ryot.foo/104.40.3.44" - - "/blog.toph.cc/104.40.3.44" - - ## SOCK ## - "/upsnap.ryot.foo/104.40.3.54" - "/sock.ryot.foo/104.40.3.54" - ]; - - cache-size = 1000; - - # Log queries for debugging (optional)' - # log-queries = true; - }; - }; - - networking = { - # Open DNS port in firewall - firewall = { - allowedTCPPorts = [ 53 ]; - allowedUDPPorts = [ 53 ]; - }; - }; -} diff --git a/secrets.nix b/secrets.nix index 97e0f84..5ff1f9c 100644 Binary files a/secrets.nix and b/secrets.nix differ