gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
iqubic has quit [Ping timeout: 240 seconds]
dmc has left #nixos-chat ["WeeChat 2.3"]
Guanin has quit [Remote host closed the connection]
MichaelRaskin has quit [Read error: Connection reset by peer]
<nh2> gchristensen: rest assured that your bash -> Rust rewrite also has many fans that will gladly take 2x program length for the clear semantics and principle of least surprise :)
<nh2> andi-: I'm using an x220 since 2011 and see no reason not to use it until 2024, for more than terminals and text editing -- keep them, good hardware
<nh2> for the bash experts in here, if I do `true && ./myprogram`, how comes strace shows no execve()?
<nh2> How can it launch the process without exec()ing it?
<gchristensen> I see an execve there
<nh2> gchristensen: uh really? I don't, I see only the execve of `bash` being started, not the one of ./myprogram
<nh2> for example, `strace -e execve,execveat,clone bash -c 'true && /bin/echo hi'` shows only
<nh2> clone()
<nh2> execve("/bin/bash")
<nh2> --- SIGCHLD
<nh2> hi
<nh2> +++ exited with 0 +++
<gchristensen> try strace -f
<nh2> gchristensen: is that different for you?
<nh2> gchristensen: oops I am silly, of course
<nh2> thanks :)
<gchristensen> :)
<nh2> gchristensen: this feels extra dumb given that I'm trying to implement `-f` in my Haskell-based strace clone, and I wanted to compare it to strace ...
<gchristensen> oh cool!
<gchristensen> https://www.packet.com/about/careers/ <- some cool nix-friendly jobs here btw
<jackdk> andi-: RE: x220: what's the battery life and weight like? (and the availability of replaceable parts)
<nh2> gchristensen: I'll remember it :P am already in the fortunate situation of writing Haskell full-time
<nh2> gchristensen: to pitch it a bit: with my strace Haskell library you can script stuff like "wait for th 3rd write() syscall, then kill the process", to check whether it writes files non-atomically and so on
<gchristensen> oh cool
<nh2> jackdk: I can't tell you the weight but that is googleable. Replaceable parts are awesome. I have replaced so far the heat sink + fan, the display, various screws, and the mini-SSD. Replacement batteries are easily available, but one has to be careful not go get fakes. I got one that looks perfect but died after half a year. Got another one and that works like the usual
<gchristensen> have you seen sqlite's test harness?
<nh2> gchristensen: which one, doesn't it have 3? https://www.sqlite.org/testing.html#harnesses
<gchristensen> the one which allows one write and kills, then two writes and kills, then three writes and kills, etc. etc. and
<nh2> gchristensen: do you have details? Would like to read more about it
<nh2> (I should add this to my test suite right now; it may not be feasible for ghc because it takes too long, but would be good to have such an example in the test suite so people see how it can be done for smaller programs)
<gchristensen> 3.3. Crash Testing
<nh2> ah I see!
<nh2> that looks like what I plan to do indeed
<nh2> gchristensen: finally -f is working, yey
<nh2> ptrace is pretty hairy
jackdk has quit [Ping timeout: 240 seconds]
pie___ has joined #nixos-chat
pie__ has quit [Ping timeout: 245 seconds]
hedning has quit [Quit: hedning]
iqubic has joined #nixos-chat
endformationage has quit [Quit: WeeChat 2.3]
drakonis has quit [Quit: WeeChat 2.3]
__Sander__ has joined #nixos-chat
ekleog has quit [Quit: WeeChat 2.2]
ekleog has joined #nixos-chat
<qyliss> I use an x220 too
<qyliss> It's hugely upgradeable, and I need to check that out in more detail when I have more money.
<qyliss> There are aftermarket screen and even motherboard upgrades
<qyliss> Made by third-party companies
<andi-> qyliss: motherboard upgardes? What kind? I only saw the FHD mod so far.
<qyliss> I'm not sure. spacekookie told me about them.
<qyliss> Oh, she's not in here.
spacekookie has joined #nixos-chat
* spacekookie waves around
<qyliss> <spacekookie> https://www.51nb.com/mb/ This should be the website although it seems to be down right now
<spacekookie> Basically the upgrades are made for the X201 which is in it's chassis design very similar to the X230
<spacekookie> You can make the boards fit in there
__monty__ has joined #nixos-chat
<andi-> I see
iqubic has quit [Ping timeout: 240 seconds]
hedning has joined #nixos-chat
<elvishjerricco> /etc/pam.d/login uses pam_unix.so without an absolute path. How does it know where to find that file?
endformationage has joined #nixos-chat
andi- has quit [Ping timeout: 250 seconds]
andi- has joined #nixos-chat
<flokli> elvishjerricco: that's part of ${pkgs.pam}/lib/security. I'd assume that path is baked into libpam.
__Sander__ has quit [Quit: Konversation terminated!]
drakonis has joined #nixos-chat
iqubic has joined #nixos-chat
<steveeJ> any systemd gurus who know how I can run two services to completion (start -> stop) sequentially if they're both enabled?
<steveeJ> I'm trying to make a timer do that. I could probably abuse the postStop of the first unit to start the second one, but I'd prefer to avoid that
<pie___> ambiently pondering whether nixpkgs will actually be usable to build old software in the far future
<cransom> steveeJ: have you mixed in some requires and before/after?
<steveeJ> cransom: not sure how since a timer can only refer to one unit. do you think I could refer to the second unit and have that require/after the first one?
<steveeJ> I think "after" doesn't mean it waits until that service is stopped, but it just doesn't start before it
<cransom> i haven't done timers in series like that, but for the service itself, you can do that ordering. do the services exit after running?
<joepie91> steveeJ: I think you can define custom targets - maybe you can do something with that and point the timer at that target...?
<joepie91> oh
<joepie91> "If unit1 has the directive Before=unit2, then if both units are run, unit1 will be executed fully before unit2 starts."
<steveeJ> cransom: yep they exit, and the second service has to wait until the first one is exitted again
<joepie91> so yeah it requires on explicitly starting both
<joepie91> steveeJ: so... if you define a target, specify both services as needing to start for that target, then specify one service as After another, and then point the timer at the target... I think it should work?
* joepie91 feels like he's building a rube goldberg machine here
<joepie91> oh wait that wouldn't cover the "after 1 exits" thing
<joepie91> okay I give up :D
<cransom> if type=onshot, the docs tell me that the service has to exit before other units start
<steveeJ> I could do something really hacky and run the script in the first service in preStart
<cransom> *oneshot
jackdk has joined #nixos-chat
<joepie91> aha
<joepie91> so combining the above with oneshot should work then?
<joepie91> and would be less hacky than preStart :P
<cransom> there's also apparently 'PartOf' in systemd.unit which may go even further
<steveeJ> cransom: any guesses what PartOf with Type=oneshot even does? :D
<steveeJ> I've used PartOf before when I wanted a service to be stopped down with another one, but oneshot services seem to be special
<cransom> i have no idea. buyer beware. it may set fire to your dog.
<joepie91> lol
<gchristensen> I lol every time I see libiberty...
<jackdk> I recall a libowfat at some point in the past also
<jackdk> dietlibc maybe?
<gchristensen> lol
<gchristensen> my rust port of r13y is now at almost 1,000 lines of code and not quite feature complete of the bash version
<steveeJ> cransom: I believe it's working as intended now with oneshot ;) thanks!
<cransom> steveeJ: glad to hear it.
<joepie91> gchristensen: is it reliable, though
<joepie91> :P
<gchristensen> not yet :|
__monty__ has quit [Quit: leaving]
qyliss_ has joined #nixos-chat
qyliss has quit [Disconnected by services]
qyliss_ is now known as qyliss
andi- has quit [*.net *.split]
tom39291 has quit [*.net *.split]
emily has quit [*.net *.split]
yurb has quit [*.net *.split]
NinjaTrappeur has quit [*.net *.split]
manveru has quit [*.net *.split]
tazjin has quit [*.net *.split]
elvishjerricco has quit [*.net *.split]
nand0p has quit [*.net *.split]
kgz has quit [Ping timeout: 250 seconds]
kgz has joined #nixos-chat