8 May 2023 |
@elvishjerricco:matrix.org | nikstur: What Arian and I had discussed before was adding a device option to inform it which device you want it to format. | 22:52:12 |
@elvishjerricco:matrix.org | We thought about trying to derive it from fileSystems."/".device but this wouldn't realistically work | 22:53:35 |
@nikstur:matrix.org | In reply to @elvishjerricco:matrix.org nikstur: What Arian and I had discussed before was adding a device option to inform it which device you want it to format. That seems fair. | 23:00:42 |
@nikstur:matrix.org | In reply to @elvishjerricco:matrix.org We thought about trying to derive it from fileSystems."/".device but this wouldn't realistically work Yes that wouldn't work for a volatile filesystem like a tmpfs for example | 23:01:03 |
@elvishjerricco:matrix.org | the other possibility about is mounting /nix/store in /sysusr to try to get sysusr -style functionality. This is significantly tricker though, and of course doesn't work if the store isn't on the same storage device as the root fs. | 23:02:12 |
@elvishjerricco:matrix.org | * the other possibility is mounting /nix/store in /sysusr to try to get sysusr -style functionality. This is significantly tricker though, and of course doesn't work if the store isn't on the same storage device as the root fs. | 23:02:21 |
@nikstur:matrix.org | I thought about that too. That would also allow us to use systemd-veritysetup-generator which would be fun | 23:03:26 |
@nikstur:matrix.org | We could also think about invoking systemd-repart multiple times one for each disk you want to partition | 23:04:43 |
@nikstur:matrix.org | But as it stands, systemd-repart really only thinks about single-disk systems | 23:06:05 |
@elvishjerricco:matrix.org | nikstur: The most comprehensive thing we could probably do would be to support three modes: 1) Let repart find the device via /sysusr , which would be repurposed for /nix/store . 2) Let repart find the device via /sysroot , meaning you must already have a formatted root fs. 3) Allow specifying the device manually in a NixOS option. | 23:17:39 |
@elvishjerricco:matrix.org | If we only do one of them, it should not be #2, because that's the weakest option | 23:18:03 |
@nikstur:matrix.org | I think we can reasonably do 2) and 3) | 23:18:26 |
@elvishjerricco:matrix.org | But in theory we could just set it up to do whichever one is most possible | 23:18:28 |
@nikstur:matrix.org | 1 would be cool but has other drawbacks, like no substitutions I believe | 23:18:58 |
@elvishjerricco:matrix.org | What do you mean by "no substitutions"? | 23:19:11 |
@nikstur:matrix.org | Path substitutions from a cache | 23:19:41 |
@elvishjerricco:matrix.org | oh, no | 23:20:06 |
@elvishjerricco:matrix.org | We won't need to change the nix store path. /sysusr is meant to be seen as a chroot root | 23:20:53 |
@nikstur:matrix.org | Ahh right | 23:22:00 |
@elvishjerricco:matrix.org | We'd just have to make /sysusr/usr somehow a mountpoint pointing to the same device as /sysusr/nix/store , which I suppose means making it a bind mount to something | 23:22:33 |
@nikstur:matrix.org | I'll hack the device option (number 3) into the PR so that it falls back to number 2 when no device is specified. | 23:22:47 |
@elvishjerricco:matrix.org | yea that's a good start | 23:23:04 |
@elvishjerricco:matrix.org | and likely all we'll really need | 23:23:11 |
@nikstur:matrix.org | Yes I agree | 23:24:39 |
@nikstur:matrix.org | I'll try to write a test for creating a root partition too | 23:24:43 |
Arian | That's awesome! | 23:31:40 |
9 May 2023 |
@elvishjerricco:matrix.org | nikstur: Heh, I dunno if you were planning on doing the other suggestions in a separate PR, but #230777 was merged :P | 11:07:09 |
@nikstur:matrix.org | Haha that's ok I'll just do a follow up | 11:07:49 |
17 May 2023 |
@mberndt:matrix.org | ElvishJerricco I've reworked the Stratis root fs support. nixos-generate-config now does the right thing with stratis volumes, and the stratisroot module will make sure that all pools required to boot the machine are initialized in the initramfs. Could you take another look? https://github.com/NixOS/nixpkgs/pull/229767 | 03:07:43 |
@elvishjerricco:matrix.org | mberndt: I'll take a look soon. Been feeling a little ill so I've been avoiding nixpkgs work for a couple of days | 13:34:40 |