-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nixosConfigurations): add new machine serving {turn,signal,bootstrap}.infra.holochain.org #64
Conversation
steveej
commented
Mar 15, 2024
•
edited
Loading
edited
- blanket config to get the machine up and running.
- opinionated coturn module
- service
- acme cert via redirection
- ensure cli-password is effective
- opinionated tx5 signal server module
- service
- reverse TLS proxy with acme cert
- tx5 signal server package
- secrets for turn credentials
- kitsune-bootstrap module with reverse TLS proxy
- fixes dweb-reverse-tls-proxy: disko config is outdated #66
- partially addresses CI foundations: lint, eval, and build all darwin and linux configs on CI #65
5d9d7d6
to
fb072ad
Compare
@ThetaSinner this server is deployed now. just needs the turn server config added. |
…d module the flake-part encapsulates and exposes both the overlay and the module. the coturn overlay adds a coturn that working acme-redirection which we make use of here.
disable jost-s key as i don't have it in the keychain and cannot find it immediately.
this relies on a package in holochain/holochain so adding that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how to review any of this... but our tests showed the results worked, so I guess approve 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good! Definitely an improvement.
I have a few questions about syncing versions and quite a few general questions. Hopefully one of two useful comments in here too :)
wantedBy = ["multi-user.target"]; | ||
|
||
environment = { | ||
TMPDIR = "%T"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it ensures that TMPDIR environment variable is set to something that systemd considers temporary and writable. for some reason it wasn't set otherwise. systemd.unit or some other manual might explain why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically the %T
bit looked magical to me
serviceConfig = { | ||
DynamicUser = true; | ||
PrivateTmp = true; | ||
ExecStartPre = pkgs.writeShellScript "tx5-start-pre" '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to put this in a directory without scripting? Like /var/lib/bootstrap/config.json
or somewhere like that. Not really bothered where but I think there's a way to output files to standard locations to be consumed by services with NixOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix can by design only put files in the nix store. the point here isn't that it's not in the nix store though, it's that the permissions are 0400
which is enforced by the tx5-signal-srv
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in addition i also thought about how we can inject secrets into the config.json at runtime. it turns out we're not needing that now because we've got a hashed password in the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can create files alongside services like this https://unix.stackexchange.com/questions/500025/how-to-add-a-file-to-etc-in-nixos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can create files alongside services like this https://unix.stackexchange.com/questions/500025/how-to-add-a-file-to-etc-in-nixos
using environment.etc
, the file is going to be written to the nix store first, and then linked to from /etc
with the link's permissions being adjusted. the file in the nix store will we world-readable which i'd like to avoid in this case. that's because i want to reserve the functionality of injecting secret information into this config, which should never reach the nix store in plain text.
what do you think are the downsides of the current implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh okay, got it, yeah that's fine then