worldofpeace changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | NixOS 20.09 Nightingale ✨ https://discourse.nixos.org/t/nixos-20-09-release/9668 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 20.09 RMs: worldofpeace, jonringer | https://logs.nix.samueldr.com/nixos-dev
orivej has quit [*.net *.split]
scott has quit [*.net *.split]
mmlb has quit [*.net *.split]
tv has quit [*.net *.split]
Baughn has quit [*.net *.split]
Profpatsch has quit [*.net *.split]
kalbasit has quit [*.net *.split]
thibm has quit [*.net *.split]
xwvvvvwx has quit [*.net *.split]
capisce has quit [*.net *.split]
maljub01 has quit [*.net *.split]
greaka has quit [*.net *.split]
yorick has quit [*.net *.split]
kini has quit [*.net *.split]
qyliss has quit [*.net *.split]
sphalerite has quit [*.net *.split]
janneke has quit [*.net *.split]
aranea has quit [*.net *.split]
elvishjerricco has quit [*.net *.split]
LnL has quit [*.net *.split]
Scriptkiddi has quit [*.net *.split]
thoughtpolice has quit [*.net *.split]
angerman has quit [*.net *.split]
alunduil has quit [*.net *.split]
carter has quit [*.net *.split]
aria has quit [*.net *.split]
gleber has quit [*.net *.split]
misuzu has quit [*.net *.split]
Valodim[m] has quit [*.net *.split]
tokudan has quit [*.net *.split]
talyz has quit [*.net *.split]
dtz has quit [*.net *.split]
bennofs[m] has quit [*.net *.split]
zowoq[m] has quit [*.net *.split]
rnhmjoj has quit [*.net *.split]
worldofpeace has quit [*.net *.split]
Irenes[m] has quit [*.net *.split]
siraben has quit [*.net *.split]
nh2[m] has quit [*.net *.split]
flokli has quit [*.net *.split]
qyliss has joined #nixos-dev
janneke has joined #nixos-dev
sphalerite has joined #nixos-dev
kini has joined #nixos-dev
yorick has joined #nixos-dev
angerman has joined #nixos-dev
thoughtpolice has joined #nixos-dev
LnL has joined #nixos-dev
Scriptkiddi has joined #nixos-dev
elvishjerricco has joined #nixos-dev
aranea has joined #nixos-dev
misuzu has joined #nixos-dev
gleber has joined #nixos-dev
aria has joined #nixos-dev
carter has joined #nixos-dev
alunduil has joined #nixos-dev
rnhmjoj has joined #nixos-dev
worldofpeace has joined #nixos-dev
nh2[m] has joined #nixos-dev
Irenes[m] has joined #nixos-dev
zowoq[m] has joined #nixos-dev
bennofs[m] has joined #nixos-dev
talyz has joined #nixos-dev
dtz has joined #nixos-dev
tokudan has joined #nixos-dev
Valodim[m] has joined #nixos-dev
flokli has joined #nixos-dev
siraben has joined #nixos-dev
tv has joined #nixos-dev
thibm has joined #nixos-dev
mmlb has joined #nixos-dev
scott has joined #nixos-dev
orivej has joined #nixos-dev
kalbasit has joined #nixos-dev
Profpatsch has joined #nixos-dev
greaka has joined #nixos-dev
maljub01 has joined #nixos-dev
capisce has joined #nixos-dev
Baughn has joined #nixos-dev
xwvvvvwx has joined #nixos-dev
DamienCassou has quit [Ping timeout: 246 seconds]
Dandellion has quit [Ping timeout: 246 seconds]
timokau[m] has quit [Ping timeout: 244 seconds]
Valodim[m] has quit [Ping timeout: 240 seconds]
worldofpeace has quit [Ping timeout: 240 seconds]
regnat has quit [Ping timeout: 246 seconds]
symphorien[m] has quit [Ping timeout: 246 seconds]
Ox4A6F has quit [Ping timeout: 246 seconds]
roberth has quit [Ping timeout: 246 seconds]
danielrf[m] has quit [Ping timeout: 258 seconds]
Ericson2314 has quit [Ping timeout: 244 seconds]
kraem has quit [Ping timeout: 244 seconds]
ryantm has quit [Ping timeout: 244 seconds]
elvishjerricco has quit [Ping timeout: 272 seconds]
dtz has quit [Ping timeout: 240 seconds]
zowoq[m] has quit [Ping timeout: 240 seconds]
bennofs[m] has quit [Ping timeout: 240 seconds]
rnhmjoj has quit [Ping timeout: 240 seconds]
Irenes[m] has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 240 seconds]
maralorn has quit [Ping timeout: 246 seconds]
aanderse has quit [Ping timeout: 246 seconds]
michaelpj has quit [Ping timeout: 246 seconds]
jtojnar has quit [Ping timeout: 246 seconds]
bk1603[m] has quit [Ping timeout: 246 seconds]
garbas[m] has quit [Ping timeout: 246 seconds]
domenkozar[m] has quit [Ping timeout: 260 seconds]
JJJollyjim has quit [Ping timeout: 244 seconds]
colemickens has quit [Ping timeout: 246 seconds]
aranea has quit [Quit: beep bop]
puzzlewolf has quit [Ping timeout: 260 seconds]
aterius has quit [Ping timeout: 260 seconds]
immae has quit [Ping timeout: 268 seconds]
thefloweringash has quit [Ping timeout: 268 seconds]
aranea has joined #nixos-dev
emily has quit [Ping timeout: 246 seconds]
philipp[m] has quit [Ping timeout: 246 seconds]
angerman has quit [Ping timeout: 274 seconds]
aria has quit [Ping timeout: 274 seconds]
jonge[m] has quit [Ping timeout: 246 seconds]
ma27[m] has quit [Ping timeout: 268 seconds]
carter has quit [Ping timeout: 264 seconds]
alunduil has quit [Ping timeout: 264 seconds]
Thophane[m] has quit [Ping timeout: 258 seconds]
bbigras has quit [Ping timeout: 258 seconds]
aria has joined #nixos-dev
angerman has joined #nixos-dev
nh2[m] has quit [Ping timeout: 240 seconds]
alunduil has joined #nixos-dev
carter has joined #nixos-dev
lopsided98 has quit [Ping timeout: 268 seconds]
elvishjerricco has joined #nixos-dev
lopsided98 has joined #nixos-dev
DamienCassou has joined #nixos-dev
timokau[m] has joined #nixos-dev
Valodim[m] has joined #nixos-dev
worldofpeace has joined #nixos-dev
regnat has joined #nixos-dev
roberth has joined #nixos-dev
Ox4A6F has joined #nixos-dev
<V> I totally missed that issue's existence
Dandellion has joined #nixos-dev
immae has joined #nixos-dev
symphorien[m] has joined #nixos-dev
bk1603[m] has joined #nixos-dev
ma27[m] has joined #nixos-dev
mikroskeem has joined #nixos-dev
zowoq[m] has joined #nixos-dev
domenkozar[m] has joined #nixos-dev
rajivr has joined #nixos-dev
Dandellion has quit [Ping timeout: 240 seconds]
symphorien[m] has quit [Ping timeout: 244 seconds]
immae has quit [Ping timeout: 244 seconds]
roberth has quit [Ping timeout: 244 seconds]
Ox4A6F has quit [Ping timeout: 240 seconds]
zowoq[m] has quit [Ping timeout: 246 seconds]
Valodim[m] has quit [Ping timeout: 246 seconds]
DamienCassou has quit [Ping timeout: 246 seconds]
domenkozar[m] has quit [Ping timeout: 240 seconds]
regnat has quit [Ping timeout: 240 seconds]
worldofpeace has quit [Ping timeout: 258 seconds]
timokau[m] has quit [Ping timeout: 258 seconds]
ma27[m] has quit [Ping timeout: 260 seconds]
bk1603[m] has quit [Ping timeout: 268 seconds]
<flokli> halfbit: samueldr: I had some success in cross-compiling NixOS for a pynq (armv7l), including tooling to synthesize fpga bitstreams
<flokli> Wrapping vivado in a nix build wasn't fun at all, but did work out in the end
<flokli> But the good part was that changing something there was mostly copying over the new closure and switching to it
<flokli> Much better than fiddling around manually on the board
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nixos-dev
<flokli> But hardware-near development often is way more duct-tape-y, and getting it to work every once and then is fine.
jtojnar has joined #nixos-dev
<flokli> I'm not sure if there's much market for "doing it properly and repeatable"
<samueldr> flokli: I was only talking about the usual "there's no cache, so YMMV"
<flokli> Ah
<flokli> Well yeah, there are caches
<flokli> Just my own ;-)
<flokli> I would like to have more insightful hardware definitions for that low level stuff. But gosh, all the lua scripting I've seen that glues stuff together and is called a build system... Makes me think differently
<cole-h> V++
<{^_^}> V's karma got increased to 9
<cole-h> Interestingly enough, I can `git fetch origin refs/pull/78315/head && git checkout FETCH_HEAD`
<V> guess how I just got that link
<cole-h> :P
puzzlewolf has joined #nixos-dev
symphorien[m] has joined #nixos-dev
colemickens has joined #nixos-dev
maralorn has joined #nixos-dev
emily has joined #nixos-dev
Dandellion has joined #nixos-dev
roberth has joined #nixos-dev
aterius has joined #nixos-dev
kraem has joined #nixos-dev
michaelpj has joined #nixos-dev
ryantm has joined #nixos-dev
JJJollyjim has joined #nixos-dev
aanderse has joined #nixos-dev
Valodim[m] has joined #nixos-dev
immae has joined #nixos-dev
timokau[m] has joined #nixos-dev
worldofpeace has joined #nixos-dev
DamienCassou has joined #nixos-dev
siraben has joined #nixos-dev
bbigras has joined #nixos-dev
danielrf[m] has joined #nixos-dev
jonge[m] has joined #nixos-dev
domenkozar[m] has joined #nixos-dev
Ox4A6F has joined #nixos-dev
dtz has joined #nixos-dev
thefloweringash has joined #nixos-dev
nh2[m] has joined #nixos-dev
Thophane[m] has joined #nixos-dev
philipp[m] has joined #nixos-dev
bk1603[m] has joined #nixos-dev
garbas[m] has joined #nixos-dev
Ericson2314 has joined #nixos-dev
rnhmjoj has joined #nixos-dev
Irenes[m] has joined #nixos-dev
bennofs[m] has joined #nixos-dev
regnat has joined #nixos-dev
zowoq[m] has joined #nixos-dev
ma27[m] has joined #nixos-dev
<gchristensen> lol
<gchristensen> infinisil: I'd say no, but that is exactly what I would say if it was mine
<V> systemd gang represent
kalbasit_ has joined #nixos-dev
AlwaysLivid has joined #nixos-dev
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nixos-dev
jonringer has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 264 seconds]
mkaito has quit [Quit: WeeChat 3.0]
<colemickens> whoa, sudo gddccontrol works on my monitor, the windows util didn't think it would work
<gchristensen> nice
<colemickens> how did I manage to send that here
<cole-h> nice
<siraben> qyliss, Profpatsch: I came up with a semi-automated way to resolve undefined lib errors after performing a sed replacement on an entire subtree of nixpkgs
<siraben> i'll post a PR shortly
<siraben> this is a continuation of stdenv.lib → lib of course
<Profpatsch> siraben: nice, cool
<siraben> #109425
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109425 (by siraben, 9 seconds ago, open): Stdenv lib
jonringer has joined #nixos-dev
pmy has quit [Quit: WeeChat 3.0]
pmy has joined #nixos-dev
Profpatsch has quit [Quit: WeeChat 2.9]
Profpatsch has joined #nixos-dev
pmy has quit [Quit: WeeChat 3.0]
pmy has joined #nixos-dev
<siraben> not hnix unfortunately, just some good old sed
pmy has quit [Client Quit]
<siraben> dammit i need to do this on staging instead because of all the whitespace errors >.<
<siraben> is it ok to target staging-next?
pmy has joined #nixos-dev
pmy has quit [Client Quit]
pmy has joined #nixos-dev
<cole-h> What whitespace errors and why does that need to go to staging?
<siraben> cole-h: EditorConfig is failing
<siraben> Staging already has my whitespace fixups
<siraben> But if not I can rebase on master again
<siraben> If this gets merged to master, staging-next has my whitespace cleanups, won't we have a merge conflict when we try to merge staging-next into master?
<V> siraben: "preforming"
<siraben> preforming?
<siraben> ah thanks
<V> oh, is the order lib and then stdenv? I guess that makes sense
<siraben> (typo in PR)
<siraben> I dunno, I based that off of the hnix automated change II
<siraben> performed by Profpatsch
<siraben> but yeah I think it makes sense now that lib is independent of stdenv
<siraben> Also I'm going to rebase on master again, we need to move to deprecate stdenv.lib
<siraben> Anyone know how to cherrypick N commits?
<siraben> Or reply N commits onto a different branch?
<siraben> replay*
<siraben> nvm found the answer on SO
<V> do tell
<V> that answer should not be the accepted one
<siraben> git rebase -p --onto master stdenv-lib~4 stdenv-lib is not good?
<V> that's not the accepted answer
<V> it should be
<siraben> Oh sorry yeah I used the second answer
<V> I was commenting on the page in general, I know you didn't link me a specific answer
<siraben> heh "accepted" is so inconsistent I usually read the answer that has a high number of upvotes
<V> for a site that claims to be a wiki, this seems to be such a deficiency
<V> oh, same
<siraben> uh oh, pkgs/stdenv/adapaters.nix has `replaceMaintainersField = stdenv: pkgs: maintainers: stdenv //`
<siraben> and uses stdenv.lib in the body
<siraben> adapters*
<V> I'd take a look if I wasn't already at like 5 tangents
supersandro2000 has quit [Quit: Ping timeout (120 seconds)]
supersandro2000 has joined #nixos-dev
<siraben> no worries
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
<qyliss> siraben: I don't think it matters too much but I'd prefer stdenv, lib
<qyliss> I wish I'd thought of it before Profpatsch's PR was merged but didn't
<siraben> next pedantic pr: standardize stdenv, lib order :D
<siraben> it doesn't matter AFAIK
<cole-h> qyliss: Agreed. Mostly just because stdenv is used before lib in most cases
<V> just because it classically is doesn't mean it makes sense to
kalbasit_ has quit [Ping timeout: 246 seconds]
<V> e.g. in NixOS it's lib, pkgs; stdenv is in pkgs
<V> therefore the ordering should be lib, stdenv :p
<cole-h> I'm talking about in packages, because you typically use stdenv (typically for mkDerivation) before lib (typically for meta)
<siraben> why does ofborg get an evaluation error and I don't?
<cole-h> Try running outpaths.nix (https://github.com/NixOS/ofborg#running-meta-checks-locally) and hydra-eval-jobs with `hydra-eval-jobs -I . pkgs/top-level/release.nix`
supersandro2000 has joined #nixos-dev
<Profpatsch> siraben: you can safely ignore editorconfig
<Profpatsch> It fails for many files because it’s written badly
<Profpatsch> argv too long
<siraben> Profpatsch: oh?
<siraben> ok I won't heed to it any more
<Profpatsch> yeah, for these only make sure that everything evaluates
<Profpatsch> qyliss ran the checks for me last time, it needs >16GB of ram
<siraben> 778 files changed now o.O
<Profpatsch> I have a script that randomly evaluates stuff in nixpkgs, so you can find the worst offenders rather fast
<V> cole-h: I know you're talking about derivations
<siraben> I use `nix-env -f . -qaP --xml --out-path --show-trace --meta`
<siraben> Profpatsch: I see
<Profpatsch> I guess what I want to say is: run that script for a bunch of minutes, then you should have everything that’s not a leaf
<Profpatsch> And then you can run a full eval to catch everything that’s left
<siraben> lol my script made `{lib, lib, lib, lib, lib, lib, lib, lib, lib, lib, lib, lib, stdenv, fetchurl, unzip, findXMLCatalogs}:`
<Profpatsch> siraben: that’s why I used hnix to check for that :)
<siraben> the offending line was `inherit stdenv unzip findXMLCatalogs;`
<Profpatsch> siraben: you can reuse it, just import it into your scripts
<siraben> which should have `lib`
<siraben> so it kept adding lib to the function inputs and the same eval error was happening
<V> lol
<V> Profpatsch: didn't realised you had uploaded that
<siraben> Profpatsch: yeah but the issue was isn't redundant lib, it was needing to inherit lib into a set as well
<V> s/realised/realise/
<siraben> s/was isn't/wasn't
<siraben> uh oh pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.4.nix has the same error
<Profpatsch> git clone https://code.tvl.fyi && cd depot && nix-build -A users.Profpatsch.nixpkgs-rewriter.add-lib-if-necessary
<Profpatsch> you will need to add the add-lib-if-necessary to the export list of nixpkgs-rewriter/default.nix
<V> Profpatsch: you missed a depot
<Profpatsch> It uses hnix to check whether the header already has a lib, then outputs a json with the span
<Profpatsch> V: in the clone?
<V> aye
<Profpatsch> I just copied the link from code.tvl.fyi
<Profpatsch> I think depot is automatically added?
<V> no
<V> I just checked
<V> because I was wondering if it had something automagic
<Profpatsch> V: wfm
<qyliss> just catching up -- do you need me to run an evaluation?
<Profpatsch> ah, ofc git doensn’t name the directory depot then, but code.tvl.fyi
<V> v@february ~> git clone https://code.tvl.fyi
<V> Cloning into 'code.tvl.fyi'...
<Profpatsch> Actually it doesn’t work when you use /depot
<V> where are you getting that slash from
<Profpatsch> So the best invocation is git clone https://code.tvl.fyi depot
<V> yes
<V> that's how git clone normally works?
<Profpatsch> yep
<siraben> Ok I'm getting errors like https://gist.github.com/GrahamcOfBorg/ed5938d4ba9e6b004d4c783a419cf7f6 because lib is not imported, Profpatsch your haskell code will fix that?
<Profpatsch> Usually I leave the dirname out, but in this case you actually need it
<Profpatsch> siraben: that’s the idea
<Profpatsch> siraben: you first get a list of all the files you want to do the replacement in, then you do the replacement on them, then you run add-lib-if-necessary
<V> Profpatsch: no, you misunderstand. I am perfectly familiar with git clone, I don't understand where you're getting /depot from
<Profpatsch> V: nvm, miscommunication
<Profpatsch> doesn’t exist
<V> on whitby perhaps
<Profpatsch> It’s a bit confuse in situations, because most software expects subrepos to exist, but depot is hardwired in some places
<Profpatsch> But not in others, so links might be nonstandard
<siraben> is there a one line command to run what ofborg is running? I seem to be missing packages where I failed to add lib
<Profpatsch> e.g. I can’t use the normal cgit form for building links
<siraben> should be able to adapt my script
<cole-h> siraben: outpaths.nix is one part you can run
<Profpatsch> Because usually cgit links are git.foo.com/subrepo/<stuff>, in tvl it’s code.tvl.com/<stuff>
<siraben> cole-h: how do I run that?
<V> Profpatsch: it's a little queer, but not unmanageable
<qyliss> siraben: it's in the OfBorg README
<siraben> thanks
<Profpatsch> siraben: I had a few cases where the replacement logic of these two replacements was not enough: https://cs.tvl.fyi/depot/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix#L57-60
<Profpatsch> siraben: Ideally it would also use hnix to get all the subspans of all the arguments, but hnix doesn’t provide spans for that
<Profpatsch> thus, we should switch to tree-sitter
<Profpatsch> qyliss: yeah, I suspected so much
<Profpatsch> *as much
<siraben> yep, got it
<cole-h> 👍
<Profpatsch> I wanted to add tvl support for git-link-mode, but had to create my own plugin because of that inconsistency
<siraben> running the check locally is taking a while
<qyliss> it does take a while
<qyliss> it also needs lots of RAM
<qyliss> we should also remember to run hydra-eval-jobs on this PR
saschagrunert has joined #nixos-dev
<siraben> ofborg gives green light
<siraben> now automatically fixing pkgs/tools
<qyliss> siraben: how much trouble is it to switch to stdenv, lib?
<siraben> Probably just a sed command?
<siraben> should I hold a poll on the PR?
<qyliss> I'm not sure you really need to -- I'd never seen lib, stdenv in Nixpkgs before Profpatsch's PR
<V> v@february ~/s/nixpkgs (local)> rg 'stdenv, lib' | wc -l
<V> v@february ~/s/nixpkgs (local)> rg 'lib, stdenv' | wc -l
<V> 800
<V> 220
<V> so it's about 1:4
<V> not that rare
<siraben> Ok will apply a commit lib, stdenv → stdenv, lib then
<siraben> I want stdenv to be first as well
<V> why?
<qyliss> V: how rare was it before Profpatsch added a bunch of them though?
<cole-h> Note that doesn't take into account `lib\n,stdenv` or `stdenv,\nlib`
<V> what's the logic behind it?
<V> qyliss: I don't have that
<qyliss> V: consistency
<siraben> I have
<V> my latest nixpkgs is from jan 5th
<V> qyliss: arguably it's more consistent to convert all the 'stdenv, lib' into 'lib, stdenv'
<siraben> (on my branch which introduced a lot of lib, stdenv)
<siraben> someone run it on upstream/master please?
<V> b/c lib is used prior to anything else in nixos, and b/c it's "pure" insomuch as that it doesn't depend on stdenv, whereas vice versa holds (not that this matters within the drv)
<siraben> Yeah, makes sense.
<qyliss> siraben: 6225 '{ lib, stdenv', 780 '{ stdenv, lib'
<V> stdenv only goes first in a lot of places b/c packages are written as { }: stdenv.mkDerivation { }, not because stdenv is special
<qyliss> I can see where you're coming from
<V> if we make stdenv be the first arg, then we should make mkDerivation come before lib as well
<V> (I could go on)
<qyliss> if we're going to change it, we need to update the examples in the manual
<qyliss> if somebody puts together a PR for that I think it's fine
<V> that feels like something that can be done seperately to this
<V> we don't need to change all the existing stdenv, lib to insert new lib, stdenv
<qyliss> no, but it should be clear what approach is recommended
<qyliss> and the manual is the place to do that
<V> Sure
<V> I agree with you
<qyliss> what I do not want is the situation where we merge this and months later the manual is still showing people { stdenv, lib
<siraben> Hmm
<qyliss> there aren't that many ';o-sz
<siraben> Profpatsch: thoughts?
<qyliss> there aren't that many examples in the manual
<qyliss> it would be a small enough change
<V> I'm happy to write the necessary documentation my self & perform the treewide, but <V> I'd take a look if I wasn't already at like 5 tangents
<V> I think I'm on 6 actually
<qyliss> but I think it should be done by somebody who is more convinced of the change than I am
<V> as I said
<V> happy to make the PR myself, but it's going on my to-do list
<qyliss> that's good enough for me
<qyliss> I don't think the treewide is that important because lib, stdenv now so fastly outnumbers the inverse
<qyliss> but the manual needs to be updated relatively soon
<V> ack
jonringer has quit [Ping timeout: 264 seconds]
<siraben> oh man there's a lot of packages in pkgs/tools
<qyliss> there are subcategories within, so you could always split up further
<qyliss> although I suspect pkgs/tools/misc is itself pretty huge
<siraben> down to o.* now
<Profpatsch> siraben: I don’t care at all about the argument order
<Profpatsch> People are copy-pasting thing anyway
<siraben> qyliss: how long does it take to generate that graph showing stdenv.lib occurences?
<qyliss> the script takes under a minute
<qyliss> I'm running it on a 15 minute timer
<siraben> supersandro2000: how do I check the ofborg rebuilds?
cole-h has quit [Ping timeout: 260 seconds]
<siraben> s.* now
<siraben> seems pretty tamely so far, haven't had to change stuff like `let lib = stdenv.lib'`
supersandro2000 has quit [Ping timeout: 265 seconds]
<Profpatsch> siraben: There’s also the fact that sed-replacing stdenv with lib, stdenv is more correct than stdenv with stdenv, lib
<Profpatsch> Because stdenv ? foo
supersandro2000 has joined #nixos-dev
<siraben> Ah didn't think of that, nice.
<Profpatsch> So your replacements need to slightly more clever if you want to not stumble over these cases, guess I was not clever enough
<Profpatsch> Actually, I re-ran my scripts with the other ordering because I stumbled over it
<Profpatsch> This is fixed by using a parser that outputs spans and then doing a span transpose
<Profpatsch> e.g. emacs has `transpose-regions`
<siraben> Right.
<siraben> when this PR is merged i may be causing merge conflicts across other PRs, :P
<siraben> It had to be done.
<Profpatsch> always happens
<Profpatsch> merge conflics are just a thing that people have to know how to deal with
<Profpatsch> It’s part of the trade
<siraben> Right
<siraben> Dang, premature merge, I was still working on pkgs/tools lol
<qyliss> uhhh
<siraben> Mic92 merged it
<Mic92> siraben: but the current version was ok, no?
<siraben> Yeah it was
<qyliss> siraben: I guess that means you're less likely to run into merge conflicts :)
<Mic92> siraben: That's fine than. Smaller prs are good
<siraben> :)
<siraben> I'll make a separate PR for tools
<qyliss> makes the graph look nicer if there are more data points :P
<siraben> my god, my tools WIP has 916 unstaged files which is larger than applications, games, servers, shells combined
<siraben> definitely for a separate PR
<rnhmjoj> V: thank you!
<V> ^_^
rnhmjoj has quit [Changing host]
rnhmjoj has joined #nixos-dev
rnhmjoj has joined #nixos-dev
rnhmjoj has quit [Changing host]
<rnhmjoj> how did you find the commit?
<V> as cole-h said
<V> git fetch origin pull/78315/head && git rev-parse FETCH_HEAD
<rnhmjoj> interesting, so the reference still exist
<qyliss> yeah
<Mic92> rnhmjoj: you can also use hub, and than git checkout https://github.com/NixOS/nixpkgs/pull/109324 works
<{^_^}> #109324 (by tpwrules, 1 day ago, merged): lxqt: fix themes and translations
<V> function yoink -a what; git fetch -q origin pull/$what/head && echo https://github.com/NixOS/nixpkgs/commit/(git rev-parse FETCH_HEAD); end
<V> (untested)
<V> of course, this requires you to manage to figure out what the pull request ID is, know that GitHub stores all objects from all forks in the same superrepository, know that GitHub provides refs for pull requests, and know that it doesn't delete the ref even if the PR is "gone"
<V> which I daresay most people would have no idea about
AlwaysLivid has quit [Remote host closed the connection]
<rnhmjoj> > I totally missed that issue's existence
<{^_^}> undefined variable 'I' at (string):466:1
<rnhmjoj> V: are you volth?
AlwaysLivid has joined #nixos-dev
<V> no, I'm V
<rnhmjoj> a masked vigilante who happened to know about the nat loopback PR?
<qyliss> if one has IRC logs or email notifications one can know about every PR ;)
AlwaysLivid has quit [Remote host closed the connection]
<qyliss> that one specifically came up because I read and linked your comment about it being gone, and asked which PR number it was, intending to do the same thing V did to recover it for you
AlwaysLivid has joined #nixos-dev
<V> rnhmjoj: no comment :)
orivej has joined #nixos-dev
<V> any resemblence to similarly named persons, fictitious or real, is entirely a coincidence
<rnhmjoj> V: uhmm, i see
* V nods
<rnhmjoj> btw, i had also posted in a comment a fancy nixos test to check the loopback was working correctly...
<rnhmjoj> i can't find the page using the wayback machine, so that's probably gone for good
<qyliss> rnhmjoj: somebody might have the email notification
<siraben> pkgs/tools: 109434
<rnhmjoj> qyliss: that's a good idea but i don't think there were other participants, unless someone subscribed but never commented
<siraben> #109434
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109434 (by siraben, 1 minute ago, open): pkgs/tools: stdenv.lib -> lib
<siraben> huh need the hash for the bot to display URL
<qyliss> rnhmjoj: some people watch the repository, so get notifications for all activity on all issues and PRs
<rnhmjoj> oh right, i forgot about that: i turned it off as soon as received commit access to not get overloaded with emails
<qyliss> I should turn it back on
<qyliss> and just filter them out
<siraben> qyliss: https://edef.eu/~qyliss/nix/lib/ didn't change much?
<qyliss> siraben: yeah I'm a bit confused
<qyliss> I'll look into it to make sure it's not broken
<siraben> I'm trying to run it locally
<siraben> What's libs.dat?
<siraben> tail: cannot open 'libs.dat' for reading: No such file or directory
<qyliss> siraben: the data file
<qyliss> at some point I modified a script in a way that assumed it already had some data
<qyliss> you can download the data file from the page
<V> rnhmjoj: can you tell me roughly when you submitted this
<V> within the month is useful
<siraben> qyliss: fatal: not a git repository: './.' I am in nixpkgs, though
<qyliss> siraben: note GIT_DIR
<qyliss> if you're in a git repo you can just delete that line
<siraben> ok
* siraben uploaded an image: Screen Shot 2021-01-15 at 16.33.57.png (10KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/FgOPxatgCyJOErQZJZNuzSMM/Screen Shot 2021-01-15 at 16.33.57.png >
<siraben> renders fine locally
<rnhmjoj> V: i'm taking a look at my $HISTORY to see if i can find a date
<qyliss> siraben: seems to have picked it up now
<qyliss> not really sure what happened
<siraben> qyliss: nice
<siraben> 37381 → 35645 occurences
<siraben> someone's working on the autogenerated Haskell package set IIRC
<qyliss> yeah, rnhmjoj
<qyliss> hmm I should see if this looks better as a line graph
<rnhmjoj> V: looks like around march 3 2020
<qyliss> oh yeah that's better
<qyliss> siraben: reload :)
<siraben> qyliss: great!
<qyliss> I wonder how many packages we have that use mkDerivation, set a checkPhase, but forget to set doCheck = true
<qyliss> because I've found two since yesterday
FRidh has joined #nixos-dev
<qyliss> siraben: error: undefined variable 'lib' at /home/qyliss/src/nixpkgs-lib/pkgs/tools/compression/kzipmix/default.nix:23:21
<siraben> uh oh
<siraben> I wonder why ofborg didn't catch that?
<qyliss> ofborg hasn't run yet afaict
<qyliss> this is on #109434
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109434 (by siraben, 50 minutes ago, open): pkgs/tools: stdenv.lib -> lib
<siraben> ah
<qyliss> yeah dw
<FRidh> niksnut: sphalerite: reminder we have the rfc 75 meeting at 13:00 CET
<niksnut> FRidh: +1
<siraben> Mic92: I requested your review on #109434
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109434 (by siraben, 1 hour ago, open): pkgs/tools: stdenv.lib -> lib
<siraben> Mic92: thanks
<siraben> another 2000 or so occurences of stdenv.lib removed!
<qyliss> siraben: I've figured out what's up with the graph
<qyliss> git log --first-parent -G '[sS]tdenv.*\.lib' --merges nixpkgs/master
<qyliss> outputs nothing
<qyliss> so I'm guessing -G doesn't look at merges
<siraben> Ah I see. But I ran it locally and it worked
<qyliss> I'm going to put that down to timezones
<qyliss> My script assumes local time is UTC
<qyliss> I imagine it'll find different commits on another timezone
<Taneb> https://hydra.nixos.org/job/nixos/trunk-combined/tested seems to be failing due to a cached failure that's been restarted and succeeded?
<sphalerite> FRidh: ack :)
srk has quit [Write error: Broken pipe]
AlwaysLivid has quit [Write error: Broken pipe]
<qyliss> siraben: regenerating the graph
AlwaysLivid has joined #nixos-dev
srk has joined #nixos-dev
<siraben> qyliss: how long will that take?
<siraben> oh i can see the progress live
<qyliss> yeah :)
<siraben> how to perform a streaming curl?
<qyliss> I think my server would need to support that
<qyliss> rather than curl having to do anything
<edef> if the file is append-only, you could use `curl -C -`
<qyliss> like, the server closes the connection when it gets to the end of the file
<edef> and just poll
<qyliss> oh yeah that'd work
<siraben> curl -C - https://edef.eu/~qyliss/nix/lib/libs.dat stops at end end
<siraben> s/end/the
<edef> yes, but if you run it in a sleeping loop
<edef> then you'll hammer my server a bit but that's ok
<edef> just don't run it with too short a timeout
<siraben> Heh I'll just wait :)
<edef> or run it in a cronjob or w/e
<rnhmjoj> can anyone more familiar with the nixos module system help review this? #106767
<{^_^}> https://github.com/NixOS/nixpkgs/pull/106767 (by erikarvstedt, 4 weeks ago, open): nixos-container: fix `nixpkgs` container options being ignored
kini has quit [Ping timeout: 264 seconds]
kini has joined #nixos-dev
justanotheruser has quit [Ping timeout: 246 seconds]
<siraben> I just realized I didn't do sed with /g
<siraben> hmm
* supersandro2000 another treewide PR!
<siraben> well there were some folders yet to be done anyway, so I'll lump them together, hehe
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-dev
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-dev
__monty__ has joined #nixos-dev
zarel has joined #nixos-dev
<siraben> qyliss: wow regeneration is taking a while
<Profpatsch> supersandro2000: not sure what you want to tell us with that exclamation?
<Profpatsch> qyliss: as a line graph you can’t see the different PRs and how much they make up for the changes, since they are all very close together so the downwards line is gonna be a very straight one
<siraben> qyliss: might be good to make the dots smaller
<siraben> or circular
<siraben> This is definitely it for removing simple stdenv.lib from pkgs, except for pkgs/development. #109455
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109455 (by siraben, 43 seconds ago, open): treewide: stdenv.lib -> lib
<qyliss> ack re graph format
jonringer has joined #nixos-dev
<supersandro2000> ack? ripgrep!
<supersandro2000> ripgrep can even to the replace part
<supersandro2000> but not write
FRidh has quit [Quit: Konversation terminated!]
mkaito has joined #nixos-dev
<siraben> supersandro2000: I think they meant ack is in acknowledged
<supersandro2000> idk.
<siraben> lol I'm literally relying on ofborg to show me evaluation errors because it takes too long to run it locally
<supersandro2000> can't you do nix-env -f . -qa ?
<siraben> I do nix-env -f . -qaP --xml --out-path --show-trace but shows everything is ok
<ekleog> rnhmjoj: I've just been pointed to some backlog where you asked about people being subscribed, I'm watching the whole repo (though filtering most things out), is there anything I can grab back for you?
<ekleog> (actually that makes me think that if there are some specific volth issue/PR comments we want to recover I can probably recover them from my email archive, if they are more recent than mid-october 2018, date at which I turned that on)
<rnhmjoj> ekleog: oh, thank you: do you happen to have anything about this PR? #78315
<ekleog> rnhmjoj: http://ekleog.xelpaste.net/3gq5qQ/raw not sure that has what you hope for :/
<rnhmjoj> ekleog: thank you very much! that was enough for me to recover the patch i have been looking for
<ekleog> Cool! :D
<rnhmjoj> ekleog++
<{^_^}> ekleog's karma got increased to 12
saschagrunert has quit [Remote host closed the connection]
<V> nice
<V> screw github though
<V> we definitely need another solution
<rnhmjoj> yeah, i would love if nixos were to move to a self-hosted forge
<siraben> this dance with ofborg is so annoying
<gchristensen> how can I help, siraben?
<adisbladis> rnhmjoj: There are a lot of us who would love that
<adisbladis> But that is an absolutely massive undertaking
<gchristensen> siraben: do you need a big machine to help evaluate faster?
<siraben> gchristensen: could you evaluate #109455 and let me know what I need to fix?
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109455 (by siraben, 1 hour ago, open): treewide: stdenv.lib -> lib
<siraben> I'll force-push accordingly
<gchristensen> siraben: what if I handed you a machine?
<siraben> that would be useful, thanks. I'll only use it for evaluation
<siraben> this is the command to do it right? GC_INITIAL_HEAP_SIZE=4g nix-env -f ./outpaths.nix -qaP --no-name --out-path --arg checkMeta true > out-paths
<rnhmjoj> adisbladis: yes, i can imagine all the work with migrating from actions, various github api, rewriting links... without considering setting and managing the servers
<siraben> maybe it's because i'm not evaluating non-darwin packages
<siraben> hmmm
<siraben> would nix-env -f . -qaP --argstr 'x86_64-linux' --xml --out-path --show-trace work?
<V> rnhmjoj: OTOH we'll no longer be using effectively 3-4 different CI systems :p
<rnhmjoj> V: what other CI are in use? i only know of ofBorg in nixpkgs
<V> rnhmjoj: actions, hydra, ofborg
<V> then there's r-ryantm
<V> which is another part of that whole infra I feel
<V> I guess we can't forget marvin
<V> the list goes on...
<V> not that the diversity is a bad thing, just that it's all very scattered
<siraben> oh marvin, the robot who is always depressed
<siraben> r-ryantm is amazing
<rnhmjoj> i like when r-ryantm updates my package and then ofBorg comes up and test it: i almost fear i'll be loosing my job one day
<siraben> bots reviewing bot PRs O.o
<siraben> can someone with a beefy machine clone #109455 and let me know what the next eval error is?
<{^_^}> https://github.com/NixOS/nixpkgs/pull/109455 (by siraben, 1 hour ago, open): treewide: stdenv.lib -> lib
<siraben> don't know why nix-env -f . -qaP --xml --out-path isn't enough to pick up eval errors
<gchristensen> siraben: I assume this key's https://github.com/siraben.keys 's private key is at ~/.ssh/id_rsa ?
<siraben> gchristensen: yes
<siraben> done
<gchristensen> then ssh root@5ed9aa51.packethost.net
<siraben> in, thank you!
<gchristensen> that cert.pub file will expire in 30 minutes, but your session will last as long as you need it
<siraben> Hm, no git
<gchristensen> do whatever you need to the machine, it'll be erased before it goes back in to hydra
<siraben> ok
<siraben> gchristensen: how do I get git?
<gchristensen> presumably nix :P
<siraben> yeah but can't even enter a nix shell without NIX_PATH, hm
<gchristensen> NIX_PATH=channel:nixos-unstable-small
<supersandro2000> use ed25519
<siraben> gchristensen: thanks
<gchristensen> this process for taking a machine for community use is almost automatic ... would be nice to finish that off and make it easy
<siraben> I'm getting error: undefined variable 'libc' at nixpkgs/pkgs/os-specific/darwin/usr-include/default.nix:17:14
<siraben> where is libc supposed to be defined?
cole-h has joined #nixos-dev
<Thophane[m]> <siraben "I'm getting error: undefined var"> `stdenv.libc` that has been too eagerly replaced?
<gchristensen> that would be a clbuttic explanation!
<siraben> Théophane: ah, thanks!
<siraben> gchristensen: is there no lightweight way to do ofborg's evaluation?
<siraben> none of these evaluation errors would have been caught by command
<cole-h> Evaluation is heavy because Nixpkgs is heavy.
<cole-h> There's also `hydra-eval-jobs` that would help.
<gchristensen> you have to evaluate everything to find all the problems
<siraben> gchristensen: I quit the session, it's getting late here and I have to go, thanks again.
<gchristensen> siraben: I can get you another machine when you're around again
<siraben> pkgs/os-specific seems to be a pain to remove stdenv.lib from, since I have to do a full evaluation
<siraben> gchristensen: alright
<gchristensen> siraben: oh btw that machine will get erased soon, did you have anything you wanted to keep?
<siraben> gchristensen: nope, all good
* cole-h runs hydra-eval-jobs on that PR
<gchristensen> cole-h: want that machine?
<cole-h> Nah, I can just let this run while I'm eating breakfast. It only took ~20 minutes for me last time, IIRC.
<cole-h> <3 gchristensen
<{^_^}> gchristensen's karma got increased to 408
<gchristensen> right on
<eyJhb> gchristensen: It is going up up and up for your karma :D
<eyJhb> There are so many Nix formatters, are there any that are bigger than others? I can find nixpkgs-fmt, and nixfmt. Just a matter of taste?
<gchristensen> I think ideally one of them "wins"
<gchristensen> I like nixpkgs-fmt?
<cole-h> Same.
<eyJhb> The idea seems nice, but I like that nixfmt really FORMATS it
<eyJhb> `Only change the indent of one (+/-) per line. Not sure why but it seems like a good thing.`
<eyJhb> Like my Nix code is very ugly, and I am having a hard time knowing where to place my brackets, paranteses, etc. and in that case it won't help anything
<gchristensen> yeah true
<gchristensen> I do prefer more opinionated formatters
justanotheruser has joined #nixos-dev
rajivr has quit [Quit: Connection closed for inactivity]
<eyJhb> So, e.g. nixfmt?
<gchristensen> well ... above all, I prefer a standard formatter
<gchristensen> so whatever wins
<eyJhb> Haha, true!
<eyJhb> Having too seperate sucks.
<eyJhb> But I do get why nixpkgs-fmt is a thing. seeing as running nixfmt would change a LOT
<eyJhb> I wonder if that would ever happen.
<infinisil> There are only those two afaik
<eyJhb> But that refers to nixpkgs-fmt
<infinisil> I also like nixfmt more, less opinionated, actually formats it, less brittle code too
<gchristensen> maybe once github adds support for blame-commit-skip files
<eyJhb> isn't nixfmt more opinionated?
<infinisil> Ah
<infinisil> Right, I was thinking "If it doesn't listen to people's opinions about how it should be formatted, it's not opinionated"
<infinisil> But it's kind of the other way around
<gchristensen> less brittle?
<eyJhb> Well, point of you, could be both. But I meant it in the other way :p
<infinisil> gchristensen: The haskell code of it is very solid and general, there's no special rewriting rules or shenanigans going on
<gchristensen> neat
<gchristensen> does nixfmt preserve comments?
<infinisil> I'm 99% sure yeah
<gchristensen> neat
<infinisil> Yeah can confirm
* gchristensen installs the nixfmt vscode plugin
<eyJhb> Just remember not to format on save :p
<eyJhb> Not fun when doing small changes in projects. Results in big diffs
<gchristensen> I always format on save
<gchristensen> otherwise I never format
<infinisil> This is why I believe nixpkgs-fmt is more brittle: https://github.com/nix-community/nixpkgs-fmt/blob/master/src/rules.rs
<infinisil> Seems like a bunch of hand-written rewrite rules, a whole bunch of them
<eyJhb> Same.. But if you e.g. have to update a .nix file in nixpkgs now, it will format the entire file and have a big diff :D
<eyJhb> But that might be a way to slowly format all of nixpkgs gchristensen ;)
<gchristensen> :)
<gchristensen> I wish there was an autoformatter that worked on a diff
<adisbladis> Hmmm, that would be pretty sweet
* infinisil starts thinking
<adisbladis> Like, "here are my lines off diff, figure out where the relevant AST bounds are and format that region"
<domenkozar[m]> would it make sense to move nixos-rebuild to nixpkgs?
<gchristensen> imo yea, a lot of people wish that was a thing
<adisbladis> domenkozar[m]: Given that it has --target-host I think yes
<gchristensen> and it should be built with resholved
<domenkozar[m]> I mean on github actions you can then just do
<domenkozar[m]> nix-build -A nixos-rebuild
<adisbladis> It's an excellent poor mans deployment tool
<domenkozar[m]> ./result/bin/nixos-rebuild --target XXX
<gchristensen> I don't think youneed to convnce many people domenkozar[m] :P
<adisbladis> domenkozar[m]: I think just do it :)
<domenkozar[m]> well --target-host
<domenkozar[m]> m'kay
* domenkozar[m] fetches beer
<gchristensen> can you also build it with resholve? :)
<eyJhb> The formatter working on a diff would be cool....
<infinisil> Hmm, I feel like implementing that wouldn't even be very tricky..
<infinisil> Like I think I know how it could be done
<adisbladis> infinisil: It shouldn't be, right?
<domenkozar[m]> gchristensen: looking up what that means
<infinisil> I think it is, moreso than I thought 30 seconds ago
<infinisil> So, how a simple version could work: You pass e.g. nixfmt --format-lines=10-15,17
<infinisil> It parses the file, then figures out which AST nodes are enclosed in the given lines
<infinisil> Then it formats only those AST nodes
<infinisil> But, problem is that this breaks down for every AST node that stretches over that line
<infinisil> So e.g. if you add a single list entry in a \n-delimited list, it couldn't format the list because the list isn't enclosed. It could only format that added entry
<domenkozar[m]> gchristensen: I must admit those docs don't make much sense to me
<infinisil> What if you change 99% of the file, but a newline in the middle isn't changed (according to git). The formatter couldn't do very much then
<gchristensen> cc abathur
<infinisil> adisbladis: So it needs to handle these kinds of things. Maybe it could detect whether an AST node is in the non-changed lines, and if there isn't, format that line too
<adisbladis> infinisil: Yeah, I think that's a requirement
AlwaysLivid has quit [Ping timeout: 240 seconds]
<infinisil> I'm sure it's possible, but maybe a bit tricky
* abathur pouts
<domenkozar[m]> abathur: sorry :(
<abathur> hehe
<domenkozar[m]> abathur: why is the main attribute called solutions instead of resholve?
<domenkozar[m]> it was confusing to me what is a solution
<domenkozar[m]> or resholves :)
<abathur> or jobs
<abathur> or tasks
<abathur> arbitrary choice because I begged for bikeshedding about it and got no response :)
<gchristensen> moving beyond that, let's get to a nicely packaged nixos-rebuild script =)
<domenkozar[m]> also not clear what is profile in the first example
<domenkozar[m]> is that an arbitrary name or does it mean anything?
<domenkozar[m]> what is bashup-events44?
<domenkozar[m]> there's no reference in nixpkgs to it
<{^_^}> #107182 (by abathur, 3 weeks ago, open): bashup-events: init at it's-complicated
<abathur> the 2nd example, closer look, explains profile
<domenkozar[m]> ok so my feedback: solutions -> resholves
<cole-h> or `resholutions` :D
<adisbladis> cole-h: Wow, that's hard to pronounce
<domenkozar[m]> and provide a much simpler known example
<gchristensen> resholushions
<domenkozar[m]> I'd suggest naming the section per script name
<domenkozar[m]> and merging closer look into the basic example
<domenkozar[m]> then extra bonus would be to have reference table of all the options one can pass
<domenkozar[m]> abathur: feel free to ignore me :)
<gchristensen> really I was hoping abathur could get us to a cleanly packaged nixos-rebuild script
<abathur> it's good to get feedback on; I'm a little unsure about how to document it
<abathur> btw, if someone's got much experience single-sourcing different kinds of documentation, resholve could probably use a little help there
<abathur> I'm manually brute-forcing the manpage, doc for the resholve repo, and for nixpkgs
<abathur> which is good for exploring until I hit on good ways to describe it and lay out the concepts
<abathur> but, beyond that, will be tedious to maintain
<abathur> oh and the cli --help
<gchristensen> nixos-rebuild's dry-activation should have an intermediary, parsable output for tooling
<V> siraben: next time you do find+replace, drop a \b after the lib
<V> and maybe blind find+replace isn't the best option :p
<cole-h> oof
<cole-h> 10.rebuild-darwin: 501+
<cole-h> :(
<{^_^}> #109469 (by domenkozar, 8 minutes ago, open): move nixos-rebuild into pkgs
<cole-h> Uh, haven't seen this one before
<gchristensen> I think it means there aren't any
<cole-h> Oh nice
<gchristensen> I'm not sure though
<cole-h> Interesting how most of the rebuilds appear to be python packages (at a cursory glance)
<abathur> gchristensen: looks plausible-ish from a naive swing at the terminal https://gist.github.com/abathur/c4067adf634645ca76fd5a28b943b1b6
<gchristensen> nice!
<abathur> it's not seeing/resolving sudo in maybeSudo
<abathur> and I didn't really read the vars I had to add directives for, I'm definitely seeing some other things in there that aren't resolved
<abathur> sudo on 131, env on 148, (maybe OK since it's going through ssh?), anything passed to buildHostCmd/targetHostCmd such as nix-copy-closure on 169; more broadly I have no grok of the host/target implications of resholve and if it's able to sanely handle a script that appears to have dynamic behavior based on that concept? :)
justanotheruser has quit [Ping timeout: 264 seconds]
<infinisil> I've got some sparks of an idea for how NixOS modules could be structured for much better reusability for services
<infinisil> Basically, think of a graph, consistint of nodes and edges. Nodes are components of a Linux system (e.g. services, ports, filesystems, etc.), and edges are connections between such components
<infinisil> E.g. by connecting a service node with a port node, that service can serve something on that port
justanotheruser has joined #nixos-dev
<infinisil> If a node has *no* connections, it can't do anything at all, it's completely isolated
<infinisil> As such, every type of node will require a set of connections to function. E.g. you can have a service node which requires you to connect it to a port
<infinisil> Underneath, such a connection opens up the sandbox on that specific port, but nothing else
<infinisil> In Nix terms, the basic functionality might look like `nodes.services.foo.executable = "/..."; nodes.ports.bar.value = 8080; edges.servicePort.fooBar = { service = "foo"; port = "bar"; };`
<infinisil> Where `nodes.services.*` starts systemd services, `nodes.ports.*` declares ports, and `edges.servicePort` is implemented by opening up the port to the declared service
cole-h has quit [Ping timeout: 240 seconds]
<infinisil> And you could build abstractions based on that. For example, grouping a number of interconnected systemd services together under a single node
<infinisil> Or as mentioned above, nodes types that require port assignments, e.g. with a required `nodes.myNode.*.port` option
<V> that sounds like a fancy way of describing containers/VMs described in nix?
<infinisil> Kinda!
<V> I'm getting intense deja vu b/c this it's the third time this week I've described/seen described something loosely following these concepts
<infinisil> Graphs, they're everywhere
<V> once you've done with NixOS you can pivot into your Nix-powered modular synth business
<infinisil> I'm still not sure on the details of this idea, but it seems promising
<ekleog> infinisil: Starting from the idea of having services be graphs, I eventually reached https://github.com/NixtOS/nixtos/
<ekleog> (yeah the readme is a bit of a troll, sorry)
<infinisil> :o
<ekleog> The issue I found was, that you need to have a two-layer system, because if you can set edges in the same fixpoint as nodes your graph topology depends on the graph contents and you infinite-loop
<ekleog> so configuration looks something like { servicename = { thingToLinkWith = "otherservicename"; argument = "foo"; }; }
orivej has quit [Ping timeout: 240 seconds]
<ekleog> I gave up after having issues trying to get udev to work, maybe because I initially started this up trying to show that most services we have would actually run well in a non-systemd-specific system (by having a `servicemanager` thing to link with) and I failed at eudev
<infinisil> ekleog: Ah the node/edge inf rec probably wouldn't be a problem in my example because they're in `nodes.*` and `edges.*`
<infinisil> But that's neat
<ekleog> That being said, there's a slight difference with your scheme I think (though I'm not yet really familiar with it): for me, the port configuration would be defined by services.foo in your example, and it'd then be sent to the portOpener
<ekleog> (and then there'd be a portOpener service)
<ekleog> FWIW, what it looks like in practice can be seen at https://github.com/NixtOS/nixtos/blob/master/tests/example.nix ; I have implemented basically no service yet that said
<infinisil> Yeah saw that
<infinisil> Hm I guess you might need services for pretty much everything in the end to do the actual work of doing changes
<infinisil> Unless activation script
<ekleog> (actually there's an eudev module I committed somehow recently… 50% I eventually got it to work and forgot about it, 50% I just gave up and committed the half-finished version that doesn't actually work)
<infinisil> I guess one important node type I omitted above is the *network* node
<infinisil> Heh
<infinisil> E.g. there would be `nodes.network.public`, `nodes.network.local`, stuff like that
<infinisil> And each service would live in its own network namespace, represented by these nodes
<ekleog> currently there's activation scripts, https://github.com/NixtOS/nixtos/blob/master/nixtos/pam/env.nix is an example of a trivial (config) module impl that defers to https://github.com/NixtOS/nixtos/blob/master/nixtos/pam/service.nix, that itself defines the file to be set and that file ends up in an activation script
<infinisil> (public being special)
<ekleog> that's very objcap-y, which sounds great, but then the issue I guess is that you need to backtrack information from the network node to the service node
<ekleog> (because the service needs to be started up in the right netns)
<infinisil> hmm not sure what you mean
<ekleog> backtracking information is the conceptual thing I haven't found a good solution for, because it also introduces infinite loops :/
<ekleog> oh it's like the network node needs to somehow inform the service manager node to start the service node in the right ns
<infinisil> Oh and I guess if each service runs in its own network namespace, which is another node, then you wouldn't connect a port to a service, but rather a port from one network to a port of another network
<infinisil> Hmm
<infinisil> ekleog: Ignoring conciseness, it would be somethnig like `nodes.networks.myServiceNetwork = {}; nodes.services.myService.executable = "..."; edges.serviceNetwork.myService = { network = "myServiceNetwork"; service = "myService"; };`
<infinisil> And then ports hmm..
<infinisil> `edges.portForward.myPublicService = { from.network = "public"; from.port = 8080; to.network = "myServiceNetwork"; to.port = 80; }`
<infinisil> Or maybe we don't want any functional edges at all. So that instead of `node (port) <--edge (port forward)--> node (port)`, we just have an additional node in the middle: `node (port) <-> node (port forward) <-> node (port)`
<infinisil> The edges would then really only connect nodes, nothing else
<infinisil> For more conciseness, a node might implicitly get mandatory options for all relevant nodes it needs in its viccinity
<infinisil> Eh, I'll have to think about it more another time
<infinisil> It's friday :)
<ekleog> (sorry, had to run, I'm back)
<ekleog> friday's trollday, right? so a good time to discuss let's-rewrite-the-world designs :p
<ekleog> what I'm not sure about your configuration scheme is, how does the definition of myService know that it must start in the myServiceNetwork network namespace?
<infinisil> ekleog: The edges.serviceNetwork.myService couples them together
<ekleog> My way of doing it would have been `myService --> serviceManager that actually just wraps in a netns and forwards to another service manager --> global-system-service-manager`
<ekleog> (where `-->` represents a message being sent from a node to another)
<infinisil> What's a message?
<infinisil> A packet?
zarel_ has joined #nixos-dev
<ekleog> (thread a) It (edges.serviceNetwork) does, but how would the definition of myService actually know that it should spawn in the myServiceNetwork namespace?
zarel has quit [Ping timeout: 265 seconds]
<abathur> have y'all seen sander's work on cross-platforming service abstractions?
<ekleog> (thread b) A message is what's called `extender` in the source code, basically a { ${destinationService} = ${thingsToSend} } where there's a meta.* scheme on thingsToSend so there's some semblance of typing
<ekleog> (b) so there's a global list of nameValuePairs that's filled by all the nodes (with ${destinationService} being set by the user or defaulting to reasonable values for core destination services like `files` or `activation-scripts`), and each node gets as an input the list of thingsToSend that were sent to it
<ekleog> (b) and the fixpoint happens over that list of nameValuePairs (which is the reason why sending data back from a node to a node that already sent it data is hard, because it introduces an infinite loop in the global list of nameValuePairs)
<ekleog> abathur: that's interesting and I hadn't, thank you, I'll probably try to rely on that next time I write things for nixtos, so as to make the “process-manager-agnostic” promise actually come true :)
<abathur> he also gave a talk about it this fall, if seeing that helps
tilpner_ has joined #nixos-dev
tilpner has quit [Ping timeout: 256 seconds]
tilpner_ is now known as tilpner
<supersandro2000> Is there a reason why people should push to master?
<supersandro2000> I don't like the idea if the only reason is that want to skip the review process.
<samueldr> part of the bigger discussion https://github.com/NixOS/rfcs/pull/79
<supersandro2000> When eval issues are caused by direct pushs I wouldn't feel great about that
<{^_^}> rfcs#79 (by dasJ, 12 weeks ago, closed): [RFC 0079] No more direct pushes to master and release branches
<supersandro2000> thanks for linking that
<samueldr> not many reasons, but some workflows would be harmed
<samueldr> especially if the stable (release) branches are also protected
<samueldr> for now, it's socially, we *strive* for not going to master directly
Valodim has quit [Quit: ZNC 1.8.0 - https://znc.in]
Valodim has joined #nixos-dev
pingiun has quit [Quit: Bye!]
pingiun has joined #nixos-dev
siraben has quit [Ping timeout: 246 seconds]
dtz has quit [Ping timeout: 246 seconds]
danielrf[m] has quit [Ping timeout: 246 seconds]
Irenes[m] has quit [Ping timeout: 246 seconds]
puzzlewolf has quit [Ping timeout: 246 seconds]
mikroskeem has quit [Ping timeout: 246 seconds]
kraem has quit [Ping timeout: 246 seconds]
mikroskeem has joined #nixos-dev
<supersandro2000> same thing I thought
<supersandro2000> but some people feel entitled to just ignore this
<supersandro2000> not like a broken eval on master literally slows down the work for hundreds of people
<gchristensen> I agree supersandro2000, but also need to be careful to respect the workflows of people who have contributed for a long time, and avoid alienating them
Irenes[m] has joined #nixos-dev
danielrf[m] has joined #nixos-dev
dtz has joined #nixos-dev
siraben has joined #nixos-dev
<supersandro2000> but just because you contribute for a long does not mean you can anything you want
<samueldr> tell them they're doing "anything they want" for fun
srhb has quit [Ping timeout: 268 seconds]
manveru has quit [Ping timeout: 268 seconds]
tdeo has quit [Read error: Connection reset by peer]
<samueldr> they're not trying to wreak things
tdeo has joined #nixos-dev
asymmetric has quit [Quit: Peace.]
tetdim has quit [Quit: ZNC 1.7.5 - https://znc.in]
emilazy has quit [Read error: Connection reset by peer]
sorear has quit [Read error: Connection reset by peer]
taktoa[c] has quit [Read error: Connection reset by peer]
typetetris has quit [Read error: Connection reset by peer]
betawaffle has quit [Read error: Connection reset by peer]
srhb has joined #nixos-dev
taktoa[c] has joined #nixos-dev
asymmetric has joined #nixos-dev
nyanotech has quit [Remote host closed the connection]
typetetris has joined #nixos-dev
sorear has joined #nixos-dev
<samueldr> we're, rather quickly, getting fewer and fewer events directly to master
manveru has joined #nixos-dev
<supersandro2000> I don't think anyone right now is trying to break things intentionally
emilazy has joined #nixos-dev
puzzlewolf has joined #nixos-dev
kraem has joined #nixos-dev
betawaffle has joined #nixos-dev
nyanotech has joined #nixos-dev
zowoq[m] has quit [Ping timeout: 268 seconds]
worldofpeace has quit [Ping timeout: 268 seconds]
bbigras has quit [Ping timeout: 268 seconds]
tetdim has joined #nixos-dev
<supersandro2000> but if you push to master it is pretty easy to mess something up and if you only reason is to avoid any review than I don't have a good feeling about that person having access to pushing to master
hax404 has quit [Remote host closed the connection]
Irenes[m] has quit [Ping timeout: 268 seconds]
regnat has quit [Ping timeout: 268 seconds]
symphorien[m] has quit [Ping timeout: 268 seconds]
emily has quit [Ping timeout: 268 seconds]
globin has quit [Ping timeout: 268 seconds]
<samueldr> hopefull it's not the only reason
<samueldr> hopefully*
globin has joined #nixos-dev
alunduil has quit [Ping timeout: 260 seconds]
elvishjerricco has quit [Read error: Connection reset by peer]
carter has quit [Read error: Connection reset by peer]
aria has quit [Read error: Connection reset by peer]
aria has joined #nixos-dev
elvishjerricco has joined #nixos-dev
carter has joined #nixos-dev
<supersandro2000> I am not great with interacting with people especially online but I had the distinct feeling that was the case which made me pretty hard feeling about it
alunduil has joined #nixos-dev
lopsided98 has quit [Remote host closed the connection]
<supersandro2000> I admit that I sometimes nit a bit to much but you can always talk to me and usually I give in if you talk like 2 sentences with me
<supersandro2000> and try to explain it instead of just saying no
bennofs[m] has quit [Ping timeout: 260 seconds]
timokau[m] has quit [Ping timeout: 260 seconds]
garbas[m] has quit [Ping timeout: 260 seconds]
domenkozar[m] has quit [Ping timeout: 260 seconds]
maralorn has quit [Ping timeout: 260 seconds]
<ekleog> samueldr: I'm curious, do we have numbers (or even the links) of what commits were directly pushed to master? sounds like it'd be a good indication of which PR workflows should be improved
<samueldr> ekleog: I ran some number crunching late last yer
<samueldr> year*
Dandellion has quit [Ping timeout: 260 seconds]
<samueldr> let me check if I have the data still
lopsided98 has joined #nixos-dev
<ekleog> like, personally if there was some way to automatically create & merge a backport PR I'd do that instead of push-to-release, but if I open a backport PR I know I'm going to forget about it before ever landing it
<samueldr> this only deals with master
<samueldr> so there shouldn't be any backports in there
<ekleog> interesting, thank you! out of curiosity, how did you actually get the numbers?
<samueldr> my methodology was that in case of doubt, assign it to master
<samueldr> uh, code and stuff
<samueldr> (sorry, it's been a while)
<ekleog> oh so it was based on like commit messages?
<samueldr> checking
* ekleog wondered whether github provided a way to know which happened after the fact, or if {^_^} was the only way to get it
<samueldr> it uses a dump of the github data, which has all commit shas included
<samueldr> so I can straight up remove any commit IDs part of a PR
<samueldr> even if the PR was "manually merged"
<samueldr> I also use --no-merge
<ekleog> “dump of the github data”?
<samueldr> thing I wrote a while ago, dumps enough data about PRs for what I cared for personal reasons
<samueldr> but really not a backup
<ekleog> hmm any possibility it counts squash&merge as a commit to master? (know when github introduced that I started to use it for all 1-commit PRs, to avoid cluttering history with merge commits)
<ekleog> got it, thank you! :)
<samueldr> ugh, avoiding "clutter" by not doing merge commits is a peeve of mine
<samueldr> it's not clutter, it's tracability!
<ekleog> squash&merge do include the PR number in the subject, and the git author in the commit
<samueldr> but yeah, probably that in those 17.59% there was many squash and merges too
<ekleog> so… not sure what added tracability there is by doing merge commits?
hax404 has joined #nixos-dev
<samueldr> you lose commit history
<samueldr> I don't know if the messages fron individual commits are kept
Irenes[m] has joined #nixos-dev
<samueldr> but good authors write descriptive commits
<samueldr> squashing loses context, you cannot bisect into the "change set", since it's been reduced to one change
<ekleog> oh it's just for things that ought to be 1 commit anyway, like `foo: init at *` (close to rebase-and-merge except some people don't squash themselves and I don't feel like asking them to do so — rebase & merge I do not like because it loses the ability to know which commits make sense in a group)
<samueldr> right, less problematic here
<samueldr> what I'd like to see is a way for github to do the squash into the PR interface, and yet still keep the merge
<samueldr> so you might be able to squash *only* what is needed to be squashed
<ekleog> hmm random idea but if you already have the script at hand, maybe filtering on git subject by `\(#[0-9]+\)$` would be a way to filter out squash & merges?
worldofpeace has joined #nixos-dev
<ekleog> s/already/still/ (and if it doesn't take too long to run)
<samueldr> so yeah, those conservative estimates, and it's showing that in absolute numbers, commits to master are going down, and in proportional numbers, going down quite fast
<ekleog> ooooooh proportion, I was looking at absolute values and thinking “but… no?” but I totally missed the percentages!
<ekleog> looks like we're getting much better indeeed \o/
zowoq[m] has joined #nixos-dev
<samueldr> this is not accounting for the new cycle yet
<samueldr> my numbers stop at the 20.09 tag
<samueldr> ekleog: do you know if https://github.com/NixOS/nixpkgs/commit/1f02e09a2c0 was such an update?
<samueldr> unclear if it relates to in-github actions
<ekleog> To me that's not, the ones I do are really (#123456)
<ekleog> the linked PR also shows “closed”
<samueldr> so manual intervention to do the equivalent I guess
<ekleog> yup
<samueldr> hmmm... I have a new difficulty to deal with: volth's commits, which are not in the dumps I have
<samueldr> which now shows as "untracked" commits
Cale has quit [*.net *.split]
das_j has quit [*.net *.split]
energizer has quit [*.net *.split]
pbogdan has quit [*.net *.split]
m1cr0man has quit [*.net *.split]
ivan has quit [*.net *.split]
edef has quit [*.net *.split]
edef has joined #nixos-dev
ivan has joined #nixos-dev
clever has joined #nixos-dev
clever has quit [Changing host]
clever has joined #nixos-dev
<ekleog> ugh :(
Cale has joined #nixos-dev
regnat has joined #nixos-dev
symphorien[m] has joined #nixos-dev
m1cr0man has joined #nixos-dev
das_j has joined #nixos-dev
emily has joined #nixos-dev
bbigras has joined #nixos-dev
pbogdan has joined #nixos-dev
garbas[m] has joined #nixos-dev
energizer has joined #nixos-dev
bennofs[m] has joined #nixos-dev
timokau[m] has joined #nixos-dev
maralorn has joined #nixos-dev
domenkozar[m] has joined #nixos-dev
Dandellion has joined #nixos-dev
<samueldr> a further 1320 can be cut, from fridh's python updates which _are_ linked to a PR, I wonder what made it so it's not removed here
<samueldr> oh right, I know what's up with the missed obvious attributions to PRs: github's API not being able to cope with some big PRs
<samueldr> so, conservative numbers, which are likely at least twice as big as they should be in fact
<samueldr> that's why I'm not releasing the actual information, it's slightly wrong, but in ways that means it's including data it shouldn't
<samueldr> so we're in an even better situation
__monty__ has quit [Quit: leaving]
<ekleog> samueldr: oh :( thank you for the ping I had totally forgotten I had done that ^^'
<samueldr> was just pulling your leg though
<ekleog> yeah well I deserved it :p
<samueldr> there's also a couple reverts, ~50ish, with many reverts being from PRs
<ekleog> so we're in a good situation indeed, as you say :) hopefully within a few releases we'll have gotten to a stage where we can protect master at least? :)
orivej has joined #nixos-dev
<samueldr> it'd be nice
<samueldr> probably the next step is to figure out a story for the few use cases left
<samueldr> I'm thinking the _actual_ solution is better tooling than github, but that's a hard sell, and maybe even requires development, which makes this a nonstarter