gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 258 seconds]
drakonis2 has joined #nixos-chat
drakonis has quit [Ping timeout: 244 seconds]
lopsided98_ has joined #nixos-chat
lopsided98 has quit [Ping timeout: 260 seconds]
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #nixos-chat
lopsided98_ has quit [Ping timeout: 244 seconds]
<abathur> anyone else leave browser tabs open--for projects you've had to put on hold--for really absurd amounts of time?
<abathur> I just finally yak-shaved myself all the way back to a set that it looks like I have had open but untouched for ~15 months
<abathur> a little impressed with myself for not losing them
<cole-h> lovesegfault: Congrats :D
<samueldr> abathur: seen previously here: https://logs.nix.samueldr.com/nixos-chat/2020-04-08#3290587
<infinisil> > unicorn
<{^_^}> "🦄"
<infinisil> Whaaaaat
<infinisil> I magically have actual working emoji from my recent system update!
<infinisil> In the terminal!
<gchristensen> nice!
<cole-h> Ahhhhhhhhhhhhhhhhhhhhhhhhh, I just felt a giant weight lift from my shoulders
<cole-h> History paper finally turned in
<lovesegfault> cole-h: Thanks!
<lovesegfault> samueldr: you still around?
<ashkitten> cole-h++
<{^_^}> cole-h's karma got increased to 52
<ashkitten> btw samueldr i finally got my phone on tmobile so i'll be able to use it when i get my cosmo!
<ashkitten> whenever that is, in the next few weeks hopefully
<samueldr> lovesegfault: maybe
<samueldr> ashkitten: nice
<lovesegfault> samueldr: Nvidia Jetson
<lovesegfault> Do you have any experience with them?
<lovesegfault> I got an AGX and I want to try and get NixOS working :D
<samueldr> sorry, no experience, they're pricy toys :(
<samueldr> I mean, I have no real-world use for them
waleee-cl has quit [Quit: Connection closed for inactivity]
<samueldr> they are more than toys, though
<lovesegfault> They _are_ pricey
<lovesegfault> and no uboot :(
<lovesegfault> https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fbootflow_jetson_xavier.html%23wwpID0E0HB0HA
<lovesegfault> they have this weirdo thing
<samueldr> hm, based off lk, I wonder if it's similar to the android abl
<samueldr> not at all, according to the following paragraphs
<samueldr> it seems like it would be compatible with the extlinux.conf file u-boot and our sd image uses
<samueldr> it even supports FDT
<samueldr> ou
<samueldr> not FDTDIR though
<samueldr> oh*
<lovesegfault> What's FDT and FDTDIR?
<samueldr> FDTDIR is a u-boot expansion of the extlinux.conf file format, it uses it as a root for loading a device tree using *heuristics*
<samueldr> (heuristics often bein a hardcoded name at compile-time)
<lovesegfault> Oh, interesting
<samueldr> and FDT, for cboot, is the path to a Flattened Device Tree, a file with a .dtb extension most commonly
<lovesegfault> Can I do netboot with these things? It seems like C-Boot doesn't support that
<samueldr> I don't know more than what's on that page
<lovesegfault> :D
<lovesegfault> Maybe I can use cboot to launch uboot 🤔
<samueldr> it looks like you should be able to go from "tegraboot" to u-boot instead
<samueldr> not 100% sure
<lovesegfault> Interesting
<samueldr> at least, it would be what I expect, cboot is kind of a grub to tegraboot being more of a bios
* lovesegfault bottles the temptation to ship samueldr one so he can help
<samueldr> (in the boot ordering)
<samueldr> sorry, having one is kind of different to having the time to actually work on it :)
<samueldr> https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/getting_started.html
<samueldr> CBoot may be able to network boot
<lovesegfault> samueldr: If I ship you enough of them you won't have a choice but to boot NixOs before your house is flooded with them 😈
<samueldr> wouldn't that be bullying? :)
<lovesegfault> I think it's called burying
<lovesegfault> So, it does this weird NFS boot
<lovesegfault> not sure what that's about
<samueldr> it looks like to support netboot you have to recompile cboot from the bsp with customizations
<lovesegfault> Ugh
<lovesegfault> I also need to package l4t in nixpkgs
<samueldr> nixos-hardware*
<samueldr> at least, until we have a better discussion about downstream kernels
<samueldr> I'm not too fond of the couple we already have
<samueldr> even the raspberry pi foundation ones probably shouldn't be there
<lovesegfault> Interesting
<lovesegfault> You think this all needs to live not-in-nixpkgs?
<samueldr> the bespoke tools to manage the boards, maybe in nixpkgs, but the kernel itself, I believe shouldn't be
<samueldr> only mainline (and maybe things like -libre) should be in there
<samueldr> but, I do undertand that having them out means end-users will have to compile
<lovesegfault> Why? (not a loaded question)
<samueldr> which is why I think we need a discussion about it
<lovesegfault> Let me rephrase
<samueldr> well, if we start accepting kernels, we'll have... a big ton
<lovesegfault> What's the downside?
<samueldr> it suggests they are supported and maintained
<samueldr> I don't even know if we do for the raspberry pi foundation kernel
<samueldr> and then it also means there's a bunch of kernel builds sent to hydra, and then to the cache, which is to support a few users with those boards
<lovesegfault> I see
<lovesegfault> That makes sense
<lovesegfault> Which reminds me, can't we get rid of the rpi kernel by now?
<lovesegfault> I think it's been fully mainlined
<samueldr> none are "fully mainlined"
<samueldr> and rpi4 still needs work mainline AFAIK
<samueldr> mainline has a different support surface than the foundation
<lovesegfault> Wait, really none?
<lovesegfault> Not even rpi3?
<samueldr> it's incompatible with most of the things compatible with the foundation's
<lovesegfault> Is it broadcom shit?
<lovesegfault> sorry
<lovesegfault> broadcom crap?
<samueldr> it's complicated
<samueldr> I'm not 100% positive that none are fully supported, I would have to validate
<samueldr> but I *know* that if you were to, e.g. get a touchscreen and try to follow the instructions as they are, they won't work for the mainline kernel
<samueldr> they are incompatible, for good~ish reasons
<samueldr> the kernel has a standardized way to deal with the hardware descriptions in device trees, with specific label naming schemes
<samueldr> the foundation's device trees don't (or didn't?) follow that
<samueldr> so if you believe that mainline is in the right in deciding of the hardware description of all aarch64 sbcs, then it's for a good reason
<samueldr> and then, I think the drivers are working in different manners, but I do not know how it matters
<samueldr> but if you want to use things from the "ecosystem" around the raspberry pi, you probably want the raspberry pi kernels, rather than mainline
<lovesegfault> Oh,that sounds pretty unfortunate :(
<samueldr> kind of
<samueldr> well, very
<samueldr> none of that is trivial
<lovesegfault> Sure, yeah, very few things are trivial :)
<gchristensen> Total:24.12 -> 22.71 --- approaching 20% untyped...
endformationage has quit [Quit: WeeChat 2.6]
<lovesegfault> gchristensen: hum?
<gchristensen> https://github.com/NixOS/nixops/pull/1346 master is 24% untyped, this PR takes it to 22%
<{^_^}> nixops#1346 (by grahamc, 1 hour ago, open): Plugin types: Tie a ResourceState to its corresponding ResourceDefinition
<lovesegfault> :D
<lovesegfault> Soon™️
lopsided98 has joined #nixos-chat
<Gaelan> ugh i am concurrently working on like 3 PRs, all branched off of different spots on staging
<Gaelan> so many stdenv rebuilds ;(
drakonis1 has quit [Quit: WeeChat 2.8]
drakonis has joined #nixos-chat
drakonis2 has quit [Ping timeout: 260 seconds]
cole-h has quit [Quit: Goodbye]
parsley936 has joined #nixos-chat
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 265 seconds]
<ashkitten> the thing i don't understand is, why is nixops stateful?
<ashkitten> it maintains a database, right?
* lovesegfault waves hands at ashkitten in explanation
<lovesegfault> I also don't understand
<lovesegfault> And I've had it explained to me twice
<srk> it can run stateless with in memory storage now
<ashkitten> that's partly why i'm using infinisil's thing instead
<srk> I think it was due to ssh key pair generation
<srk> I've had it patched before to not require state file and use .ssh/config instead
<ashkitten> also because infinisil sold their thing to me better than nixops
<lovesegfault> srk: that hasn't landed yet, no?
<srk> ashkitten: link? :)
<srk> lovesegfault: no
<srk> thanks
<srk> neat :)
<ashkitten> note i haven't tried nixops and very well might try it
<JJJollyjim> Does the cloud resource stuff also keep state? Or does it query what exists (and thus what needs to change) at runtime?
<srk> output path of the machine closure is kept in state so it just need to compare that with what's actually deployed
<srk> not quite sure about your question, I would say it's backend dependent
<JJJollyjim> does it make API requests to ask if the machine/resource exists, then diff that against the desired state?
<JJJollyjim> or does it store the state which it set up last time, and diff *that* against the desired state
<ashkitten> all nix deployment tools simply query the remote store and then send the store paths over, and activate the new system somehow
<ashkitten> it's exactly the same as `nix copy`
<JJJollyjim> I'm asking about the terraform-style stuff (which I don't actually use)
<ashkitten> oh, i see
<srk> or nixos-rebuild switch --target-host :)
<ashkitten> srk: which i have used before! but i want auto rollback functionality and secret storage
<srk> nice! love the status
<srk> ashkitten: yup, rollbacks are very nice feature of nixops
<srk> you could emulate that with nix-profile but still
<ashkitten> it also does secret management right?
<srk> it can upload keys to machines and services typically wait for them before starting
<ashkitten> and i mean auto rollbacks, for the record, that happen if the machine you're deploying from can't connect to the host after the switch
<srk> ah, I see
<ashkitten> nixoses does that
<ashkitten> i don't know if nixops does
<srk> that's nice, with morph you can define tests to be run after the deploy is done
<srk> like query http endpoint, check port..
<srk> that combined with autorollbacks would be awesome, probably few lines of bash but still :)
<ashkitten> i also really like nixoses because it doesn't have any special command, you literally just `$(nix-build)`
<ashkitten> the output of the derivation in default.nix is a script that deploys to all machines defined
<manveru> tazjin: i'm kinda sad that you moved yants... had to vendor it in two projects already :|
<manveru> since i don't want to import the whole nix repo just for a single file
<manveru> also the nice screenshots are gone
cjpbirkbeck has quit [Ping timeout: 260 seconds]
ninjin has quit [Remote host closed the connection]
ninjin has joined #nixos-chat
ninjin has quit [Remote host closed the connection]
ninjin has joined #nixos-chat
<sphalerite> ashkitten: not all nix deployment tools — krops for example copies the nix sources to the machine doing the builds and evaluates there
<adisbladis> Re auto-rollbacks: We have that working in NixOps in a PR https://github.com/NixOS/nixops/pull/1245
<{^_^}> nixops#1245 (by grahamc, 10 weeks ago, open): Deploy Targets: Policy/Behavior-free Deployment Hooks (auto-rollbacks, drain events, etc.)
<adisbladis> It's super cool
<adisbladis> But! We wanted to go even further and have a nested two-phase commit protocol
<adisbladis> Meaning that you can not only do auto-rollbacks on a per-machine level but also on your entire network
<colemickens> does wayfire crash less than sway?
<colemickens> it's built with wlroots too though
<jtojnar> abathur I have browser tabs over 5 years old for different projects I did not yet finish
<jtojnar> recently closed some 2+ years old group of tags when I finished up the associated pull request
<Gaelan> i recently made tabs.gaelan.me
<JJJollyjim> Haha
__monty__ has joined #nixos-chat
<sphalerite> I have a device that I want to play around with a bit, and it has an SPI NOR flash (in a SOIC-8 package). What do I need in order to be able to read and write this flash from my laptop, besides a SOIC-8 clip?
<sphalerite> I think we need a browser extension that "expires" tabs into bookmarks :p
<danderson> something like a Bus Pirate to speak SPI at it
<danderson> and possibly some circuit bodges so you can power up the chip without the rest of the circuit, depending on how stuff is wired up
<danderson> (failure mode otherwise is the CPU powers up and starts driving the SPI bus lines, preventing you from controlling the chip - you can still snoop traffic though)
<danderson> what's the device?
<sphalerite> a heating controller
ninjin has quit [Remote host closed the connection]
<sphalerite> well, more precisely: an Ethernet<>CUL bridge
<sphalerite> I plug it into my router and the power, and it allows me to control my radiator thermostats via the network
<danderson> ... CUL? Never heard of that
<danderson> ah, openhab things?
<sphalerite> some weird 433/866MHz protocol
<sphalerite> yes and no
<danderson> if you can link me to the exact board maybe I can have a more precise opinion
<danderson> usually the challenge with peeking at flash chips is stopping the CPU from powering up and stealing the bus from you
<sphalerite> it's called MAX!Cube
<sphalerite> right
<danderson> most CPUs, if you hold the reset line low, it'll keep all its pins high-impedance even with the power rail running
<jtojnar> sphalerite bookmarks are too limited (no history, scrolling position, form state)
<danderson> so your reader can be bus master
<sphalerite> jtojnar: do old tabs really preserve all that?
<sphalerite> danderson: right
<jtojnar> yes
<sphalerite> danderson: the board has a reset button, so maybe I can just press and hold that x)
<danderson> (that's where bodging comes in, need a way to safely ground the reset line, assuming there's no handy test point or reset button to hold down)
<danderson> heh, yup
<danderson> hm, can't find photos of the circuit board
<sphalerite> though I'm not sure if it's a plain reset button
<jtojnar> sphalerite of course when the website itself has changed it will not help you much
<sphalerite> I can send some :)
<danderson> the challenge with reset is that it might be a soft reset switch
ninjin has joined #nixos-chat
<danderson> i.e. just a regular input signal that the microcontroller uses to enter a reset mode
<sphalerite> yeah, I suspect it is :/
<danderson> not the "hold the CPU in reset and prevent it from running" signal
<danderson> but the CPU definitely has such a pin, we just have to find it :)
<sphalerite> finding it shouldn't be too hard, activating it might be :/
<danderson> if you can get me photos of the board, or the markings on the CPU chip, I can dig
<jtojnar> what I would like is desktop-environment-level tab trees with app integration so I could have editor tabs interspersed with browser tabs and terminal tabs and the ability to auto-suspend tabs to disk to avoid running out of memory
<danderson> or alternatively, if you can read the markings on the CPU chip, so we can identify what part# it is and get the datasheet
<jtojnar> most DEs just organize things at app level, I want project-level
<sphalerite> What's nice about the board is that it does have a nicely exposed UART
<danderson> that is nice! Have you tried attaching to it yet?
<danderson> I'm curious if it boots linux, or if it's some custom firmware
<sphalerite> https://sphalerite.org/dump/max-back.jpg here's the interesting side
<sphalerite> nah, no linux
<sphalerite> it does too little to warrant a chip capable of running linux.
<sphalerite> I think.
<danderson> OMG an AT91SAM7!
<danderson> they're my favoritest microcontrollers evar. I wrote an OS for one a long time ago
<danderson> they're so nice.
<sphalerite> :D
<danderson> yeah, it has no MMU, you're not getting linux on that :)
<sphalerite> NEQ1633374 seems to be a good search term
<sphalerite> From previous research, I found out that I can reset it into a programming mode and program it via the UART, _but_ that will erase the original firmware
<sphalerite> Which I don't want to do, in case I can't get it to control my heating with the custom firmware x)
<danderson> heh
<danderson> so, okay, this is the X model of the MCU, I need to go read the datasheet
<sphalerite> (don't want to do without a backup*)
<danderson> I used the S256 way back when, dunno what this one can do
<danderson> also curious about all the unpopulated footprints on the front side. That's a lot of contacts for... nothing?
<danderson> in particular, wondering about ST3
<sphalerite> yeah, my guess would be it's for a wifi-capable model or something
<danderson> which one is the UART?
<danderson> I assume IC1 is the flash, given its position... But I thought the AT91SAM7 also has internal flash memory
<sphalerite> can't remember exactly, I think it was ST2
slack1256 has joined #nixos-chat
<sphalerite> yeah IC1 is the SPI NOR flash, based on my search for the markings
<danderson> that's a nice little chip. Built in ethernet is fancy compared to the crappy S model :)
<sphalerite> ah, so it does have flash
<danderson> yeah, S256 suffix == 256k of internal flash memory
<sphalerite> but the chip has 4MB so I'm guessing the built-in flash wasn't enough
<danderson> yeah I'm not sure what it would use 4MB of external flash for
<sphalerite> "Built-in lock bits and a security bit protect the firmware from accidental overwrite and preserve its confidentiality." :/
<danderson> it only has 128k of RAM, it's not like it can load anything big
<danderson> yeah, that's the problem.
<danderson> If they set the security bits at the factory, you can't read out the firmware.
<danderson> Now, the question is... Did they set the security bits :P
<danderson> the other thing I remember from this chip: it has a built-in boot ROM that can provide external programming access over USB
<danderson> look for SAM-BA for that
<danderson> if you can convince it to go into the programming mode, you can try reading out the internal flash over USB serial
<ar> danderson: >yeah, it has no MMU, you're not getting linux on that :)
<ar> danderson: not with that attitude! ;)
<danderson> 256k flash and 128k ram, good luck :D
<ar> danderson: ever heard of uclinux?
<danderson> sphalerite: so, if you want to get to the internal flash, there's 3 different ways you can try...
<danderson> If you can persuade the chip to boot in SAM-BA mode, there's a simple USB serial protocol you can use to read flash
<sphalerite> I believe the USB pins aren't connected
<danderson> then there's the FFPI (Fast Flash Programming Interface), which is normally for bulk programming in the factory, but I _think_ it can also read out
<danderson> I think that's what the large ST3 header is
<danderson> hm, maybe not quite. That header has 20 pins, FFPI needs 27
<danderson> lemme see what those other two ports are...
<danderson> the other option is JTAG. This chip is JTAG-capable, but I don't know if it's wired up...
<danderson> yeah ok, so it's using SAM-BA over USB to program it
<sphalerite> oh whoops, NEQ1633374 is the serial number.
<sphalerite> but yeah I just got the UART again, boot log: https://gist.github.com/lheckemann/16751da23fef252b214568e7ed265827
<__monty__> If I look at the speedup something like BLAKE3 brings along I can't help but wonder whether previous hashes were implemented by toddlers : (
<danderson> hmkay, not much interesting in the boot log
<__monty__> How can they keep speeding things up by factors like this? Has everything else just always been single-threaded?
<danderson> not surprising, completely custom app
<sphalerite> danderson: yep
<sphalerite> I mean, I _could_ just go for it without backing up the firmware…
<danderson> sec, trying to remember how the switch to samba works
<danderson> this is exactly like the board I used to program, you short some pins to force it into the recovery ROM
<danderson> but I can't remember if that erases the system flash automatically
<danderson> if it doesn't, you can use the SAM-BA tool to read out the flash before reprogramming it
<sphalerite> it does according to the post above :/
<danderson> that's the thing, I don't remember it behaving that way
<sphalerite> that may be related to the security bit?
<danderson> shorting the contacts rebooted it into the recovery ROM, but I had to explicitly tell the recovery bootloader to erase and reprogram the flash
<danderson> and if I didn't, I could power-cycle the board and it booted back into the original firmware
<danderson> trying to find the info again...
<danderson> see in particular 3.3.2 Memory Download
<danderson> obviously that won't work if they switched on flash protection at the factory... But they didn't necessarily do that :)
<danderson> but without following the traces on J1 and seeing exactly where it hooks up on the microcontroller, I can't promise that it won't bork stuff
<danderson> I never enabled the security bits, it's possible that with security enabled SAM-BA wipes the flash on boot
<danderson> ah, hrm. Okay, so the instructions are probably right and this firmware probably has the security bit enabled :/
<danderson> once you toggle flash security on, the only way to reset it is to toggle the ERASE pin on the microcontroller, which wipes the flash and reboots into SAM-BA for reflashing
<danderson> that's probably what J1 is doing
<danderson> does the company that makes these offer firmware updates?
<sphalerite> danderson: sorry, got a phone call. Back now :)
<sphalerite> I don't _think_ they do, they also don't sell it anymore AFAICT
<danderson> I'm about to head to sleep, and I don't think I'm much help at this point :)
<danderson> ah
<sphalerite> though I've never let the device communicate with the internet freely, so who knows
<danderson> well, the good news is, the microcontroller itself is impossible to brick
<sphalerite> alrighty, thanks very much for the help!
<danderson> you can always boot it back into SAM-BA and reflash it
<sphalerite> Right
<danderson> so worst case, you win a "how do I get this thing to work again" project :P
<sphalerite> and I probably won't be needing heating until the winter, so… :_)
<sphalerite> well then, good night!
<danderson> seeya!
ninjin has quit [Remote host closed the connection]
ninjin has joined #nixos-chat
waleee-cl has joined #nixos-chat
slack1256 has quit [Remote host closed the connection]
<eyJhb> srk: I threw away my xrandr script :|
<eyJhb> See gchristensen, I don't even need tmpfs $HOME to loose stuff
<srk> eyJhb: want that paste again? :D
<eyJhb> Yes please srk :p
<srk> lol, almost matched the nick
<eyJhb> At which point did you run this?
<eyJhb> What activated it?
<srk> manually after plugging the laptop into dock
<eyJhb> Ah. But unplugging with a blank screen is no fun :p
<srk> true!
<srk> you can blindly type it ;)
<eyJhb> I just got locked out of my laptop, because for some reason my keyboard layout changed to something random
<srk> maybe you can achieve the same via services.xserver.xrandrHeads but no idea how to automate it, some docking station (un)plugged event?
<eyJhb> I do not trust anything anymore :p
<srk> haha
<eyJhb> Back to normal, thanks srk :p
<eyJhb> Now I just lost all my terminal windows :(
<srk> once I've managed to type few of my passwords to irc because fullscreen youtube app crashed obscuring the view, then I've switched xmonad workspace to one with irc, then switched to pty via ctrl-alt-f1 and tried to login few times and it somehow forwarded all the keystrokes to irssi workspace
<danderson> pro tip: start passwords with /
<danderson> that way irssi will eat it as a command :)
<srk> !!
<srk> lol
<danderson> brought to you by definitely not typing my damn password into IRC half a dozen times
<srk> I think fedora is now running X selinuxed but it wasn't the case before, not sure if it would help in this case
<srk> youtube works best via mpv :D
<srk> or mps-youtube
<srk> danderson: I now remember to switch to some other workspace before switching to pty, weird :)
<eyJhb> danderson: even better, store them in a plaintext in a plugin that will censor it!
<eyJhb> \s
<eyJhb> :D But / is actually nice
<eyJhb> Have thought about that
<eyJhb> Might use that one
<eyJhb> Also, adds a extra char to it! If the hacker did not follow this convo at least
<eyJhb> danderson: I once copied some configs into IRC with my domain name. It was a annonymous chat, different alias. And here in Denmark your domain names have to be registered with you full name
<eyJhb> _not fun_
<tazjin> manveru: the README is rendered on the /about page - https://git.tazj.in/about/nix/yants
<tazjin> and the tree is split out as a subtree into the nix/yants branch
<tazjin> so you can get just yants by doing something like: git clone -b nix/yants https://git.tazj.in yants
<tazjin> in fact that branch is based on the pre-merge yants, so you can set that as an upstream in a clone of the older repo and it'll just work if you pull
<tazjin> I added this to the docs now because I realise it's very unintuitive
<__monty__> eyJhb: Sounds like you've got a bad case of PEBKAC : )
<sphalerite> danderson: JTAG is exposed via the ST3 pads if I'm not entirely mistaken
<sphalerite> hm or maybe not
<sphalerite> no, I think it is. Now all I need is a debugger :D
<abathur> <3 samueldr haha
<{^_^}> samueldr's karma got increased to 228
<sphalerite> hm, so if it has JTAG, do I need a device-specific debugger..? Or is a JTAG debugger just a JTAG debugger…
<sphalerite> (as in debugger hardware)
<eyJhb> sphalerite: normally it is just a hardware debugger
<eyJhb> As far as I know
<eyJhb> And that is basically, anything that reads serial as far as I remember
<eyJhb> Maybe not 100% but damn close
<eyJhb> What are you playing with sphalerite ?
<gchristensen> so I've setup my system that every new terminal and every program I launch is in its own systemd-run --user --scope, and I've been running this for the last day or so: https://gist.github.com/grahamc/2b81e7d989dfa2c563001f31d55e2c53 and it mostly works except copy/paste is broken
waleee-cl has quit [Quit: Connection closed for inactivity]
KeiraT has quit [Remote host closed the connection]
<infinisil> Neat!
KeiraT has joined #nixos-chat
<eyJhb> Sounds nice gchristensen !
<eyJhb> Btw, anyone got a good system for tracking / writing down how many hours you work?
ninjin has quit [Ping timeout: 240 seconds]
<eyJhb> Could be work/work or project work
<eyJhb> Need a good system for this to keep track of working hours, currently I have a stopwatch
ninjin has joined #nixos-chat
<infinisil> eyJhb: I do have one, coded it myself, but it's not public currently
<__monty__> I'm interested in the arbtt approach to timing.
<gchristensen> I write down when I start and write down when I finish :)
<gchristensen> (usually 8:30, and then 4:30)
<__monty__> You work 8h straight? You're a beast!
<__monty__> Don't you need to time per-client?
<gchristensen> I do client work in basically 1 day increments
<gchristensen> and I might take breaks, but I bill for them because it wouldbe lying to say I stop worka nd stop thinking through the problem
<__monty__> I agree about the latter. So no mail processing for other clients?
<infinisil> eyJhb: Before I coded that thing myself, I just used `echo "$(date -Iseconds) ${*:-in}" >> ~/job/log` in a script
<infinisil> Which is essentially what the current code does too
waleee-cl has joined #nixos-chat
<infinisil> I tracked all the time I spent on my bachelors thesis with this :)
<infinisil> Total time was 391 hours
<infinisil> Just used some awk to process it, e.g. this to figure out the total time: https://paste.infinisil.com/XJyS9_iMrY.sh
<abathur> eyJhb: I've just been using web apps for many years now, but I don't really track non-client time; I used to use yast, but they shut down last year and I switched to toggl
<abathur> mostly because I like having something I can use across devices
KeiraT has quit [Ping timeout: 240 seconds]
KeiraT has joined #nixos-chat
<sphalerite> eyJhb: heating controller. MAX!Cube made by eqiva. I think it's discontinued
<manveru> and the author uses `nix-env -i perl5.28.2-ack-2.28` to benchmark nix install speed :|
<sphalerite> eyJhb: see my chat with danders*n this morning for details
<neeasade> manveru: tbf they are including fetch time in all the other distro benchmarks as well
<neeasade> does feel a little weird though yeah
<manveru> i'm fine with that
<neeasade> (I was just scrolling throug that post as well)
<manveru> but `nix-env -i` is 36x slower than `nix-env -iA` :P
<neeasade> o
<manveru> so i'd like to make a little benchmark of using flakes, which is even faster than that
<manveru> gotta say, `nix profile` is pretty neat
<manveru> `nix-env -iA nixpkgs.ack` uses 0.24s, while `nix profile install nixpkgs#ack` uses 0.03s
<manveru> excluding download times of course...
<gchristensen> that evaluation cache :)
<neeasade> manveru: where does `profile` come from? I don't have it here
<manveru> neeasade: it's part of `nixFlakes`
<neeasade> ahh
<neeasade> thanks
<manveru> you'll also need `experimental-features = nix-command flakes ca-references` in your `nix.conf`
<neeasade> gotcha
<manveru> so obviously not gonna recommend it to people, but i use it myself :)
<manveru> pretty hyped for the future
<neeasade> sure sure -- i've mostly been watching from afar and seening the occasional flakes repo popup in my feed
<manveru> gchristensen: my dream is still a super fast nixops with flakes :)
<manveru> hope we'll get there this year
<gchristensen> sounds good :)
<emily> flakes makes nixos-rebuild slower for me :(
<emily> because my entire dirty git tree gets copied to the store each time
<manveru> it made me at least commit every change... and it's way faster than with the ton of `niv` dependencies i had
lassulus has quit [Remote host closed the connection]
lassulus has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 265 seconds]
cjpbirkbeck has joined #nixos-chat
drakonis has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
<gchristensen> manveru: that is cool to hear
<andi-> It makes we wonder if most people just want the eval cache and not flakes (I know that something like flakes is a requirement for the cache)
<manveru> cache and threaded eval :)
<manveru> that'd be rad
<adisbladis> Does anyone have a good solution to get photos off an iphone?
<adisbladis> I tried ifuse but it didn't work for me. Do I need some extra services running or something like that?
<sphalerite> factory reset
<sphalerite> *troll*
<pie_> clever: also i needed to use a different tftp server, ended up using atftpd
<pie_> clever: WOOOOOO ITS RUNNNING THIS IS AMAZING
<pie_> IPXEEEEEE
<adisbladis> sphalerite: My preference would be to see if it blends...
<sphalerite> pie_: that feeling :D
<adisbladis> Why can't anything from apple be easy
<sphalerite> adisbladis: probably icloud sync is easy
<adisbladis> sphalerite: That sounds like a next level retarded way to get files off a device..
<pie_> sphalerite: cannibalized this into a contianer and bridged it to my ethernet port https://github.com/cleverca22/nixos-configs/blob/master/netboot_server.nix
<pie_> adisbladis: thats not retarted thats just actively bad
<adisbladis> Anyway, the icloud account in question doesn't have enough storage space anyway
<adisbladis> Alright, ifuse requires `services.usbmuxd.enable = true`
<adisbladis> Holy hell apple is user hostile
<etu> adisbladis: buy bigger icloud :p
<adisbladis> etu: I think you've identified why it's so user hostile
<adisbladis> Why else would you keep throwing more money at apple
turlando has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 246 seconds]
<gchristensen> I'm walking my brother through installing NixOS over a video call
<clever> pie_: how did tftpd fail?
<gchristensen> he's last used Linux about 15 years ago. Gentoo. it is going really well, and he's finding a lot of it intuitive
<ornxka> i used gentoo before i switched to nixos
ninjin has quit [Remote host closed the connection]
<ornxka> i actually rather liked it, although emerge was annoyingly finnicky
ninjin has joined #nixos-chat
<pie_> clever: silently, but i got some stuff from wireshark, i need to go back and check it again because i closed it, but it was something like...
<ornxka> nixos is a huge improvement over anything else i've ever used though
<etu> ornxka: There's a lot of people in nixos with a gentoo background :-)
<pie_> clever: user aborted download, after one data packet
<clever> i too came from gentoo
<clever> pie_: try comparing the first reply that each tftp server sent, and how they differ
<pie_> clever: ok i need to rememebr to try that
<sphalerite> gchristensen: yay! :D
* adisbladis <- ex gentoo too :>
<bqv> Ditto
<adisbladis> It makes sense a lot of us came from that background
<adisbladis> Nix is like Gentoo+++++
<MichaelRaskin> I ran Gentoo for less than a week
<MichaelRaskin> Didn't like it. LFS, on the other hand…
<adisbladis> I ended up running Exherbo for quite a while too... That's a cautionary tale in splitting up Nixpkgs.
<__monty__> Do tell the tale.
<adisbladis> __monty__: It looks quite different now from when I was using/contributing
<adisbladis> But look at this https://gitlab.exherbo.org/exherbo
cole-h has joined #nixos-chat
<adisbladis> It was _very_ hard to know if you broke something in one of the other repositories
<adisbladis> Because of course the world can't be neatly split up like that
<__monty__> Wouldn't a CI solution like hydra still test everything?
<MichaelRaskin> Let's just say we had NixOS and Nixpkgs in different repos on the same Hydra
<MichaelRaskin> They ended up being merged
<adisbladis> __monty__: Having the entire world in a huge monorepo makes things very easy to test
drakonis_ has joined #nixos-chat
endformationage has joined #nixos-chat
drakonis has quit [Ping timeout: 260 seconds]
drakonis has joined #nixos-chat
<ekleog> Anyone has seen Sonarpulse/Ericsson1394 on IRC recently? wondering if I should try dropping an email or waiting here :)
<pie_> ericson *is* in #nixos ? or do you mean not replying
<pie_> i poked him at some point but my sense of time isnt great :D
<pie_> so it might have been more than a few days ago
<ekleog> oooooh
<ekleog> hadn't seen actually xD
drakonis_ has quit [Ping timeout: 260 seconds]
<cole-h> lovesegfault++ I saw that you starred `grip` a while ago, just started using it for hacking on a README (specifically ofborg's)... It's really nice.
<{^_^}> lovesegfault's karma got increased to 30
drakonis_ has joined #nixos-chat
<pie_> whats grip
<cole-h> "Render local readme files before sending off to GitHub."
<lovesegfault> cole-h: Yeah, I tried that and it's cute
<evanjs> Argh. Trying to remember what that organization or erm, group(?) that lists a bunch of critically important, widely used open source software
<evanjs> I think they focus on funding such projects as well via member companies and etc
<evanjs> I don't think it's the Core Infrastructure Initiative but I could be wrong
<evanjs> Going off of a mental image of the site and a random PDF of vulnerable/commonly used software I saw like years ago
<evanjs> For all I know, it could be the CII, but it looks like most of the pages are 404ing atm (at least on https://www.coreinfrastructure.org/programs/)
<evanjs> Ohhh the navbar links are working, but the links on the programs page have not been updated lol
<__monty__> evanjs: EFF?
<evanjs> e.g. there is a census program i and ii but the programs page only lists a link to e.g. https://www.coreinfrastructure.org/programs/census-project
<__monty__> Or maybe FSC?
<evanjs> seeing https://www.coreinfrastructure.org/programs/audit-program/ I think it might actually be CII
<evanjs> The cost of audit and etc seem familiar
<evanjs> but yeah still unsure
<evanjs> I thought I remembered seeing things like bzip and etc listed
<evanjs> For some reason I have a black background in the image of the website in my head. A few years back so probably not dark-mode lol
<__monty__> Is bzip still recommended anywhere?
<evanjs> Idek haha
<evanjs> I started looking for this site after I remembered I need to modify my nextcloud config due to https://github.com/NixOS/nixpkgs/pull/86417
<{^_^}> #86417 (by tokudan, 2 weeks ago, merged): p7zip: fix two CVEs and mark as insecure
<evanjs> And was wondering if p7zip was listed in the audit on whatever site I couldn't remember
<evanjs> __monty__: also, which FSC? :P
<__monty__> Oh, SFC sorry.
<__monty__> Software Freedom Conservancy.
<__monty__> But neither of the ones I said do any audits/certifications afaik.
<evanjs> Man I was so confused at first. "Forest Stewardship Council"? wot? lol
<evanjs> though, ironically, both have tree logos lol
cjpbirkbeck has quit [Quit: cjpbirkbeck]
cjpbirkbeck has joined #nixos-chat
<MichaelRaskin> gchristensen: re: suspending GUI programs on switch-away and clipboard — you just need a clipboard manager, I guess? Or something that yanks and re-owns the selection…
<samueldr> I'd need to research a bit, but could this approach be used not to fully suspend, but to change limits on the groups?
<MichaelRaskin> Alternatively, if all _visible_ programs are allowed to run, you can copy-paste using a split
<MichaelRaskin> samueldr: I would expect so
<samueldr> I wouldn't mind having some processes' quotas and other limits turned down in the background
<pie_> check archive.org <evanjs> For some reason I have a black background in the image of the website in my head. A few years back so probably not dark-mode lol
<evanjs> pie_: I have for a few of them so far. But yeah no luck so far
<cole-h> Sigh of relief number 2: I'm completely, totally done with finals. Ahhhhhhhhhhhhhhhhhhhhhhhhh
<samueldr> nixos on your machine when? :)
<cole-h> Soon. Very soon. Maybe tomorrow.
<evanjs> cole-h: same but waiting for final grades so I can submit to work. I've been waiting for like 2 weeks now. so stressful lol
<cole-h> :^)
<cole-h> I'm still super stressed about my history grade (final was a 1000 word essay, and then there was also the final *paper*, which was 5 pages minimum)
<cole-h> But I can't do anything now, so I am just gonna take it easy for now :)
<samueldr> you can't do anything now, or you can't you do anything now? :)
<samueldr> oops, left a "you" while rephrasing
<cole-h> Which one? lol
<cole-h> Brain is dead pls help
<samueldr> you can't do anything now, or can't you do anything now? :)
<samueldr> though without a brain, I guess you can't do anything now
<cole-h> Yes indeed
* colemickens is going down a bad path
<colemickens> where is the gcp nixops bootstrap image refenced in nixops-gce?
<cole-h> lol
<colemickens> er no, that's an ooold example
<colemickens> maybe its BYOBI
evelyn has quit [Quit: And there's nowt that I can bid ye, but that peace and love gan with ye!]
<gchristensen> signal-desktop gets temporarliy grumpy about not being able to phone home all the time, but it solves itself in short order
<gchristensen> floating, pop-out video doesn't work lol
<cole-h> :(
<__monty__> Why does a product that's supposedly all about privacy have such weird idiosyncrasies?
<cole-h> What software doesn't have weird idiosyncrasies, tbh
<MichaelRaskin> Likely justification: they keep sending garbage to avoid traffic correlation
<MichaelRaskin> (Also making the app where identity is tied to a smartphone a horrible battery drain on Android unless you have Google Services… privacy?)
<gchristensen> I think it uses a websocket or something for streaming updates
<gchristensen> and it times out quickly I guess
waleee-cl has quit [Quit: Connection closed for inactivity]
<__monty__> MichaelRaskin: I kinda doubt they have cover traffic tbh.
<MichaelRaskin> So they _just_ fail at writing code for Android that badly?
slack1256 has joined #nixos-chat
<gchristensen> SIGSTOP is doing some predictably funny things to my terminals
<gchristensen> but the strange part is it is not consistently happening
<__monty__> Could the problem be signals and threading don't mix?
<gchristensen> that is definitely true
<danderson> ugh signals and threading
<danderson> posix's worst legacy
<danderson> or maybe that's file locking
<danderson> so many to choose from
<gchristensen> so many options!
<__monty__> And all neatly standardized.
<danderson> It would be interesting for someone to say "okay screw posix, let's make a new OS API that makes sense"
<danderson> and try to get it actually adopted
<cole-h> So, having not worked with C in any major length of time -- what's with the hate on signals and threading?
<gchristensen> maybe I can stick the scope in to a freezer cgroup
<gchristensen> cole-h: they can happen in the middle of literally anything else, and you basically can't do anything inside of a signal handler without swearing a blood oath. then you add threading
<danderson> cole-h: signals are delivered to a single, arbitrary thread in the process
<danderson> and they just wreck anything that thread was doing
<danderson> there are ways around that, but it's hard to get right and C programs mostly just don't.
<danderson> languages like Go that have a builtin runtime go through a lot of work to make signal handling behave the way people intuitively expect
<danderson> which is basically "don't blow up a random thread in my process if I do nothing, and let me subscribe to signals from any thread"
<qyliss> what does Rust do for signals?
<MichaelRaskin> danderson:
<MichaelRaskin> I think anything with chance of wide adoption would include monopoly abuse
<MichaelRaskin> (Which means it has a pretty large chance to age even worse than POSIX for design incenctive reasons)
<cole-h> Thanks gchristensen danderson
<danderson> MichaelRaskin: that's happening already though. Linux is now the de-facto OS API for a lot of software, so much so that the BSDs and Illumos derivatives implement linux compat layers
<danderson> so, we're already one foot into a post-posix world. We just happened to pick a randomly evolved design bolted on the top of posix, rather than start over
<danderson> but yeah, getting anything cooperative done in a world where large corporations own most of the development brawn is... tricky.
<MichaelRaskin> Linux is not really post-POSIX
<danderson> qyliss: rust appears to implement "lol" : https://github.com/rust-lang/rfcs/issues/1368
<{^_^}> rust-lang/rfcs#1368 (by steveklabnik, 4 years ago, open): Signal handling
<danderson> aka "do nothing, let posix wreck my process"
<MichaelRaskin> If you throw out all the history and just look at the SUS evolution where it started chasing Linux, you could still believe «yeah, POSIX lives on and evolves»
<danderson> which, in fairness, is _mostly_ fine, because for a lot of software it's okay to not handle signals cleanly and just rely on their default behavior (e.g. sigkill will still work)
<danderson> really if someone has implemented a crate that lets you handle sigint and sigterm cleanly, that covers 90% of what people want from signal handling
<danderson> ... until you get into the long tail of "oh noes a terminal emulator" and suchlike
__monty__ has quit [Quit: leaving]
misuzu has quit [Quit: leaving]
misuzu has joined #nixos-chat
<drakonis> danderson: the only bsd with linux compat is freebsd
<danderson> TIL, I thought it was cross-ported
<drakonis> the others are either too out of date or deemed insecure or removed
<drakonis> freebsd's linux compat is used for infiniband and gpu drivers
<drakonis> and running binaries that don't have deep dependencies on linux features
<drakonis> we have been on a posix posix world for years now
<drakonis> as the other OSes arent exactly primary targets
<drakonis> post posix because linux is starting to throw away a bunch of posix-y stuff
<bqv> Is freebsd linux compat enough to make nixos work?
<drakonis> well, the port exists already
<drakonis> refer to #freebsd-nix
<qyliss> A port of Nix exists
<drakonis> now, whether you can use nixos is another issue
<qyliss> Nixpkgs doesn't even really run of FreeBSD, let alone NixOS
<MichaelRaskin> Not in the current shape, it is compat for _applications_, not for taking over the entire system configuration
<drakonis> as it makes use of a lot of systemd
<bqv> Ah yeah
<drakonis> the applications themselves would still need a whole lot of patching in order to natively run on freebsd
<drakonis> as freebsd isn't a major target for most applications
<drakonis> it'd require their cooperation in order to maintain it
<cole-h> Uh, cool, emacs-pgtk build fails for no discernable reason https://gist.github.com/cole-h/93b510ffca20bf9668b15d916208a136
<drakonis> it isnt likely that they'd run a third party package manager when ports exists
<drakonis> you'd have more luck getting windows users to run nix than freebsd users
<qyliss> I've encountered at least a couple of freebsd users interested in Nix
<qyliss> Not to mention all the Nix users interested in FreeBSD
<drakonis> well, a small group is fine and all that
<drakonis> hmm
<drakonis> i should try to convince a freebsd kernel developer to use it
<drakonis> now that would be a net victory
<qyliss> I'm very interested in running Nix on FreeBSD because it would give us a way to have an environment more similar to Darwin without all the restrictions Darwin entails
<drakonis> hmm, good point
<qyliss> It's obviously not _that_ close, but it's close enough that I've fixed Darwin build failures on the past by testing building the program manually on FreeBSD
<qyliss> if I could actually use Nixpkgs there, that would be a big improvement
<gchristensen> how about an actual darwin kernel:)
<qyliss> that would be even better, but much harder to pull off I'm guessing
<drakonis> it exists
<drakonis> opendarwin and all that
drakonis_ has quit [Ping timeout: 256 seconds]
<drakonis> but the proprietary parts arent available
<drakonis> it is hokey
drakonis_ has joined #nixos-chat
<qyliss> OpenDarwin isn't really much of a thing any more AIUI
<MichaelRaskin> PureDarwin looks somewhat alive
<drakonis> was there any recent movements regarding the freebsd nix port?
<cole-h> Git masters, how do I pin a submodule to a certain commit until I `git submodule update --remote` it?
<qyliss> aren't submodules always pinned to a certain commit?
<cole-h> I mean pinned in the `.gitmodules` file -- I ran `git submodule update --remote`, submodule broke some stuff, so I wanted to revert it
<cole-h> Which meant `rm -rf submodule && git submodule update` because `git restore submodule` didn't work >:(
<ashkitten> shouldn't you just be able to do `git submodule update`?
<ashkitten> or `git submodule update --force`
<qyliss> I avoid submodules because they're no horrible to work with tbh
<gchristensen> true git masters know to not use submodules
<cole-h> Not wrong... I just don't want to clone pgtk-emacs every time
<ashkitten> i guess i'm not a true git master then? what am i supposed to use again?
<ashkitten> what am i supposed to use then?*
* gchristensen 's being hyperbolic
<ashkitten> okay
<gchristensen> but I used `repo` for a long time instead of submodules
<ashkitten> well this is why things like repo exist, i assume. but repo looks like even more screwy
<cole-h> gchristensen: You're a curve? 😳
<gchristensen> repo is great if you have 500 repos and all of them need to be cloned in to specific locations at matching branches to be able to do work
<ashkitten> cole-h: we don't judge body types here :p
<gchristensen> the thing I learned from making repo work is don't do that
<MichaelRaskin> Hmm, considering humans as dynamic systems, hyperbolic is probably indeed the most typical type
<qyliss> I recommend git subtrees
<ashkitten> subtrees?
<ashkitten> i've not heard of that
<qyliss> git subtree is basically a program that comes with git to make it easy to include other repositories as subdirectories
<qyliss> So for example, in my NixOS configuration, I have a Nixpkgs subtree
* cole-h reads up on subtree
<qyliss> And all that means is that at some point there was a merge commit, where the second parent was some Nixpkgs commit, that added Nixpkgs tree as of that commit as a subdirectory of my repository
<qyliss> It's a bit like just vendoring code into your repository, except it preserves original commit history (including hashes) and stuff
<qyliss> Alternatively, it's like merge commits that apply only to a subdirectory
<ashkitten> eh, i think i prefer submodules for what i'm doing
<ashkitten> i know how to use them fairly well so the common gotchas aren't an issue for me
<qyliss> The thing I like about subtrees is that it unifies things into just one repository
<ashkitten> right, but what if you don't want to?
<qyliss> I've come to realise that I basically always want to
<qyliss> Even if I didn't think that before I started using subtrees
<qyliss> I now can't think of a situation where I don't want that
<ashkitten> for instance i don't want my secrets repository to be part of my actual nixos-config repo, but i want it as a submodule
<qyliss> aha
<qyliss> yes that is a usecase subtrees don't address
<qyliss> good example :)
<qyliss> i don't really have anything like that
<ashkitten> honestly i can see your point about keeping nixpkgs as part of your nixos-config repo but i've never had an issue with rebasing on nixos-unstable and force-pushing back to my own repo
<ashkitten> and i don't have custom versions of the other repos i keep as submodules in my config repo
<qyliss> I don't like doing that because I think other people follow my repo
<qyliss> so merging lets them see what changed as it happened
<ashkitten> i hope nobody follows my repo lol
<ashkitten> it's not very different from nixos-unstable
<ashkitten> i just basically follow nixos-unstable and merge in pull requests if i want
<ashkitten> like the mastodon pr
<ashkitten> plus, that means even though i rebase and force-push to my own repo for nixpkgs, i don't have to force-push to nixos-config
<ashkitten> my nixos-config history is the cleanest history i've ever done for a repo that long-lived
slack1256 has quit [Remote host closed the connection]