!oNSIfazDqEcwhcOjSL:matrix.org

disko

367 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko94 Servers

Load older messages


SenderMessageTime
11 Feb 2024
@matthewcroughan:defenestrate.itmatthewcroughansomething like this, for example14:24:09
@matthewcroughan:defenestrate.itmatthewcroughanthis is unrelated to Disko, but it's similar in the concept14:24:22
@matthewcroughan:defenestrate.itmatthewcroughan * 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 mounts14:24:34
@matthewcroughan:defenestrate.itmatthewcroughanTL;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 down14:25:10
@matthewcroughan:defenestrate.itmatthewcroughan * 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 down14:25:17
@matthewcroughan:defenestrate.itmatthewcroughan In my example it's nix run .#secretImage which would do all of that 14:26:31
@matthewcroughan:defenestrate.itmatthewcroughan * 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:eyjhb.dkeyJhb
* --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:eyjhb.dkeyJhbIt's actually possible and "really" easy with nixos-anywhere it seems.18:53:21
12 Feb 2024
@adam:robins.wtf@adam:robins.wtfhas 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 partitions14:09:57
13 Feb 2024
@lillecarl:matrix.orglillecarl

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:maralorn.demaralornAre there by now examples for a disko + impermanence setup with bcachefs?00:52:20
@lillecarl:matrix.orglillecarl 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@adam:robins.wtf but it does manage disks and partition them… 01:09:42
@adam:robins.wtf@adam:robins.wtf Literally you give disko a set of disks to manage  01:11:31
@lillecarl:matrix.orglillecarl adamcstephens 🐝: It doesn't change your existing layout, it writes a new one 01:11:37
@adam:robins.wtf@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:matrix.orglillecarlI guess it's time to go implement the state machine to handle transforming your layout, brb 1 year?01:14:53
@lillecarl:matrix.orglillecarl * 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@adam:robins.wtfthat seems a bit extreme and unnecessary for what i'm suggesting01:18:01
@lassulus:lassul.uslassulushttps://github.com/nix-community/disko/pull/43501:18:52
@lassulus:lassul.uslassulus
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:matrix.orglillecarl 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@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@adam:robins.wtfmeaning, generated and added to your configuration. but as a way to bootstrap an existing host where you don't want to wipe the entire table01:23:09
@adam:robins.wtf@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 table01:23:17
@lillecarl:matrix.orglillecarl adamcstephens 🐝: There's --dry-run for comparing too 01:26:21
@lassulus:lassul.uslassulus
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:matrix.orglillecarl
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:matrix.orglillecarl
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

Show newer messages


Back to Room ListRoom Version: 10