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