gchristensen changed the topic of #nixos-borg to: https://www.patreon.com/ofborg https://monitoring.nix.ci/dashboard/db/ofborg?refresh=10s&orgId=1&from=now-1h&to=now "I get to skip reviewing the PHP code and just wait until it is rewritten in something sane, like POSIX shell. || https://logs.nix.samueldr.com/nixos-borg
<gchristensen> assert!(vec![].into_iter().all(|e: ()| e == ()));
qyliss^work has quit [Quit: bye]
qyliss has quit [Quit: bye]
qyliss has joined #nixos-borg
qyliss^work has joined #nixos-borg
<infinisil> gchristensen: I'm not that familiar with rust, but that seems to do nothing?
<gchristensen> it passes :)
<gchristensen> all() on an empty iter returns true
<infinisil> Ahh, I just now see that vec![] just creates an empty vec, so it's just a fancy typey way of doing `assert!(true)` :P
<gchristensen> :)
<gchristensen> yeah, but I had to test that to see if it would do that or not
<gchristensen> I guess it makessense for all()
<gchristensen> any() would probably return false
<infinisil> Yeah
<infinisil> You can use this to mess with people
<infinisil> E.g. "Every time I was in the USA, the president welcomed me personally"
<infinisil> :P
<gchristensen> well, I guess I'm going to bed annoyed. https://github.com/grahamc/ofborg/pull/1/checks
tilpner_ has joined #nixos-borg
tilpner has quit [Remote host closed the connection]
tilpner_ has quit [Ping timeout: 245 seconds]
tilpner has joined #nixos-borg
MichaelRaskin has joined #nixos-borg
orivej has quit [Ping timeout: 246 seconds]
<LnL> gchristensen: I went through it, looks good and don't really have any comments
<LnL> it would be nice to eventually decouple the steps even more
<gchristensen> LnL: great! say more?
<gchristensen> LnL: oh. can you do a test build on macos?
<LnL> oh sure, didn't do that
<LnL> one failing test, but it's not new (maintainers::tests::example)
<gchristensen> awkward :X
<{^_^}> [ofborg] @grahamc merged pull request #336 → Generic builder v2 → https://git.io/fjJsX
<{^_^}> [ofborg] @grahamc pushed 21 commits to released: https://git.io/fjJzN
<gchristensen> LnL: thank you for checking! :) nice to have that function be many hundred lines smaller now.
<{^_^}> [ofborg] @grahamc pushed 0 commits to generic-builder-v2: https://git.io/fjJzA
<LnL> yeah definitively
<gchristensen> there is an astonishing amount of low hanging fruit here which could be made better
<gchristensen> like replacing a single unwrap with a nicer type would be a good start
<gchristensen> LnL: what would you think about having https://github.com/nixos/ in the allowed-uris list for ofborg's build?
<gchristensen> then hydra could be built by ofborg
<gchristensen> (it would not allow this for nixpkgs)
<samueldr> could this be a queryable builder setting, that when a build is queued, it knows to ask "I need to be able to read $thing", this allows you to put things like github.com/grahamc (whoever that fella is) in your builders, and ofborg would queue only to those?
<samueldr> (maybe hard to implement?)
<gchristensen> that would be cool
<gchristensen> so then builders could opt-in to that sort of thing
<samueldr> though having a builder allowing e.g. github.com/grahamc shouldn't make all builds able to use it
<gchristensen> right
<gchristensen> I think I can do a thing with topic queues and wildcards
<samueldr> builders are self-organizing and just pick whatever's on top of the queues they subscribe to?
<samueldr> sorry, this sounds like a question, but it's more I'm not 100% confident if the description is a good one
<gchristensen> right, at the moment that is how they work
<gchristensen> no support for even required system features like KVM :)
<LnL> gchristensen: what do you mean by that exactly, the hydra repo?
<gchristensen> so ofborg could be CI for Hydra
<LnL> don't see why it would need that
<LnL> problem is that github.com/NixOS is basically the same as github.com because of prs
<gchristensen> it has to fetch nixpkgs
<gchristensen> right now, builds can't fetch nixpkgs
<gchristensen> ah hrm that is true
<LnL> given that I think the way hydra inputs work might be better
<gchristensen> yeah. right.
<gchristensen> a bit annoying....
gchristensen has left #nixos-borg ["WeeChat 2.2"]
gchristensen has joined #nixos-borg
<gchristensen> though it would still require either a trusted reviewer, or a trusted author
<gchristensen> so a sketchy source URL like a PR would require a trusted user approving it
<LnL> yeah, disadvantage is that you get duplication or even mismatches
<gchristensen> oh?
<LnL> with inputs itside of the expression I mean
<gchristensen> right
<LnL> ssh://git@github.com/NixOS might kind of work at the moment given that this doesn't work yet https://github.com/NixOS/nix/pull/2582
<{^_^}> nix#2582 (by LnL7, 14 weeks ago, open): fetchGit: allow fetching explicit refs
<gchristensen> going back to your point about basically th same b/c of PRs, we'd have the same security there as we do for building PRs on nixpkgs -- so maybe it is fine?
<LnL> depends on who can trigger it
<gchristensen> everybody in the known-user list
<gchristensen> exactly as who can trigger builds on nixpkgs
<LnL> might be fine, but all those people will be able to run arbitrary (linux) build then
<gchristensen> true.
<gchristensen> I guess it would be better to make that sandboxing strongerand just go all the way on that
orivej has joined #nixos-borg
<gchristensen> coming back to a project with a ton of little scripts and no memory of how to use them ...
<gchristensen> always a thing.
<MichaelRaskin> Just imagine how you would write them from scratch, this might be a better approximation than you expect.
<gchristensen> a good idea
<gchristensen> I found the best few lines:
<gchristensen> if [ -e ./result ]; then
<gchristensen> echo "Not running nix-build ./vm.nix even though you might want me to."
<gchristensen> nix-build ./vm.nix
<gchristensen> else
<MichaelRaskin> Writing the same code in the same way without remembering I already have this written. Twice.
<gchristensen> nix-build ./vm.nix
<gchristensen> fi
<MichaelRaskin> Misleading messages 101
<LnL> lol
<gchristensen> + ls /dev/fd
<gchristensen> ls: cannot access '/dev/fd': No such file or directory