pie_ has quit [Read error: Connection reset by peer]
pie_ has joined #nixos-chat
Jason_Grossman has quit [Remote host closed the connection]
<dtz[m]>
Lmao
FRidh has quit [Quit: Konversation terminated!]
Jason_Grossman has joined #nixos-chat
<infinisil>
Haha
<kalbasit>
infinisil: I'm so behind on functional programming, last I used one was 10 years ago :o. Anyway, I'm trying to figure out how to loop over some data to contruct the config. I remember doing recursive in Scheme but I'm not sure how to do that in Nix yet. I know Go is not your lang of choice, but I've put together an example of what I'm trying to do: https://play.golang.org/p/7zNyJfzWMUh
<infinisil>
Could also use mapAttrs' (subdomain: port: valueNamePair "${subdomain}.publica.dev" { serverName = "${subdomain}... }) { dev = 7000; api = 8080; }
<infinisil>
kalbasit: ^^
<infinisil>
> valueNamePair
<{^_^}>
undefined variable 'valueNamePair' at (string):162:1
<infinisil>
> lib.valueNamePair
<{^_^}>
attribute 'valueNamePair' missing, at (string):162:1
<infinisil>
> lib.nameValuePair
<{^_^}>
<LAMBDA>
<infinisil>
Ah it's that one
<infinisil>
Check out the implementation of mapAttrs' and nameValuePair for some docs
<kalbasit>
infinisil: thank you infinisil, I'll try that
<kalbasit>
looks pretty awesome
<kalbasit>
infinisil: the only problem I see with `services.nginx.virtualHosts = ` is that it will override any other `services.nginx.virtualHosts = ` that I have in a different imported file. so I'll have to merge the value if it exists before right?
FRidh has joined #nixos-chat
Jason_Gr` has joined #nixos-chat
Jason_Grossman has quit [Ping timeout: 240 seconds]
Jason_Gr` has quit [Ping timeout: 260 seconds]
<infinisil>
kalbasit: nah the module system handles that for you
<infinisil>
All different files get merged automatically
<kalbasit>
infinisil: awesome, thank you!
<kalbasit>
side note, where can I find github/irc commands for the bot?
<infinisil>
If you were to set this option multiple times in the same file, then you'd need mkMerge for that to manually merge it
<kalbasit>
for instance, can I ask it to label a PR?
<kalbasit>
infinisil: oh I se
<infinisil>
The bot can't do anything with pr's, it only links them #10
<infinisil>
Special ones are ,find ,locate and ,tell. Invoke them without arguments to see what they're doing. The rest are just string substitution
<infinisil>
,help
<{^_^}>
Use `,` to list all commands, `,foo = Foo!` to define foo as "Foo!", `,foo =` to undefine it, `,foo` to output "Foo!", `,foo somebody` to send "Foo!" to the nick somebody
<infinisil>
(You can't use this ^^ for the special ones)
<samueldr>
kalbasit: on github it is another bot, unrelated
<samueldr>
for tagging purposes, you have to annoy someone who can commit :/
<samueldr>
s/tagging/label/g
<samueldr>
no need for /g :)
<kalbasit>
I see
<kalbasit>
thank you samueldr and infinisil
<samueldr>
though, for what it's worth, I don't think there's any value in adding a "bug" label?
<samueldr>
the labels here are almost abused to be indicators more than actual labels
<samueldr>
like "this changes THIS much" or "this affects THAT thing"
<kalbasit>
oh I see
<kalbasit>
sounds good then
<samueldr>
yeah, your PR looks fine, (not talking about the code though)
<samueldr>
(though for a byte, this too looks fine, it'd need testing :))
Sonarpulse has quit [Ping timeout: 276 seconds]
<samueldr>
oh, you've been busy, three closed, three open in 11 days
<kalbasit>
samueldr: I tested it myself
<samueldr>
ah, didn't mean to imply anything, just can't say "yes" since I looked no more than 5 seconds at the changes ;)