Lisanna has joined #nixos-chat
<clever> infinisil: i believe when the firmware runs an efi based bootloader, it gives it a pointer to a EFI_BOOT_SERVICES structure
<clever> and as you can see on http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES that contains function pointers for the entire api
<infinisil> Oh and with that you can then do stuff in your exe files
<clever> yeah
<clever> like ask the firmware to read a given file on a given block device
<clever> and when grub loads linux, it forwards the same pointer onwards
<clever> and then linux calls ExitBootServices() which shuts down most of the firmware, leaving the system in a state where an OS can take full control
<infinisil> Hmm..
<infinisil> And say nvme support, what would an .exe do with that struct to enable that?
<clever> i'm guessing you can use InstallProtocolInterface to register a function that handles a given block device type
<infinisil> Yeah sounds like that might be it
<infinisil> Alright I'm gonna make myself some delicious canned ravioli now :D
jtojnar has quit [Remote host closed the connection]
<lejonet> infinisil: nix-build -p stove -iA kitchen.cupboard.canned_ravioli.cook ? :P
<clever> -p only works on nix-shell, and it conflicts with -A
<clever> and -i only works on nix-env!
<infinisil> clever: and nix-shell!
<infinisil> (Not in that way though)
<lejonet> clever: -i for ingest... :P
<infinisil> But yes lejonet that's the idea :P
<lejonet> infinisil: ^^ I'm going to head to bed anyway
<infinisil> Ravioli.override { enableCanned = true; }
<lejonet> :D
<infinisil> Night!
<lejonet> Nighty! (I really need to fool around with nix-shell and nix-build more, as I intend to package a few things and fool around with different envs)
<clever> that reminds me, -A has some really weird features that almost nobody knows of
<infinisil> clever the --arg thing?
<clever> infinisil: yeah
<clever> if you do -A a.b.c, it will auto-call a, b, and c, with every --arg
<clever> [clever@amd-nixos:~/nix-tests/kexec]$ nix log /nix/store/x283h8csi6q98a1wwvq26fps9c308byf-qemu-host-cpu-only-2.11.1
<clever> and now to figure out if my qemu has nvme!
<clever> {"name": "nvme0n1", "maj:min": "259:0", "rm": "0", "size": "20G", "ro": "0", "type": "disk", "mountpoint": null}
<clever> infinisil: i can now emulate nvme inside qemu
jtojnar has joined #nixos-chat
<infinisil> \o/
<clever> and i have uefi emulation as well
<infinisil> Unrelated, but it reminded me when i saw the "ro": 0 field there:
<infinisil> when you set readonly=on on a zfs dataset, this gets completely ignored when you legacy mount it
<clever> yikes!
<infinisil> So you can totally mutate it by just mounting rw
<infinisil> And I haven't found a good way to get around this :/
<infinisil> Ohhh I think I know how
<infinisil> Yeah that's it: Set canmount=auto, set mountpoint to what you want, and `zfs mount <dataset>`
<infinisil> canmount=noauto* I mean
<infinisil> (noauto is needed so that it doesn't try to mount it on boot)
<infinisil> And this readonly problem isn't there with `zfs mount`, so that's why that's good
<clever> 2018-04-06 19:06:33 < Mic92> fpletz: https://github.com/zfsonlinux/zfs/pull/7329 that one is interesting for nixos
<clever> 2018-04-06 19:06:49 < Mic92> makes mountpoint=legacy for zfs obsolete
<infinisil> Huh
<infinisil> Nice
<clever> nixos will likely still need fileSystems entries for anything boot related
<clever> but once systemd takes over, it can find the rest
<clever> i'm now testing an efi+sata install in qemu, to ensure the efi half works
<infinisil> Nice, merged 5 hours ago \o/
<clever> also, nixos-install is a lot nicer with nix 2.0
<infinisil> What's changed?
<clever> its now a single line of output, showing progress
<infinisil> Oh yeah, that's nice
<infinisil> Well.. it's almost a bit frustrating to not see what it's really doing haha
<clever> it prints the most recent line of output from the builders
<infinisil> Yea, but it feels like there's not really any progress
<infinisil> But still better than before :)
<clever> ok, need to switch to gpt...
<infinisil> you're using MBR??
<clever> the old justdoit.nix was MBR
<clever> but i cant test uefi on MBR
<clever> hmmm, this opens up the option of labels
<clever> and it fails to boot...
<infinisil> I've had some problems with labels too
<clever> no labels right now
<clever> it feels like it cant find the root device
<zybell_> Can you get a GRUB-cmdline?
<clever> i have a shell in the initrd now
<clever> and /dev/vda3 is a zfs member acording to blkid
<clever> oh, *facepalm*
<clever> i didnt export before the reboot
<clever> and the last time i used this qemu script, it was to confirm the behaviour of exactly that
<infinisil> Here's a scary command for the brave ones to run: `sudo wipefs /dev/sd*`
<clever> i just added a wipefs -a to the script
<infinisil> wipefs sounds so dangerous, but it's harmless without flags :)
Lisanna has quit [Remote host closed the connection]
<clever> and it boots
<clever> but this is legacy on gpt
<clever> (facepalm)
<clever> got the grub params backwards
<clever> lol
<clever> forgot to enable uefi on the 2nd qemu
<clever> explains why it cant boot uefi!
ma27 has joined #nixos-chat
ma27 has quit [Ping timeout: 260 seconds]
ma27 has joined #nixos-chat
zybell_ has quit [Ping timeout: 265 seconds]
zybell_ has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
zybell_ has quit [Ping timeout: 255 seconds]
zybell_ has joined #nixos-chat
ma27 has quit [Ping timeout: 260 seconds]
ma27 has joined #nixos-chat
ma27 has quit [Ping timeout: 260 seconds]
ma27 has joined #nixos-chat
<MichaelRaskin> Yes, yes, that and the patch problem is also hilarious.
<zimbatm> how do you feel about putting quotes around your urls?
<zimbatm> basically I feel like URL literals are a mis-feature of the language and should be avoided
<zimbatm> URLs are traditionally really hard to parse properly so it complexifies the language parser
<zimbatm> and in the end it just gives back a string so there is no real advantage here
<MichaelRaskin> Also, quoted strings are superior because when you convert them to use variable substitution you need to add the quotes anyway
<zimbatm> yeah
<zimbatm> in that case it's for the meta.homepage which is less likely to have a variable
<zimbatm> I guess one argument could be that it validates the URL at parsing time
<MichaelRaskin> For a really weak meaning of validation
<MichaelRaskin> Also, irrelevent, given that multiple people actually check the URLs for 301 redirects with scripts…
<MichaelRaskin> (and I mean across the entire Nixpkgs)
<zimbatm> I just tested this in nix repl and it's counted as a valid URL
<zimbatm> > h::///foo..com
<zimbatm> I think the parser is just [a-z]+:.*
<zimbatm> \w+:[^ ]+
<zimbatm> nix-repl> X_:0
<zimbatm> «lambda @ (string):1:1»
<MichaelRaskin> Yeah, optimised for maximum confusion with function definition
<MichaelRaskin> x:0 is a function, x:x is a URL
<MichaelRaskin> I think
ma27 has quit [Ping timeout: 256 seconds]