| 11 Feb 2024 |
matthewcroughan | something like this, for example | 14:24:09 |
matthewcroughan | this is unrelated to Disko, but it's similar in the concept | 14:24:22 |
matthewcroughan | * I have an implementation of this which is really simple, and almost equivalent, which just uses a VM to add secrets to an existing disk image by using loopback mounts | 14:24:34 |
matthewcroughan | TL;DR you make the installer/disk image you're going to boot, stateless in the Nix store, then you make a shell script which boots a VM, mounts this image as a loopback, adds the secret in the dir of your choosing, then shuts down | 14:25:10 |
matthewcroughan | * TL;DR you make the installer/disk image you're going to boot, stateless in the Nix store, then you make a shell script which boots a VM, mounts this disk image as a loopback, adds the secret in the dir of your choosing, then shuts down | 14:25:17 |
matthewcroughan | In my example it's nix run .#secretImage which would do all of that | 14:26:31 |
matthewcroughan | * In my example it's nix run .#secretImage which would do all of that and produce a tarball that isn't in the /nix/store, which contains this secret | 14:26:40 |
eyJhb | * --extra-files <file...>
files to copy into the new nixos installation
* --disk-encryption-keys <remote_path> <local_path>
copy the contents of the file or pipe in local_path to remote_path in the installer environment,
after kexec but before installation. Can be repeated.
| 18:53:07 |
eyJhb | It's actually possible and "really" easy with nixos-anywhere it seems. | 18:53:21 |
| 12 Feb 2024 |
@adam:robins.wtf | has anyone explored allowing for disko to only manage part of a disk? i'm thinking of a dual boot windows system and it would be nice to apply disko for the nixos bits while allowing for explicitly avoiding other partitions | 14:09:57 |
| 13 Feb 2024 |
lillecarl | Has anyone else experienced the issue where your md device appears as /dev/md127 rather than anything useful?
hostname: nixos kernel: 6.7.4
+ mdadm --create /dev/md/data1 --level=1 --raid-devices=2 --metadata=default --force --homehost=any /dev/disk/by-partlabel/disk-a-data /dev/disk/by-partlabel/disk-b-data
mdadm: array /dev/md/data1 started.
mdadm: timeout waiting for /dev/md/data1
+ partprobe /dev/md/data1
The device is created as /dev/md127 instead (no md folder in /dev). It says the name is "any:data1" but it doesn't exist there.
| 00:51:53 |
maralorn | Are there by now examples for a disko + impermanence setup with bcachefs? | 00:52:20 |
lillecarl | adamcstephens 🐝: You won't find any success there really, disko isn't meant to manage your disks, it's meant to get your partitions right while also outputting nixos module config. | 00:53:50 |
@adam:robins.wtf | but it does manage disks and partition them… | 01:09:42 |
@adam:robins.wtf | Literally you give disko a set of disks to manage | 01:11:31 |
lillecarl | adamcstephens 🐝: It doesn't change your existing layout, it writes a new one | 01:11:37 |
@adam:robins.wtf | And in theory it could be told not to destroy the entire table. There are still other benefits to using disko such as formatting and multiple volumes | 01:13:43 |
lillecarl | I guess it's time to go implement the state machine to handle transforming your layout, brb 1 year? | 01:14:53 |
lillecarl | * I guess it's time to go implement the state machine to handle transforming every layout from one to another, brb 1 year? | 01:15:23 |
@adam:robins.wtf | that seems a bit extreme and unnecessary for what i'm suggesting | 01:18:01 |
lassulus | https://github.com/nix-community/disko/pull/435 | 01:18:52 |
lassulus | In reply to @lillecarl:matrix.org
Has anyone else experienced the issue where your md device appears as /dev/md127 rather than anything useful?
hostname: nixos kernel: 6.7.4
+ mdadm --create /dev/md/data1 --level=1 --raid-devices=2 --metadata=default --force --homehost=any /dev/disk/by-partlabel/disk-a-data /dev/disk/by-partlabel/disk-b-data
mdadm: array /dev/md/data1 started.
mdadm: timeout waiting for /dev/md/data1
+ partprobe /dev/md/data1
The device is created as /dev/md127 instead (no md folder in /dev). It says the name is "any:data1" but it doesn't exist there.
In that case a udev rule is missing. Is this happening on nixos? Maybe the live cd? | 01:19:56 |
lillecarl | lassulus: Yeah a very very barebones NixOS. I installed it on a third disk to be able to test the config easily before deploying to OVH. | 01:21:32 |
@adam:robins.wtf | In reply to @lassulus:lassul.us https://github.com/nix-community/disko/pull/435 Yeah, this in-place updating probably could do what I am looking for. Maybe paired with a script which would generate an initial disk configuration based on what's already in the table | 01:22:11 |
@adam:robins.wtf | meaning, generated and added to your configuration. but as a way to bootstrap an existing host where you don't want to wipe the entire table | 01:23:09 |
@adam:robins.wtf | * meaning, generated and added to your configuration. as a way to bootstrap an existing host where you don't want to wipe the entire table | 01:23:17 |
lillecarl | adamcstephens 🐝: There's --dry-run for comparing too | 01:26:21 |
lassulus | In reply to @lillecarl:matrix.org lassulus: Yeah a very very barebones NixOS. I installed it on a third disk to be able to test the config easily before deploying to OVH. do you have boot.swraid.enable? | 01:28:18 |
lillecarl | In reply to @lassulus:lassul.us do you have boot.swraid.enable? Not in the configuration no, I found some udev rules in mdadm. Trying to just add it to systemPackages right now. | 01:29:04 |
lillecarl | In reply to @lassulus:lassul.us do you have boot.swraid.enable? * Not in the "host" no, I found some udev rules in mdadm. Trying to just add it to systemPackages right now. | 01:29:15 |