| 3 Jun 2025 |
rocky ((λ💝.💝)💐) (she/they; ask before DM please) | Attaching the files currently | 08:55:38 |
rocky ((λ💝.💝)💐) (she/they; ask before DM please) | Download configuration.nix | 08:58:22 |
rocky ((λ💝.💝)💐) (she/they; ask before DM please) | Download disk-config.nix | 08:58:23 |
| Sylkos changed their display name from sylk0s to Sylkos. | 16:10:19 |
| Sylkos set a profile picture. | 16:15:03 |
| 4 Jun 2025 |
| robsliwi changed their display name from Robert Sliwinski to robsliwi. | 18:30:13 |
| 5 Jun 2025 |
| shelvacu joined the room. | 21:48:38 |
shelvacu | https://github.com/nix-community/disko/blob/d74db625a5cf3f46cf8fa545d6ef10bd3463ea07/lib/types/gpt.nix#L259
if ! blkid "${config.device}" >&2; then
sgdisk --clear "${config.device}"
fi
I can't tell if I found a bug or if I'm just not understanding this; blkid exits with code 2 when run on a blank (all 00) block device, in which case it... clears the gpt label? that isn't there? | 21:55:56 |
shelvacu | In reply to @pink_rocky:tchncs.de Okay, right now I’ve gotten it to error on the build with: "Unable to read fragment cache entry" "Unable to read page" "unknown filesystem type 'btrfs'" what exactly are you building? Do you mean nixos-rebuild build? Could send the full output in a pastebin or smth? | 22:03:21 |
shelvacu | In reply to @pink_rocky:tchncs.de configuration.nix Separately, I highly recommend switching to a flake-based config in a git repo. That would make it possible to link to a specific commit and then everyone else can run the exact same build. | 22:05:09 |
shelvacu | Also I strongly recommend not using /dev/sdb as the device; the ordering can change between boots and when you add/remove thumb drives. Instead look for your drive in /dev/disk/by-id/ | 22:06:24 |
shelvacu | also I can't build your config because it's missing hardware-configuration.nix | 22:09:11 |
| 6 Jun 2025 |
| @creepinson:matrix.org left the room. | 00:18:44 |
| francesco joined the room. | 07:06:03 |
rocky ((λ💝.💝)💐) (she/they; ask before DM please) | @shelvacu Thank you for the help! I will give you that info later | 07:35:28 |
francesco | Hey folks, quick question: I'm trying to setup a bind mount that points to a file system part of a disk managed by disko. I am unable to build the disk image because the order of operation is wrong:
- disks and filesystems created
- (a file-system irrelevant to this issue is mounted)
- bind mount tried, but source fs not mounted
- (I assume here it would mount the source fs)
Is there anything I can do to influence the order? I tried messing around with _meta.deviceDependencies but without much success.
| 11:59:29 |
shelvacu | you should be able to look at the script produced by disko and confirm #4 | 12:01:32 |
shelvacu | which would be good to check since its a very different issue if its mounted nowhere | 12:02:08 |
francesco | Thanks let me check that. | 12:03:07 |
francesco | My assumption was correct: the issue starts here: https://github.com/nix-community/disko/blob/17d08c65c241b1d65b3ddf79e3fac1ddc870b0f6/lib/default.nix#L970
Basically I have root (tmpfs), a writable partition at /system, and a bind mount /nix -> /system/nix. | 12:06:37 |
francesco | the mount order is currently:
- root
- /nix (bind)
- /system/nix
I guess a possible work-around would be to call system anything that is lexicographically before nix?
| 12:08:00 |
shelvacu | In reply to @francesco:zanini.me My assumption was correct: the issue starts here: https://github.com/nix-community/disko/blob/17d08c65c241b1d65b3ddf79e3fac1ddc870b0f6/lib/default.nix#L970
Basically I have root (tmpfs), a writable partition at /system, and a bind mount /nix -> /system/nix. im not super familiar with disko but it seems youve found proof that mount ordering simply isnt implemented (other than /a before /a/b because alphabetical) | 12:09:44 |
shelvacu | if its any help, once disko configures fileSystems.* in a nixos config it should all just work | 12:10:41 |
francesco | I'm wondering if it would make sense to implement fileSystem.<name>.depends also from within disko? By doing so, disko can use this information for ordering, as well as populate the entry in nixos. Alternatively, adapt disko to do something similar to what nixos does without extra config (figure out fs dependencies automatically, by looking at their mountpoints) | 12:12:52 |
shelvacu | that would be neat imo | 12:13:31 |
francesco | I just opened two PRs about the above:
- https://github.com/nix-community/disko/pull/1056
- https://github.com/nix-community/disko/pull/1057
| 15:42:53 |
| Fynn joined the room. | 16:32:16 |
Fynn | Hi! I'm currently trying to set up a machine with encrypted ZFS on root following the example:
https://github.com/nix-community/disko/blob/master/example/zfs-encrypted-root.nix
Now I am a bit confused on how I can set the encryption passphrase, since I am not prompted during the disko run. There is keylocation commented out in the file, can I use the for the nixos installer and switch to the prompt afterward? | 16:35:33 |
Fynn | Alright turns out it does prompt, but to encrypt the pool I have to use rootFsOptions instead of options :) | 16:49:47 |
| 7 Jun 2025 |
shelvacu | In reply to @fynn:thewatcherpi.de Alright turns out it does prompt, but to encrypt the pool I have to use rootFsOptions instead of options :) im surprised it doesn't error the other way around. it should tell you encryption is an invalid pool option, or similar | 04:20:47 |