eyJhb changed the topic of #nixos-on-your-router to: NixOS on your Router || https://logs.nix.samueldr.com/nixos-on-your-router
{^_^} has quit [Excess Flood]
{^_^} has joined #nixos-on-your-router
Adcock has joined #nixos-on-your-router
Adcock has left #nixos-on-your-router ["WeeChat 2.7.1"]
NinjaTrappeur has quit [Quit: WeeChat 2.8]
NinjaTrappeur has joined #nixos-on-your-router
<mdlayher> just added support for a settings Nix attribute set which can be converted into TOML for use with the daemon I wrote. feels great.
<mdlayher> so much better than doing string interpolation to spit out a config file
<clever> mdlayher: that could probably be done with builtins.toJSON and a json-to-toml program in pkgs.runCommand
<mdlayher> clever: that's exactly what i'm doing. although there is a PR open to add blessed versions of those sorts of conversions: https://github.com/NixOS/nixpkgs/pull/75584
<{^_^}> #75584 (by Infinisil, 26 weeks ago, open): Configuration file formats for JSON, INI, YAML and TOML
<mdlayher> for the time being, you can see what i did in https://github.com/NixOS/nixpkgs/pull/89781
<{^_^}> #89781 (by mdlayher, 6 days ago, merged): nixos/corerad: add settings option to supersede configFile
<clever> echo '${builtins.toJSON x}' | ${pkgs.go-toml}/bin/jsontoml > $out
<clever> mdlayher: this will break if there happens to be a single quote in the json
<clever> mdlayher: you want to use passAsFile
<mdlayher> thanks, i'll take a look at that
<clever> runCommandNoCCLocal name { passAsFile = [ "something" ]; something = builtins.toJSON; buildInputs = [ go-toml ]; } "jsontoml < $somethingPath > $out"
<clever> mdlayher: something like that i think
<mdlayher> TIL! i will give that a go and make another PR
<mdlayher> clever: it works! thank you, i would appreciate your review as well: https://github.com/NixOS/nixpkgs/pull/90380
<{^_^}> #90380 (by mdlayher, 24 seconds ago, open): nixos/corerad: use passAsFile while converting settings JSON to TOML
<clever> mdlayher: cleverca22 is my github handle, if you want to @ me in the text
<mdlayher> aha, looks like i did guess right then :)
<mdlayher> already CC'd you
<clever> mdlayher: approved
<mdlayher> thank you
<mdlayher> on an unrelated note, i just ordered an LTE modem for my NixOS router! is there any special software you all use to manage mini-PCIe modems?
<mdlayher> it looks like you can do the initial config with minicom and a few AT commands
thevar1able has joined #nixos-on-your-router
thevar1able has quit [Remote host closed the connection]
q3k has quit [Ping timeout: 256 seconds]
q3k has joined #nixos-on-your-router
teto has quit [Ping timeout: 246 seconds]
teto has joined #nixos-on-your-router