gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
biopandemic has quit [Read error: Connection reset by peer]
yl has quit [Ping timeout: 240 seconds]
<gchristensen> Linux audio is really something.
<aanderse> gchristensen: something = horrible
<gchristensen> yep.
<aanderse> i install a fresh copy of <insert linux distro here>
<aanderse> applicable to nixos as well
<aanderse> or ubuntu
<aanderse> whatever
<aanderse> nvidia card with hdmi to tv
<aanderse> install steam
<aanderse> no second screen
<aanderse> just a simple tv and hdmi
<aanderse> no sound on any game
<aanderse> -_-
<gchristensen> I have this delight of an issue with a VM in qemu being passed audio from PA, record a few seconds of audio (counting 1, 2, 3, 4 - one per second) and 1 sounds fine, 2 sounds okay, 3 on up is about 2-3x speed
<aanderse> of course i only installed kodi and steam because its a htpc box... so no fancy pulseaudio controls
<aanderse> that sounds horrible too
<aanderse> so i load pavucontrol and fiddle around with a game that is running, switch it to nvidia
<aanderse> sound
<aanderse> load up a different game... same issue -_-
drakonis1 has quit [Ping timeout: 255 seconds]
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-chat
drakonis1 has joined #nixos-chat
drakonis has quit [Client Quit]
drakonis1 has quit [Ping timeout: 250 seconds]
drakonis1 has joined #nixos-chat
<infinisil> I'd like to think that I don't really have any audio trouble
<infinisil> But then I remember that I can't use teamspeak anymore because it segfaults due to pulseaudio somehow
<infinisil> And how my bluetooth headphones occasionally do sound jittering so I need to reconnect them
<infinisil> (those two issues are probably not pulsaudio's fault, but still audio related)
<infinisil> Oh and sometimes I need to restart my display manager because audio doesn't work
<infinisil> Yes, you read that correctly, my display manager, iirc restarting pulseaudio didn't fix it
<jasongrossman> Not only is audio on Linux buggy, it's also SO far behind MacOS and Windows in functionality I don't even know where to start. It's so sad.
<jasongrossman> It's the only thing I've totally given up on getting to work well on Linux.
<aanderse> infinisil: regarding davmail "what do you think?" i think you really need an RFC on that
<aanderse> i can see a bunch of pros to what you're doing
<aanderse> i see some cons
<aanderse> but yeah if you're trying to pull nixos down this path, that is a big task and needs an RFC
<gchristensen> I finally cracked my problem.
<aanderse> gchristensen: your audio problem?
<gchristensen> yea
<aanderse> awesome! what was it?
<gchristensen> no idea
<aanderse> just magically started working?
<gchristensen> I set PA_STREAM_ADJUST_LATENCY=30 and waited some seconds
<aanderse> thats usually how i get ps3 controllers to work with a pc... doesn't work, magic happens, then it works
<gchristensen> some people say that caused their problem, some people say it fixed the problem, so I'm sort of assuming it was just "Rub some dirt in it" of audio solutions
<infinisil> aanderse: An RFC would be nice, but would also take a whole while. And there's nothing you *can't* do if you start out with such a config option, it doesn't limit you in any way, so you can always add options later on if you need them. Also this change isn't intrusive at all, it's not a mass refactor, it's very much centralized to the module itself
<infinisil> These properties are making me very willing to implement and merge this technique, even without an RFC
<infinisil> Well, *especially* without an RFC, because it doesn't have any real downsides
<infinisil> I doubt this would sprout much controversy
<aanderse> it does raise the bar to contribution
<aanderse> and the options aren't discoverable, as you said
<aanderse> but...
<aanderse> on the flipside of that
<aanderse> you're talking about very application specific config
drakonis1 has quit [Ping timeout: 240 seconds]
<infinisil> It doesn't raise the bar because nobody is forcing you to implement it. I try me best to only mention this technique as a suggestion (I may have failed a bit at that though :P)
<aanderse> well it means options aren't documented through the module system anymore (which, as you said, kinda is a plus), so it is a pretty big conceptual change
<infinisil> Yeah
<aanderse> if half of nixos modules list config through nixos options and the other half of the modules tell you to tweak through config...
<aanderse> best to have a consensus
<infinisil> Ah yeah, this split of ways of doing it is a bit discussion worthy
<aanderse> mhm
drakonis1 has joined #nixos-chat
<aanderse> in that issue you opened about "should we have a package option?" back in november i think it was... hmm... can't remember who, but someone said the fewer options the better *because* modules should just work
<infinisil> Ah yeah
<aanderse> at the time i thought "but options are good!"... but the more i've started deploying production nixos servers at work...
<aanderse> whoever said that was right
<aanderse> if the service just works, you generally don't need options ...
<jasongrossman> "Configuration is the root of all evil", to quote the design document for the fish shell.
<aanderse> mmm fish
<aanderse> but as michael raskin also pointed out, sometimes you have that crazy need arise
<jasongrossman> Right.
<aanderse> your config idea does strike a nice balance between the two...
<infinisil> aanderse: So this is an argument *for* such a single config option? (Because this makes configuration less discoverable)
<infinisil> This is what we're talking about btw: https://github.com/NixOS/nixpkgs/pull/52096#issuecomment-469526394
<aanderse> infinisil: with 94 nicks in here i'm probably the dumbest one out of the lot... don't ask me to make any such policy :) just tell me what the "blessed" approach is and i'll be happy to comply
* infinisil is slightly confused
<aanderse> i'm saying i don't know what the right answer is
<aanderse> your approach has pros and cons
<aanderse> so does the current way of doing things
<aanderse> i just want an RFC so i know what i'm supposed to be doing, and i can do what everyone else is doing :p
<infinisil> I see, yeah
* infinisil checks on how RFC's in general are progressing right now
<aanderse> selling nixos to the other sysadmins at work is *much* easier if they don't come back to me "why does this module do things *completely* different than that module?"
<aanderse> i've also seen way too many times when someone smart had a neat idea that never caught on... and then you end up with code that no one wants to maintain after they move on
<aanderse> heh
<infinisil> aanderse: On the other hand, have you seen those cthulu modules in nixpkgs?
<aanderse> i have not...
<infinisil> Yes that one for example..
<infinisil> Or prometheus
<aanderse> oh i see what you mean
<aanderse> option overkill
<aanderse> yeah so
<aanderse> i like how you can still provide all the defaults in your example
<gchristensen> prometheus is at least configuring dozens of pieces of software, vs. strongswan's one
<infinisil> And then you get PR's like #56017
<{^_^}> https://github.com/NixOS/nixpkgs/pull/56017 (by elohmeier, 2 weeks ago, open): prometheus: add tls_config
<gchristensen> all valid things. "does it belong in nixos" is a different thing
<gchristensen> and it is very complicated to answer that
<infinisil> gchristensen: Have you read my semantic config explanation?
<gchristensen> not sure
<infinisil> (I should really make an RFC hah)
<aanderse> infinisil: oh yeah, if you do get around to that RFC and want to make some helper functions so those of us who aren't functional programmers can just use a simple function... i wouldn't mind :)
<aanderse> ha ha ha
<infinisil> But this option pretty much allows you to still have all these configs in NixOS, without having to bloat the options and maintaining docs in nixpkgs too
<gchristensen> not sure I agree, hehe
<infinisil> aanderse: Yeah those helper functions are really needed
<infinisil> aanderse: I guess I also just like seeing a breath of fresh air, where modules aren't just repetitive option listings, but instead are a bit more complex, tying stuff together
<infinisil> Like an actual codebase for a reasonable programming language lol
<gchristensen> eh
<gchristensen> services.neo4j.enable = true; does the thing, and I don't need to care about anything else beyond that. that is incredible, and where so much value comes from
<infinisil> gchristensen: That also works with such a config option :)
<gchristensen> ok, well that is a big part of wher emy interests lie
<infinisil> Ah I see, yeah for me too
<infinisil> gchristensen: Such an option would make this even better: You could override default values and inspect the whole config
yl has joined #nixos-chat
<aanderse> infinisil: so what would your solution say about options like "passwordFile"? usually passwordFile needs to be either built or sed'd at application startup
<infinisil> aanderse: If it's not part of the applications configuration file, it can very well be a NixOS option
<aanderse> is that a nixos option? does it belong to config as a "special case" (because the application config file has no "passwordFile" field, only a "password" field)
<infinisil> Special things like that, which add some functionality on top are great as options imo
<infinisil> With such options, NixOS can make configuring things easier than on other distros
drakonis has joined #nixos-chat
<infinisil> aanderse: gchristensen: Oh and here's another good example of why I want such a semantic config option: https://github.com/NixOS/nixpkgs/pull/56345
<{^_^}> #56345 (by Ma27, 1 week ago, open): nixos/sshd: implement support for `Match` groups
<infinisil> Because the sshd module started out with support for a bunch of options + extraConfig, now that people actually want to set more semantic things in their configs, we'll have trouble merging these things correctly
<infinisil> (I guess it's no big problem with openssh though because I think it just uses the last set value)
drakonis1 has quit [Ping timeout: 252 seconds]
drakonis has quit [Quit: WeeChat 2.3]
drakonis1 has joined #nixos-chat
pie__ has joined #nixos-chat
pie___ has quit [Ping timeout: 255 seconds]
drakonis1 has quit [Read error: Connection reset by peer]
drakonis1 has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has joined #nixos-chat
drakonis1 has quit [Read error: Connection reset by peer]
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-chat
endformationage has quit [Ping timeout: 245 seconds]
drakonis_ has quit [Ping timeout: 252 seconds]
jackdk has quit [Ping timeout: 255 seconds]
yl has quit [Ping timeout: 252 seconds]
<ma27> infinisil: as I'm on vacation, I'll read through that discussion later. As mentioned in thr PR's body, I mainly wanted to make the accidental deployment of broken openssh configs harder (after manually reverting one ^^)
drakonis has quit [Read error: Connection reset by peer]
johanot has joined #nixos-chat
__monty__ has joined #nixos-chat
<infinisil> ma27: Enjoy your vacation!
disasm has quit [Ping timeout: 250 seconds]
jtojnar has joined #nixos-chat
<manveru> aszlig: do you happen to have a package for the itch.io app?
<manveru> tried to patchelf the itch-setup, but it just spits out some exception
<manveru> `patchelf: patchelf.cc:320: void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym>::parse() [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym]: Assertion `shstrtabIndex < shdrs.size()' failed.`
<aszlig> manveru: unfortunately not, i'm using their API but not the app
<manveru> ok
<manveru> btw https://puppygames001.itch.io/basingstoke is free for linux now :)
<joepie91> that looks pretty fun
hedning has quit [Quit: hedning]
biopandemic has joined #nixos-chat
endformationage has joined #nixos-chat
<samueldr> joepie91: you might have enough knowledge on a matter which is relevant to me; quoting you "Unfortunately, there's quite a bit of variation between different Promises implementations and environments, in how you are supposed to (globally) detect unhandled rejections. This can make it tricky to reliably log such errors, especially in browsers."
<samueldr> how are you handling the browser side of thingsY?
<joepie91> samueldr: the library you're quoting from should work browser-side :)
<joepie91> so that's what I use when I need to deal with this
<joepie91> implementation-wise, it's... iffy
<joepie91> samueldr: so implementation-wise, it contains logic to hook into the various kinds of events, with event-specific code to normalize it iirc
<joepie91> and on top of that it has a (limited) internal store of observed errors
<joepie91> because in some libraries, the errors can come in through multiple handlers
<joepie91> it's basically just a lot of normalization plumbing
<ldlework> this is probably a good idea https://github.com/tweag/terraform-provider-nixos
<simpson> I'm not a big fan of Terraform, but I like `nix = <<NIX`
<samueldr> joepie91: sorry, I was stopped by a coworker; I'll be frank, I hadn't tested your lib yet, but didn't see any mention of firefox; firefox's implementation of Promises doesn't have unhandled rejection support, I guess then you'd be relying on another JS implementation of promises?
<samueldr> but if I'm relying on native things like `window.fetch`, tested with an initial attempt, those wouldn't be rely on the third-party promises, but on the native promises, which then wouldn't support unhandled events?
<joepie91> samueldr: that question mostly evaluates down to "so it's not possible to *reliably* catch unhandled rejections?" to which the answer is, unfortunately, that you are correct :P
drakonis has joined #nixos-chat
<joepie91> it's very much a best-effort thing
<joepie91> in my own code, I fairly consistently use Bluebird
<samueldr> thanks, good to know I understood the situation
<joepie91> so most of my 'error surface' is handled by Bluebird as well
<samueldr> the "fairly consistently use Bluebird" matches with what I understood
<joepie91> right
<joepie91> it's not a panacea though, like you mentioned with window.fetch
<joepie91> if it's the window.fetch promise itself that you forget to return, it won't be caught in Firefox
<samueldr> yep
<joepie91> but the moment it touches a Bluebird Promise chain (see also http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/ ) it *would* be caught
<joepie91> so you can minimize the problem by consistently using Bluebird or another implementation using Promise.try that has global unhandled rejection events
<samueldr> though now that I'm "rubberducking" it just dawned on me, and confirmed, that since I'm always wrapping fetch it's a non-issue
<joepie91> (Bluebird has a few other niceties like async map/filter/reduce/each and error filtering)
<joepie91> (but is a bit big-ish for a library that goes over the wire)
<samueldr> (wrapping to automatically send useful things like auth and paving over weird things API-wise)
<joepie91> right
<__monty__> Ugh, throwing so much shade with that awesome domain. : s
<joepie91> __monty__: which?
<__monty__> crypto.net
<samueldr> __monty__: you should read again :)
<samueldr> unless there's a non-silent, but invisible P somewhere in the text :)
<__monty__> Ah, gotten rekt.
<gchristensen> ye ol' zero-width p
<samueldr> let me propose to unicode a zero-width combiner, that would be fun
<samueldr> https://google[d][e][f][i][n][i][t][e][l][y].com/ where [*] would be zero-width'd
<samueldr> (please don't propose it)
<__monty__> Ah, the web.
<samueldr> lol
<infinisil> This is the site btw: https://dev.deluge-torrent.org/search
<infinisil> It's horrible all around
<samueldr> hahaha
<samueldr> oh wow
<samueldr> the reason the checkbox is derpy is so dumb
<gchristensen> oh Trac
<samueldr> 10/10
<infinisil> Explanation for a non-webdev person?
<samueldr> they use `id="ticket" name="ticket"` which is a fine pattern for form elements
<samueldr> but they also used #ticket as a CSS selector for *probably* something else on the site
<infinisil> Haha I see
<infinisil> Derp
<joepie91> hi module systems matter
<joepie91> also in CSS
drakonis has quit [Quit: WeeChat 2.3]
johanot has quit [Quit: WeeChat 2.2]
jasongrossman has quit [Ping timeout: 255 seconds]
yl has joined #nixos-chat
<__monty__> Welp, the binary cache is not much of a help with 1Mbps internet.
<simpson> I wish that we knew roughly how long a build might take so that we could trade-off bandwidth vs. CPU more intelligently.
<ldlework> what's the best gnupg key manager
<joepie91> simpson: Hydra already /does/ know that, though?
<joepie91> I feel like that'd just be a matter of exporting the build time metadata on the public cache
<joepie91> and modifying Nix to take an educated guess
<gchristensen> would it though?
yl has quit [Quit: WeeChat 2.2]
<gchristensen> "it took me 45min to build packageX" is not very useful
<gchristensen> "it took me 45min to build packageX when the host was heavily loaded and I had a single core", "it took me 45min to build packageX when the host was relatively unloaded and I had 56 cores"
<joepie91> gchristensen: it's not unprecedented to do quick benchmarks in an application to establish a CPU speed baseline
<joepie91> which can act as a simple modifier
<joepie91> ('simple' as in, literally just multiplying the build time; no need for complex heuristics etc., it just needs to be a rough estimate)
MichaelRaskin has joined #nixos-chat
<joepie91> so if you have exported metadata from hydra that says "I can do X computational units per second, and with Y shares of those computational units, it took me Z time to build this thing", it's relatively simple for the Nix client to do a CPU/network benchmark on the client machine (it only even really has to do that once), determine how big the share is going to approximately be based on load, and then determine "oh it must then take N time to
<joepie91> build this locally" - and based on that determine whether to go for a local build or a network fetch
<MichaelRaskin> gchristensen: You do remember that Windows had this problem where network traffic and audio playback were able to fight over IO under loads where this should not be possible?
<gchristensen> I do, actually
<gchristensen> but I have no network
<MichaelRaskin> As long as you don't replace your desktop with a Windows one to escape Pulseaudio crazyness just to meet a different brand of _also_ sound-related crazy
<gchristensen> ahh
<MichaelRaskin> Also, don't you believe that containers isolate Pulseaudio as well as hardware-level ocean-assisted isolation?
<gchristensen> once I have coalesced in to the dirt I won't need to worry about isolation
<MichaelRaskin> Yeah, that's how we got a lot of invasive species of weeds let out into dirt without proper isolation
<manveru> man, i really wanna package an elixir app :(
<manveru> but looks like i'll have to implement the equivalent of bundix for hex...
<LnL> I think there's a generator for beam packages, but I'm not sure what state it is in
<manveru> there's hex2nix, but it hasn't been updated in over a year
<manveru> and it tries to downloads _all_ hex packages
<manveru> and failed after a few hours for me
<LnL> oh hmm, that's maybe not ideal :)
<manveru> i just need to convert the mix.lock to derivations, shouldn't be too hard
<manveru> (famous last words)
<joepie91> manveru: should I start making the pot of coffee now?
<joepie91> :P
<LnL> not familiar with hex itself but I have the impression it's reasonable, unlike some other languages like python
<manveru> it's definitely better than ruby or python, yeah
drakonis has joined #nixos-chat
<steveeJ> my computer makes music on certain key strokes after being forced to sleep https://usercontent.irccloud-cdn.com/file/PaLFl8TY/2_5188279528169931492.mp4
<srhb> steveeJ: Do you have an android?
<srhb> steveeJ: You can download the lenovo android app and let it hear it to get the diagnostic information for the particular sound sequence
<srhb> It's usually a catastrophic hardware failure fwiw
<steveeJ> oh :-D
<steveeJ> that's better than a hacked firmware :-)
drakonis1 has joined #nixos-chat
<srhb> It's actually a pretty nifty feature :)
<steveeJ> so you're saying I shouldn't ignore this
<srhb> I mean, if it's transient you're probably "fine" if you can live with the lockup or whatever is going on?
<srhb> I'd prefer to know what it's about either way and make decisions from there :P
<steveeJ> the issue is somehow related to the ethernet card. it didn't want to suspend, the journal told me that eth0 has issues sleeping. I unloaded its module (e1000e) and then it could suspend, but it would make those sounds
<srhb> Best case it's just some weird firmware error condition..
<steveeJ> it has been having the issue that it didn't want to suspend lately
<steveeJ> I could imagine it's a driver issue too
<srhb> Try that thing :-)
<steveeJ> I will definitely try it next time it occurs. I just tried and it went to sleep just fine
<srhb> Fun. :P
<steveeJ> t
<steveeJ> thanks for the pointer srhb!
<srhb> Sure thing
<steveeJ> Might be a good idea to install windows on a USB drive and check for firmware updates.
jasongrossman has joined #nixos-chat
<steveeJ> I just learned about https://fwupd.org/lvfs/devicelist
hedning has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
drakonis1 has quit [Quit: WeeChat 2.3]
hedning has quit [Remote host closed the connection]
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 246 seconds]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Remote host closed the connection]
jackdk has joined #nixos-chat
<infinisil> > fortune
<{^_^}> "To err is human, to forgive, beyond the scope of the Operating System."
<jackdk> profound
__monty__ has quit [Quit: leaving]
jasongrossman has joined #nixos-chat
drakonis_ has quit [Quit: WeeChat 2.3]
drakonis has joined #nixos-chat
hedning has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
hedning has quit [Client Quit]