gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<joepie91> ,locate libvulkan.so.1
<{^_^}> Found in packages: vulkan-loader
<joepie91> ;_;
<joepie91> briefly got a window and then it panicked...
<joepie91> aaaaaaaaaaaaaaaaaaaaaaa
<joepie91> not supported by the radeon driver...
<joepie91> guess I will not be trying out vulkan today
<joepie91> ,locate libglx.so
<{^_^}> Found in packages: xlibs.xorgserver
worldofpeace has joined #nixos-chat
worldofpeace has left #nixos-chat [#nixos-chat]
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 252 seconds]
lassulus_ is now known as lassulus
jasongrossman has quit [Ping timeout: 245 seconds]
jasongrossman has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
<Ralith> joepie91: AMD cards that aren't quite old def support vulkan
Sonarpulse has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
Sonarpulse has quit [Quit: Leaving]
jasongrossman has quit [Ping timeout: 252 seconds]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Ping timeout: 252 seconds]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Ping timeout: 272 seconds]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Remote host closed the connection]
<sphalerite> woooooo my first nixos deployment's first successful reboot!
<sphalerite> which is extra scary when they're physical machines :D
<sphalerite> and you're not there
<sphalerite> srhb: I did superglue the feet on the chromebook away from the intended positions now
<srhb> sphalerite: Neat :)
<srhb> Does it work alright?
<sphalerite> yep
<sphalerite> feels weird when I hold it, since there are proper indentations where the feet are supposed to be
<sphalerite> and it sits a couple mm higher than normal as a result as well
<sphalerite> but it'll do to protect it from scratches :)
<srhb> Great :)
jasongrossman has joined #nixos-chat
jasongrossman has quit [Ping timeout: 246 seconds]
<sphalerite> no fun: locking screen to wipe keyboard without breaking stuff, accidentally triggering sysrq+k.
<srhb> I don't even have a sysrq button!
<sphalerite> neither do I, but apparently I triggered a sysrq at some point while wiping the keyboard anyway.
<sphalerite> it does have a printscreen key, which I'm guessing is the culprit
* sphalerite has just discovered a nixos installation in the /boot partition on one of his servers :|
<srhb> sphalerite: :D
<sphalerite> also annoying: pressing ctrl-alt-del while having the keyboard attached to the wrong server
obadz has quit [Ping timeout: 246 seconds]
jasongrossman has joined #nixos-chat
<infinisil> Ugh, all these "quick installs" of the form `curl some.website | sh`
* etu tend to think about it as quick malware
<infinisil> They work if you're running a supported distro, or they might not because of some weird thing, installation into a stateful directory is hard
<andi-> 3..2..1.. Compromised!
<infinisil> I'd rather see a `nix-env -if some.website`
<infinisil> It won't solve the problem of potentially installing malware, but at least the build can't mess with anything and works everywhere
<sphalerite> modulo nix availability/presence :p
<infinisil> Yeah :)
__monty__ has joined #nixos-chat
<qyliss^work> > On Linux and macOS, the easiest way to install Nix is to run the following shell command (as a user other than root):
<{^_^}> error: syntax error, unexpected ',', expecting ')', at (string):195:19
<qyliss^work> curl https://nixos.org/nix/install | sh
<qyliss^work> :P
obadz has joined #nixos-chat
<srhb> itsatrap
<srhb> It will install a soft ware called "nix" and make irreperable changes to your life.
<srhb> Definitely a form of malware.
MichaelRaskin has quit [Quit: MichaelRaskin]
<andi-> You can't go back afterwards. I even lost my ability to rate it as malware :)
<srhb> andi-: Wow, lost cause. ;-)
<joepie91> Ralith: you need the amdgpu driver, not Radeon
<joepie91> and amdgpu isn't stable here because reasons
<joepie91> radeon driver outright doesn't do vulkan
<sphalerite> andi-: it's a very subtle form of rootkit
<sphalerite> while it doesn't place any technical barriers in the way of removing it, it performs automated social engineering to prevent its removal
<manveru> LnL: you ever tried doing a fromImage with nix-docker?
<manveru> though i guess i should just do a proxy instead... running nix in docker is so full of edge-cases, just thought i can maybe avoid them if i delegate all builds to remotes from that container
<manveru> sorry for the random rambling, just needed a duck :)
<manveru> finally hooked up ejson with kubenix so i can deploy secrets to kubernetes while they're encrypted in my repo
<LnL> nope, I think I could also remove half of the expression if I used the withNixDB helper
<srhb> LnL: I just did basically that. It works fine, but is broken on 18.03
<srhb> (Which I haven't investigated further yet)
<srhb> But honestly, recovering the nix db from the reference graph doesn't take up that much code :-)
<srhb> I found fromImage to be strictly less useful though, since I can't easily get all the layers into the nix db with withNixDB
<LnL> yes, but importing the database means I have to add a docker build layer outside of nix
<srhb> True enough!
<srhb> Wait, couldn't runAsRoot work for that?
<srhb> Though I suppose that's essentially the same thing as withNixDB
<LnL> that requires linux
<srhb> aah
<srhb> Well, so does withNixDB presumably
<LnL> oh, really?
<srhb> I would imagine it uses the same approach
<srhb> So kvm required..
<sphalerite> you could probably estimate how many items my binary cache contains based on the hash of the first, right?
ekleog has quit [Quit: back soon]
<srhb> OK hivemind
<srhb> My terminal is now again in the state where ctrl+c does not immediately work
<sphalerite> oooh exciting
<srhb> It appears that typing any character afterwards triggers it. How do I debug?
<sphalerite> which terminal emulator?
<srhb> xterm
<sphalerite> any nesting of emulators, e.g. tmux?
<andi-> does xev register that keystroke?
<srhb> Yep, tmux!
<srhb> And opening another tmux buffer in the same xterm works
<srhb> andi-: Yeah
<andi-> without tmux does it work there?
<sphalerite> oooh then maybe tmux is to blame
<srhb> Very likely!
<sphalerite> maybe something weird similar to the escape-time setting
<sphalerite> I still don't get why that exists
<srhb> Probably because it can be indistinguishable from other ctrl codes in some cases
<srhb> Opening the same shell in another tmux window has the same issue.
<samueldr> I don't intend to hijack the conversation, but yesterday I had another tmux-hung-by-resizing :/ stracing the process showed nothing going on (though I may have straced the wrong one)
<sphalerite> srhb: it can?
<sphalerite> oh you mean the escape-time
<srhb> sphalerite: Yeah
<andi-> set escape-time 0 ? :D
<sphalerite> I don't think escape-time should affect ctrl-c really? But yeah who knows
<sphalerite> tmux is a mysterious piece of software
<srhb> Can I do that from within the session?
<srhb> urgh, so frustrating. :D
<andi-> srhb: yes C-b :set escape-time 0
<srhb> andi-: Thanks. Not it, apparently...
ekleog has joined #nixos-chat
jasongrossman has quit [Remote host closed the connection]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Ping timeout: 260 seconds]
<etu> tmux can indeed be very scary
<etu> I've been thinking of unbinding *every* default keybind to only bind the ones I know that I use so I know what happens when I press my keys
<gchristensen> my new layered docker images tooling cut down an image push time by a significant, significant amount :D
<etu> Sometimes weird things happens if I misspress something and most of the time I don't know how to undo whatever I did
<infinisil> Since alacritty just got scrollback support, I'll be using that instead of tmux (I really only used tmux for that reason)
<vdemeester> gchristensen:
<vdemeester> open-source tool ? :D
<vdemeester> interesting, we may not need nixos-infect any more soon(ish) https://blog.digitalocean.com/custom-images/
<etu> infinisil: I use tmux for my weechat, as well as that my terminal emulator does't do tabs and I want to have grids sometimes at work
<infinisil> Huh, why for weechat?
<etu> infinisil: To leave it running in the background on my headless machine?
<etu> infinisil: If there's a better way I'd like to know :D
<vdemeester> gchristensen: interesting :)
<gchristensen> holy guacamole, c2rust.com can handle Duff's Device
<infinisil> etu: Ah I see, I'm using ZNC for that
<sphalerite> etu: if you just want to run something in the background without all the windowing features, dtach would also do
jD91mZM2 has joined #nixos-chat
<__monty__> etu: Doesn't weechat have a daemon or relay mode or something?
<tilpner> There's weechat-headless
<tilpner> But relay-to-relay is unsupported in weechat
jD91mZM2 has quit [Quit: WeeChat 2.0]
<manveru> gchristensen: i'm already using it here too :)
<gchristensen> c2rust?
<manveru> nah, the layered containers
<gchristensen> my code?
<manveru> yes
<gchristensen> :D
<gchristensen> any bugs?
<manveru> nothing yet :)
<manveru> only bug i have is that it's damn hard to get a good-enough nix within the container...
<gchristensen> I've found a couple very minor ones through testing a mega-image of hundreds of paths with a combination of java, haskell, python, fortran, hdfs, and other things all in one
<manveru> my plan atm is that i setup a docker container to act as nix-build proxy to a number of machines on ec2
<manveru> since i can't connect from ec2 into our vpn, it has to send the closure there, but not do any building in the container
<manveru> and then store the result in s3 :)
<manveru> that's my weeks hack project anyway
<gchristensen> cool!
<manveru> i couldn't get hydra to work at all in a single docker container, that's why i built scylla for it
sir_guy_carleton has joined #nixos-chat
<manveru> all our internal hosting is in kubernetes... so much fun :P
<gchristensen> ah right on
<manveru> but now i also generate the kubernetes config with nix
<manveru> pushed ejson package today for that too
<manveru> gchristensen: btw, if i just need to create some files at specific paths in the container, how would i do that without extraCommands?
<manveru> i guess putting them into contents somehow
<gchristensen> every file in the root paths of contents is symlinked at the container's / (one of the bugs I've fixed is around this)
<manveru> hmm, so i can pass it a derivation there?
<manveru> wonder if that'd work with a plain writeTextFile... let's see
<gchristensen> you can put whatever you want :) even a list
<manveru> yeah, looks like those files don't end up in the right location
<gchristensen> manveru: can you send me a reproducer?
<manveru> i have `contents = [(writeTextFile { name = "nix.conf"; text = "build-users-group ="; destination = "/etc/nix/nix.conf"; })]`
<gchristensen> ah hehe yes you did find the bug I fixed
<gchristensen> the code you have uses buildEnv on `contents`, which minimizes the symlinks it produces by creating a single /etc symlink to your drv, but when docker creates a write layer on top, it creates a dir at /etc and tramples the /etc symlink
<manveru> ah
<gchristensen> I have several fixes locally that I've not fixed yet, but an easy way to change that particular problem is swap in symlinkJoin instead of buildEnv and that should do it
<gchristensen> that I've not pushed yet*
<manveru> it's ok, i'm just writing those files in my application atm
<manveru> just lemme know when you push a new version so i can try it :)
<gchristensen> cool :) should be soon
<manveru> i'm just happy i have a semi-working nix in this now :)
<gchristensen> :D
<gchristensen> can I make this work somehow: printf "1\n2\n" | xargs -I {} -n2 ./foobar /my-path/{} {} .... and have xargs run `./foobar /my-path/1 2`?
<samueldr> could you instead use a bash function (or even subshell with set?), local var="$1"; shift; then you can ./foobar /my-path/"$1" "$@"... assuming a bash is fine
<samueldr> uh, replace $1 with $var in my example
<gchristensen> xargs can't call a bash function, I'd have to make xargs execute bash
<samueldr> I see, you *need* it as somehow xargs
<gchristensen> I could make `./foobar` be fancy and take arguments to do this inside itself, but that is going to make a simple script a bit complicated
<samueldr> (I have to admit to never having used xargs)
<manveru> you only have two arguments?
<manveru> or you always want to take two at a time and pass them in each invocation?
<gchristensen> my input is really more like printf "1\n2\n3\n4\n" and then foobar is called twice, ./foobar 1 2; ./foobar 3 4
<manveru> ok
<samueldr> while with two reads? printf "foo bar\nbar foo\n" | (IFS=$'\n'; read a; read b; echo $a; echo $b)
<samueldr> (forget that IFS, it was a test I made and it failed)
<gchristensen> alas, xargs is important here because I pass a --go-fast flag
<gchristensen> (parallel execution based on # of cores)
<samueldr> ah good, can't say then :)
<gchristensen> oh I'll just duplicate the script
<gchristensen> the dockerTools docs are thorough but very dense
<gchristensen> hard to expand
<gchristensen> joepie91: can you read some docs I just wrote?
Lisanna has joined #nixos-chat
Lisanna has quit [Client Quit]
__monty__ has quit [Quit: leaving]
jasongrossman has joined #nixos-chat
jasongrossman has quit [Client Quit]
jasongrossman has joined #nixos-chat
jackdk has joined #nixos-chat