gchristensen changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | NixOS 19.09 is released! https://discourse.nixos.org/t/nixos-19-09-release/4306 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 19.09 RMs: disasm, sphalerite; 20.03: worldofpeace, disasm | https://logs.nix.samueldr.com/nixos-dev
<infinisil> Hm, what if the bot here would occasionally post a random pr on its own
<infinisil> gchristensen: ^
<samueldr> it'd get relegated to background noise
<infinisil> samueldr: I'm thinking only a couple PRs per day
drakonis1 has joined #nixos-dev
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #nixos-dev
ris has quit [Ping timeout: 272 seconds]
michaelpj has quit [Ping timeout: 264 seconds]
michaelpj has joined #nixos-dev
worldofpeace has quit [Ping timeout: 264 seconds]
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nixos-dev
<pie_[bnc]> I think this can be closed? https://github.com/NixOS/nixpkgs/issues/33628
<{^_^}> #33628 (by sorokin, 2 years ago, open): superfluous dependency on zfs-util of grub
<pie_[bnc]> (I dont have perms)
<pie_[bnc]> not 100% sure though
bhipple has joined #nixos-dev
bhipple has quit [Ping timeout: 240 seconds]
bhipple has joined #nixos-dev
bhipple has quit [Ping timeout: 260 seconds]
bhipple has joined #nixos-dev
drakonis1 has quit [Quit: WeeChat 2.6]
bhipple has quit [Remote host closed the connection]
cdepillabout has joined #nixos-dev
cdepillabout has quit [Ping timeout: 260 seconds]
cdepillabout has joined #nixos-dev
cdepillabout has quit [Remote host closed the connection]
cdepillabout has joined #nixos-dev
cdepillabout has quit [Client Quit]
phreedom has quit [Ping timeout: 240 seconds]
phreedom has joined #nixos-dev
<jtojnar> ugh, running `builder.sh` in `$HOME` https://github.com/NixOS/nix-pills/issues/124
<{^_^}> nix-pills#124 (by ThoenigAdrian, 1 hour ago, open): Nix Pill Nr. 10 builder.sh ./configure not found
orivej has quit [Ping timeout: 265 seconds]
<bennofs> would it be ok for me to merge https://github.com/NixOS/nixpkgs/pull/44928? it seems the discussion about whether those functions are useful is unrelated to the PR
<{^_^}> #44928 (by vcunat, 1 year ago, open): lib/strings: guard against an easy mistake
georgyo has quit []
georgyo has joined #nixos-dev
__monty__ has joined #nixos-dev
<mkaito> ,random-pr
<{^_^}> https://github.com/NixOS/nixpkgs/pull/64580 (by mkaito, 28 weeks ago, open): docker.nix: Add options for named volumes and networks
<mkaito> lol are you kidding me
<etu> haha
<yorick> we've been waiting for offlinehacker's review on that for 7 months now
<mkaito> he did comment on it, in his defense
<mkaito> but I'd like to have another pass at this
<mkaito> alright, next
<mkaito> ,random-pr
<{^_^}> https://github.com/NixOS/nixpkgs/pull/74654 (by r-ryantm, 7 weeks ago, open): sratom: 0.6.2 -> 0.6.4
<mkaito> not much to review there
<mkaito> ,random-pr
<{^_^}> https://github.com/NixOS/nixpkgs/pull/70522 (by noneucat, 15 weeks ago, open): leap-motion: init at 2.3.1
<mkaito> already reviewed, review concerns haven't been addressed. also, I don't own a leap-motion.
<mkaito> ,random-pr
<{^_^}> https://github.com/NixOS/nixpkgs/pull/77007 (by r-ryantm, 2 weeks ago, open): felix: 5.6.1 -> 6.0.3
<mkaito> ¯\_(ツ)_/¯
<mkaito> ,random-pr
<{^_^}> https://github.com/NixOS/nixpkgs/pull/59953 (by romildo, 39 weeks ago, open): [WIP] deepin.deepin-manual: init at 2.0.19
<mkaito> doesn't work, is wip.
<mkaito> ,random-pr
<{^_^}> Error in $: Unexpected value: Null
<mkaito> lol okay
<mkaito> I tried :P
<bennofs> we have a policy for release branches right?
<bennofs> i forgot where to find it
<bennofs> change page to some random number to avoid going over things others already looked at
<mkaito> can github do saved searches?
<mkaito> maybe infinisil could add some of that to the bot command
<bennofs> no I don't think so. It can't even search for PRs without conflicts or PRs without a "changes requested" review
<mkaito> yay github
<bennofs> (- infront of -review:changes-requested does not seem to do anything)
<Profpatsch> mkaito: infinisil: Maybe we should make the ,random-pr thing a private query feature of the bot? It might be a tad spammy in the long run.
<Profpatsch> infinisil: And then add ,contribute, which gives pointers on how to contribute (add it to the topic).
<Profpatsch> If a person types ,contribute, we see it and can help if they have any questions.
<mkaito> seems reasonable, if you feel it's spammy. but maybe it can also serve as a conversation trigger in some cases.
<Profpatsch> mkaito: true
<mkaito> whatever gets more code review happening, you know?
<mkaito> but yes, it can probably get spammy.
psyanticy has joined #nixos-dev
avn has quit [Remote host closed the connection]
Mic92 has quit [Quit: WeeChat 2.6]
Mic92 has joined #nixos-dev
<bennofs> > pkgsCross.aarch64-multiplatform.targetPackages.stdenv.targetPlatform
<{^_^}> attribute 'targetPlatform' missing, at (string):276:1
<bennofs> > pkgsCross.aarch64-multiplatform.stdenv.targetPlatform
<{^_^}> { config = "aarch64-unknown-linux-gnu"; emulator = <CODE>; extensions = <CODE>; is32bit = <CODE>; is64bit = <CODE>; isAarch32 = false; isAarch64 = <CODE>; isAlpha = <CODE>; isAndroid = <CODE>; isArm =...
<bennofs> is this intended?
angerman has quit []
angerman has joined #nixos-dev
<infinisil> Profpatsch: mkaito: ,random-pr works in pms :)
<infinisil> Also, I'm not sure it's a good idea to exclude wip prs and such, because those are often abandoned and could use a ping or be closed
<infinisil> ,random-pr-script exists too
<{^_^}> exists too: Script to open a random open PR: https://paste.infinisil.com/eTjLirlSno
<infinisil> I'll have to look into that 13:45 {^_^}: Error in $: Unexpected value: Null bug though
<infinisil> I didn't write that command in a very typesafe way..
<mkaito> typesafe bash, it'll be the day :P
<infinisil> Ah i meant the bot version, which is written in haskell :)
<gchristensen> my kingdom for bash to have Option and Result
<mkaito> posh haskell people
<mkaito> I wish gchristensen
<gchristensen> :P
<mkaito> three of my active tasks are basically "rewrite this unholy pile of bash in rust"
<Profpatsch> or gnu guile, that’s at least unityped :)
<Profpatsch> Or chicken scheme
<mkaito> gchristensen: that's amazing
<mkaito> I thought I was pretty decent at Bash, but damn, that stuff is *extra*
<arianvp> Weird flex
<gchristensen> saruspete is *wild*. check their pinned tweet
<Profpatsch> haha, I need to use that bash optparsing library to replace my implementation.
<arianvp> But extremely OK
<Profpatsch> Generate a script optparser from nix expressions.
<gchristensen> neat
<mkaito> I vaguely remember some efforts to make Rust more usable for script-like tasks
<mkaito> maybe some helpers to run commands and stuff
<mkaito> do you happen to know anything?
<gchristensen> I don't
<gchristensen> last time I rewrote a bash script as a rust program it converted a 50 line program in to about 1,000 lines
<mkaito> sounds about right
<gchristensen> I happily made the trade because it wasn't a trivial script, but the script-like UX is not there :P
<mkaito> big chunks of the scriptability of bash is a huge mug of "I don't give a hoot what happens here"
<mkaito> which rust is explicitly designed to not let you get away with
<gchristensen> I disagree actually
<mkaito> how so
<gchristensen> I think the thing which makes bash an easy fit is the primitives are designed for job control. exec, pipes, backgrounding, foregrounding, etc. being first-class language citizens which all require awkward dances with Rust
kenjis1 has joined #nixos-dev
misuzu has quit [Quit: leaving]
<mkaito> I have like 10 hours total experience with Rust, but can't you solve much of that with macros?
misuzu has joined #nixos-dev
<gchristensen> mkaito: I don't think so, it is a pretty big flaw. just like adding a linker or Option / Result to Bash would be such a foreign thing to probably not be worth it. For example: (while true; do if ! fortune; then exit 1; fi; done) | rev is already over 40 lines and doesn't even work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=95537166fc3a26dd88e55ae975cd0527
<mkaito> awesome
<gchristensen> "flaw" being just "not designed for it", not that I think Rust did anything wrong. it just isn't what Rust is for
<mkaito> alternative solution: don't try to turn rust into bash :P
<bennofs> rewrite it in haskell
<bennofs> :p
<mkaito> egads no
<infinisil> gchristensen: Looks like that's a pretty horrible command library
<mkaito> I've tried to like Haskell for 15 years, and I work for a Haskell shop, and we really just don't mix lol
<tilpner> gchristensen: TBF, the standard library was not designed to be suitable for shell scripting
<tilpner> gchristensen: e.g. https://docs.rs/duct/0.13.3/duct/ might fare better here
<gchristensen> that is exactly what I'm saying :P
<tilpner> (Haven't used, docs look interesting)
<gchristensen> but I think even with duct and other tools which make it nicer, it will never be as nice as just regular bash -- when the problem at hand is solved easily by bash
<tilpner> It won't be as short without embedding a shell language in a macro, which would defeat the point, yes
<mkaito> but it might take you most of the way there, just far enough to make you not hate your life
<gchristensen> aye
<tilpner> But the other parts of Rust might make up for it, the application logic you wouldn't want to write in bash
<tilpner> Or not. I don't know your usecase
<mkaito> convenient, safe, fast. pick two?
<qyliss> What does that bash line do, gchristensen?
<gchristensen> it runs fortune many times, pipnig the result to rev
<qyliss> when does fortune fail?
<infinisil> When you're out of luck!
<infinisil> Hah
<gchristensen> just trying to be thorough :)
<mkaito> `set -e` usually takes care of that tbh
<gchristensen> yes, but rust doesn't have a set -e, and I was trying to match and not be unfair :P
<mkaito> that's because rust has proper error handling
<mkaito> something something Option and Result in Bash :P
orivej has joined #nixos-dev
<Profpatsch> you know what’s proper magic?
<Profpatsch> pipefail
<mkaito> `set -euo pipefail` is standard in everything I write
<mkaito> and I'm always miffed this is not the default in pkgs.writeScript :P
<yorick> flokli: updated the buildkite-agents thing
<thefloweringash> `set -e` is kinda broken though. consider: bash -c 'set -e; foo() { false; echo "how am I here?"; }; foo || echo "foo failed"'
drakonis has joined #nixos-dev
<gchristensen> yeah it is
rajivr___ has quit [Quit: Connection closed for inactivity]
<mkaito> yeah I tried using `false` to abort a function with `set -e` and was surprised :P
<thefloweringash> false may or may not abort foo depending on the context in which it's called, which horrifies me
emilazy has quit []
emilazy has joined #nixos-dev
justan0theruser has quit [Quit: WeeChat 2.6]
justanotheruser has joined #nixos-dev
<flokli> yorick: looking
kenjis1 has quit [Ping timeout: 248 seconds]
<flokli> yorick: updated
<yorick> flokli: so the usecase of buildkite agent is to do more than just nix-build :D
mmlb has quit [Ping timeout: 272 seconds]
<yorick> ours run nix-build -o ~/cd/$BUILDKITE_PIPELINE && sudo nixos-rebuild switch
<flokli> wack
<yorick> otherwise we could use hercules :D
<flokli> you abuse buildkite as a deployment tool? ;-)
<gchristensen> buildkite? sudo? please erase that from my brain
<yorick> flokli: they advertise buildkite as a deployment tool
<yorick> gchristensen: there's a sudoers rule that can only do nixos-rebuild switch
<flokli> yorick: deploy to other machines, but probably not the same machine
<flokli> how do you ensure you trigger that "deployment step" on every machine? ;-)
<gchristensen> yorick: there is only such a rule until they nixos-rebuild switch to delete the rule
<yorick> flokli: there's concurrency stuff, but we only need to deploy to a single machine for now
<yorick> gchristensen: ~/cd only contains derivation inputs, no nix
<gchristensen> I also use buildkite to deploy many things with nixops,, but I don't use buildkite to deploy to its own machine
<cransom> if you really want to talk about abuse, i use hydra as a deployment tool...
<mkaito> gchristensen: `nixops ssh-for-each fuck-up-this-server`
<yorick> flokli: are you really gonna make me implement sandboxing just because I need this PR merged :/
<gchristensen> mkaito: heh, yeah, that has happened (please watch the profanities :))
<mkaito> :P
<flokli> yorick: I'm not gonna make you anything :-)
<flokli> I'm just proposing to make use of dynamic users, if we can
<flokli> if we create a bunch of users we don't really need outside that build
<flokli> we should probably use dynamic users
<yorick> sounds like it's out of the scope for this PR, though
<mkaito> I'd be surprised if nothing else went wrong when switching to DynamicUsers
<yorick> but yeah, I need those users
<yorick> gotta do anything for that coveted 'approved' checkmark
<gchristensen> I do agree that dynamic users would be nice, but perhaps a big change for buildkite -- since it wouldn't be uncommon for these users to have special authority / access granted by name
<flokli> It can be a followup, but if we break API anyways, we might want to think about flipping defaults here
<flokli> yorick: can you add/edit release notes to contain your changes?
<gchristensen> true
<flokli> I might propose a followup PR adding dynamic user support (and flipping the default)
Jackneill has quit [Remote host closed the connection]
<yorick> flokli: okay
Synthetica has joined #nixos-dev
<yorick> how do I build the nixos manual?
<jtojnar> yorick `nix-build nixos/release.nix -A manual.x86_64-linux`
<yorick> thanks!
<yorick> flokli: updated the release notes
ris has joined #nixos-dev
drakonis has quit [Ping timeout: 260 seconds]
drakonis has joined #nixos-dev
<flokli> thanks, will take a look
psyanticy has quit [Quit: Connection closed for inactivity]
worldofpeace has joined #nixos-dev
<worldofpeace> Hey, NixOS Office Hours is starting in 14 min https://zoom.us/j/120295959, and more details https://github.com/worldofpeace/events/tree/master/office-hours
<ma27[m]> gchristensen: worldofpeace: in case you need another PR to look at for the office hours, how about https://github.com/NixOS/nixpkgs/pull/77985 ? (Won't be able to join though, sry)
<{^_^}> #77985 (by Ma27, 6 days ago, open): gcc: remove versions 4.9 and 5
<gchristensen> anyone know how long kernel 5.4 will be supported?
<samueldr> gchristensen yes
<samueldr> :3
<gchristensen> wonderful! that is all I needed to know
<gchristensen> cool, thanks
<samueldr> it pretty much needs to be the new default for 20.03
<samueldr> which branches off in what, 7 days?
* gchristensen hides
* gchristensen looks hard at his secure-boot PR, doomed to wait another couple seasons
<clever> gchristensen: i'm looking at making netboot images build faster, and i have a crazy idea, who needs a rootfs? who needs stage1? lol
<clever> gchristensen: i made a custom initrd, where /init is a symlink to stage2's entry, and it boots!
<clever> nix just pulls the ENTIRE SYSTEM into the initrd, as-is, lol
<clever> skip the squashfs!
<gchristensen> hmm! I agree!!
<gchristensen> wow, how big is the initrd??
<clever> -r--r--r-- 1 root root 240M Dec 31 1969 /nix/store/gj809z7ajjykqixhizs9jbf3k1x04017-initrd/initrd
<gchristensen> how big was the squashfs before?
* clever looks
<samueldr> 240M doesn't sound so bad
<clever> i'll have to wait for the aarch64 cross-compiles to get out of the way, but i think its also 50% faster
<clever> -r--r--r-- 1 root root 238M Dec 31 1969 /nix/store/947yl77dh05idfp1fnm1nrlyhh6pwdr8-initrd/initrd
<clever> gchristensen: thats an initrd that contains the squashfs
<gchristensen> I guess I'm not asking the question right
__monty__ has quit [Quit: leaving]
<clever> the old nixpkgs/nixos/modules/installer/netboot/netboot.nix profile, puts a squashfs inside an initrd
<gchristensen> oh I see, so it compresses 2M less well
<clever> so you have the normal stage1 + squashfs, and it mounts that squashfs as root
<gchristensen> yep, understood
<gchristensen> that is cool
<gchristensen> and it is faster?
<clever> direct stage2 compresses faster, but is 2mb worse, not counting the fact that we ditched the entire stage1 closure
<clever> i think direct stage2 takes longer to boot, but its hard to tell with my system being lagged by a hydra
<clever> letting that clear out, but i can gist if you want to run your own tests
<clever> gchristensen: `nix-build -A netboot.dir` will make the old netboot image, and do both compression stages (squashfs then initrd)
<clever> gchristensen: `nix-build -A <target>_2.eval.system` lets you pre-build the nixos, so it wont get mixed into the times for compressing
<clever> gchristensen: `nix-build -A direct_stage_2.custom_initrd` makes the initrd
<clever> and `nix-build -A direct_stage_2.test_script` makes a qemu that tests it
ixxie has joined #nixos-dev
<clever> gchristensen: gist updated, both targets now have a dir and a test_script
<gchristensen> nice! I'll give it a try
<clever> gchristensen: i suspect the bulk of the cpu cost for direct_stage_2 is creating 1000's of files in a tmpfs on boot, and will heavily depend on the target cpu
<clever> gchristensen: netboot only has a single 200mb file to unpack, and the the squashfs defers that cost until later, and spread over time
<clever> gchristensen: oh, and direct_stage_2 does not yet update the db.sqlite, so nix will happily GC the entire store
<clever> i'll get that soon-ish
<gchristensen> all of this seems fine as long as generating the initrd is faster
justanotheruser has quit [Ping timeout: 272 seconds]
<clever> 1m43s for the netboot image on my laptop, both stages of compression
<gchristensen> :o
<clever> 29 seconds for the direct_stage_2 image
<gchristensen> how long did squash take for you before?
<gchristensen> oh 1m43s?
<clever> that 1m43s is squashfs + initrd
<gchristensen> so much nicer
<clever> the gist also includes changes to reduce the closure size, so it has less data to compress
<clever> ah, profiles/minimal.nix was the only change for that
zarel has quit [Ping timeout: 252 seconds]
zarel has joined #nixos-dev
justanotheruser has joined #nixos-dev
<jtojnar> do you hear a sound in the office hours recording?
<jtojnar> I do not hear much before 4:45
<jtojnar> oh, Graham was saying the audio was broken
Synthetica has quit [Quit: Connection closed for inactivity]