ChanServ changed the topic of #nixus to: Nixus is an experimental deployment tool for NixOS systems - https://github.com/Infinisil/nixus - https://logs.nix.samueldr.com/nixus/
<eyJhb> infinisil: Is it possible to access the nixus global config from my configuration in node?
cole-h has quit [Ping timeout: 240 seconds]
eyJhb has quit [Quit: Clever message]
eyJhb has joined #nixus
<infinisil> eyJhb: "in node"?
<eyJhb> ie. in my main configuration.nix in a node, can I then access the dns.routes inside there?
srk has quit [Remote host closed the connection]
srk has joined #nixus
<infinisil> eyJhb: Ah I don't think so
<infinisil> It would be possible to pass data from higher-level module to lower-level ones, but that kind of breaks abstraction a bit
<infinisil> Since then your NixOS module won't just be a NixOS module anymore, but a NixOS module that depends on being in a Nixus module
<eyJhb> It's just, ie. the dns.routes stuff. then I need to have a "higher" abstraction, that sets these records. I might just be overthinking this :D
<eyJhb> But thanks for the reply, it makes sense why you wouldn't be able to do that. But it would be nice, to be able to throw the dns.routes into the nodes, so that I could have all my.. jellyfish stuff in the same place
<eyJhb> ANd not in seperate files
<eyJhb> (or make a higher abstraction module to handle that)
<eyJhb> Also, I finally cracked your rb code. IT is quite nice, but really hard to read without comments :D But since it is in your own repo, I can't complain.
<eyJhb> Stop doing nice things that I want infinisil. :p
<infinisil> Hehe
<infinisil> eyJhb: I do like the idea of creating higher-level modules for everything that involves multiple machines
<infinisil> And that will be the case for DNS records
<infinisil> But yeah you could pass higher-level values into lower-level modules too
<infinisil> E.g. something like `configuration._module.args.myvalue = config.myvalue`
<infinisil> Then you could access `myvalue` from NixOS module arguments
<eyJhb> But ie. my jellyfish does not involve multiple machines as such? Or do you mean, that it exports a service?
<infinisil> eyJhb: DNS records involve multiple machines no?
<infinisil> Well, depending on DNS records makes it be involved with the server serving the records
<eyJhb> Well, I guess :p But I am thinking more of, the other machines don't really care or use the records. Only the primary one
<eyJhb> Ie. my other servers will not be playing minecraft :D
<infinisil> eyJhb: Oh, you can declare an option in your NixOS module
<infinisil> Which declares the records or so
<infinisil> Or the domain
<infinisil> Oh wait
<infinisil> Nevermind
<infinisil> I probably need an example of what you're doing to help more
<eyJhb> Lets take the jellyfin example. I have my router which is running my DNS server, on domain.com, I then have my server A, which is running Jellyfin. Server A just has a normal file, which uses the NixOS module system to manage the Jellyfin. It would be nice, if I could just declare a record in that file, that would add a DNS record, that would point to that server, ie. "jellyfin.domain.com", without
<eyJhb> having it in a seperate file, or make a nixus module for it
<eyJhb> Does that make sense?
<eyJhb> Just headed to the zoo real quick, but I hope that gave something ?
<eyJhb> Actually... One could make a nixus modules for the nodes, which would be something like "dns.record."something", that would take a "master" domain, and use the publicIP to set the IPv4/IPv6 automatically?
<infinisil> eyJhb: Ah, you could create a NixOS option in the jellyfin configuration that points to jellyfin.domain.com
<infinisil> Then on the Nixus level you can read that domain and set a record for it
<eyJhb> Hmm yeah, that could be a option. :) I was thinking about the last thing I wrote. It would be kinda cool to have a base domain set, and then each node could allocate a subdomain for it, by doing something like the `dns.record."media" = ??? not sure what`, and then it would use the base domain. And if you wanted to specify it on another domain, you could include the top level ie.
<eyJhb> `dns.record."media.someotherdomain.com."`. Sorry if I am just mauling Nixus and hurting it with my bad design ideas :D
cole-h has joined #nixus