Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(pm/teal): add menu #136

merged opened by freshlybakedca.ke targeting main from private/minion/push-mmztworysmow

menu is the golinks provider and URL shortener that we're writing. So we can start using it right away, it would be good to host it on teal ASAP

Labels

None yet.

requested-reviewers

None yet.

approved

None yet.

tested-working

None yet.

rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:k2zmz2l3hvfr44tmlhewol2j/sh.tangled.repo.pull/3mbjwqfxv5j22
+109 -1
Diff #4
+1
packetmix/systems/teal/headscale.nix
··· 132 "2606:4700:4700::1111" 133 "2606:4700:4700::1001" 134 ]; 135 base_domain = "clicks.domains"; 136 }; 137 auth_setup_allow_defer = true; # Otherwise we'll fall back to CLI auth
··· 132 "2606:4700:4700::1111" 133 "2606:4700:4700::1001" 134 ]; 135 + search_domains = [ "search.freshly.space" ]; 136 base_domain = "clicks.domains"; 137 }; 138 auth_setup_allow_defer = true; # Otherwise we'll fall back to CLI auth
+95
packetmix/systems/teal/menu.nix
···
··· 1 + # SPDX-FileCopyrightText: 2025 FreshlyBakedCake 2 + # 3 + # SPDX-License-Identifier: MIT 4 + 5 + { 6 + project, 7 + system, 8 + config, 9 + ... 10 + }: 11 + { 12 + systemd.services.menu = { 13 + wantedBy = [ "default.target" ]; 14 + script = '' 15 + ${project.packages.menu.result.${system}}/bin/menu 16 + ''; 17 + serviceConfig = { 18 + User = "menu"; 19 + Group = "menu"; 20 + PrivateTmp = true; 21 + }; 22 + environment.BIND_ADDR = "127.0.0.1:1038"; 23 + }; 24 + 25 + services.headscale.settings.dns.extra_records = [ 26 + { 27 + # go.search.freshly.space -> teal 28 + name = "go.search.freshly.space"; 29 + type = "A"; 30 + value = "100.64.0.5"; 31 + } 32 + { 33 + # menu.freshlybakedca.ke -> teal 34 + name = "menu.freshlybakedca.ke"; 35 + type = "A"; 36 + value = "100.64.0.5"; 37 + } 38 + ]; 39 + 40 + services.nginx.virtualHosts."menu.freshlybakedca.ke" = { 41 + listenAddresses = [ 42 + "0.0.0.0" 43 + "[::0]" 44 + ]; 45 + 46 + addSSL = true; 47 + enableACME = true; 48 + acmeRoot = null; 49 + 50 + serverAliases = [ "go.search.freshly.space" ]; 51 + 52 + locations."/" = { 53 + proxyPass = "http://127.0.0.1:1038"; 54 + recommendedProxySettings = true; 55 + proxyWebsockets = true; 56 + 57 + extraConfig = '' 58 + proxy_set_header X-Webauth-Login ""; 59 + ''; # TODO: consider setting up oauth2-proxy for internal routes (most of _ except for search) so hyperneutrino/other people who don't have TS on all devices can still use this properly 60 + }; 61 + }; 62 + 63 + services.nginx.enable = true; 64 + services.nginx.virtualHosts."internal.menu.freshlybakedca.ke" = { 65 + listenAddresses = [ "localhost.tailscale" ]; 66 + 67 + addSSL = true; 68 + enableACME = true; 69 + acmeRoot = null; 70 + 71 + serverAliases = [ "go.search.freshly.space" ]; 72 + 73 + locations."/" = { 74 + proxyPass = "http://127.0.0.1:1038"; 75 + recommendedProxySettings = true; 76 + }; 77 + }; 78 + 79 + services.nginx.virtualHosts."go" = { 80 + listenAddresses = [ "localhost.tailscale" ]; 81 + 82 + locations."/" = { 83 + proxyPass = "http://127.0.0.1:1038"; 84 + recommendedProxySettings = true; 85 + }; 86 + }; 87 + 88 + services.nginx.tailscaleAuth = { 89 + enable = true; 90 + virtualHosts = [ 91 + "internal.menu.freshlybakedca.ke" 92 + "go" 93 + ]; 94 + }; 95 + }
+12 -1
projects/nilla.nix
··· 30 }) pins; 31 } 32 ) 33 - ]; 34 35 args = { 36 inherit nilla pins; # pins needs to be a static arg for us to import from it...
··· 30 }) pins; 31 } 32 ) 33 + ] 34 + ++ ( 35 + if (builtins.readDir ./.) ? "dependencies" then 36 + let 37 + dependenciesDir = ./dependencies; 38 + dependencies = builtins.attrNames (builtins.readDir dependenciesDir); 39 + depedencyFiles = map (name: "${./dependencies}/${name}/project.nix") dependencies; 40 + in 41 + depedencyFiles 42 + else 43 + [ ] 44 + ); 45 46 args = { 47 inherit nilla pins; # pins needs to be a static arg for us to import from it...
+1
projects/packetmix/workspace.josh
··· 1 ::.tangled/ 2 ::LICENSES/ 3 ::npins/ 4 ::nilla.nix=projects/nilla.nix 5 ::workspace.josh.license=projects/packetmix/workspace.josh.license
··· 1 ::.tangled/ 2 ::LICENSES/ 3 + dependencies/menu = :/menu 4 ::npins/ 5 ::nilla.nix=projects/nilla.nix 6 ::workspace.josh.license=projects/packetmix/workspace.josh.license

History

7 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
feat(pm/teal): add menu
5/5 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
feat(pm/teal): add menu
5/5 success
expand
expand 0 comments
1 commit
expand
feat(pm/teal): add menu
expand 0 comments
1 commit
expand
feat(pm/teal): add menu
expand 0 comments
1 commit
expand
feat(pm/teal): add menu
expand 0 comments
1 commit
expand
feat(pm/teal): add menu
expand 0 comments
1 commit
expand
feat(pm/teal): add menu
expand 0 comments