repl.nix
This commit is contained in:
parent
042b2e9664
commit
03b7e4196a
7 changed files with 65 additions and 16 deletions
33
notes/ideas.md
Normal file
33
notes/ideas.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# 1. Add port info to hosts
|
||||
Re-use `hosts` setup and add domain and port information to each host
|
||||
```nix
|
||||
{
|
||||
hostname = "overseerr";
|
||||
ip = "192.168.0.105";
|
||||
mac = "8E:21:7F:88:3A:83";
|
||||
# new stuff
|
||||
exposes = {
|
||||
requests = {
|
||||
port = 3000;
|
||||
domain = "requests.xirion.net";
|
||||
port = 3000;
|
||||
};
|
||||
...
|
||||
};
|
||||
}
|
||||
```
|
||||
which then can get translated to nginx config:
|
||||
```nix
|
||||
virtualHosts."requests.xirion.net" = proxy "http://192.168.0.105:80";
|
||||
```
|
||||
|
||||
Ideally hosts should also be able to access their own host information more easily so
|
||||
that in service config one could use `thisHost.exposes.requests.port` or similar
|
||||
|
||||
# 2. Authoritative nameserver
|
||||
Using the definitions from (1), we can then also build authoritative DNS records
|
||||
by folding over `hosts[i].exposes.requests.domain` and collating that with its realm (and therefore external IP)
|
||||
|
||||
This also means I should probably put the external IP in some kind of meta block per realm.
|
||||
|
||||
[dns.nix](https://github.com/kirelagin/dns.nix) seems to be a nice DSL for DNS stuff
|
Loading…
Add table
Add a link
Reference in a new issue