!oNSIfazDqEcwhcOjSL:matrix.org

disko

368 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko92 Servers

Load older messages


SenderMessageTime
12 Dec 2023
@matthewcroughan:defenestrate.itmatthewcroughanI will continue the PR that went stale in march, are there any major differences between it and the current disko?23:32:53
13 Dec 2023
@matthewcroughan:defenestrate.itmatthewcroughan

lassulus: working on https://github.com/nix-community/disko/pull/168

I see that the major difference is the lists vs attrsets of partitions. Is this the major difference between types now, or is there other differences I need to be aware of whilst refactoring this?

15:28:05
@matthewcroughan:defenestrate.itmatthewcroughan

I.e lib/types/gpt.nix contains:

type = lib.types.attrsOf (lib.types.submodule ({ name, ... }@partition: {

Whereas this outdated PR contains:

type = lib.types.listOf subTypes.hybrid_partition;

15:28:58
@lassulus:lassul.uslassulusyeah don't use lists15:29:50
@matthewcroughan:defenestrate.itmatthewcroughanBut if I change the signature of this type, is this likely the only big thing to change?15:30:07
@matthewcroughan:defenestrate.itmatthewcroughanOr do you know of more changes that I'll run into and the context of them?15:30:18
@lassulus:lassul.uslassulusprobably you need to get rid of the partitionnumbering in nix15:31:52
@lassulus:lassul.uslassulusand do it with partlabels, or something similiar15:32:00
@lassulus:lassul.uslassulusto make it portable between different formats15:32:10
@lassulus:lassul.uslassulusbut maybe thats not soo important for your usecase15:32:20
@matthewcroughan:defenestrate.itmatthewcroughan lassulus: https://github.com/nix-community/disko/blob/master/lib/types/gpt.nix#L79 16:08:45
@matthewcroughan:defenestrate.itmatthewcroughanis this a bug/mistake?16:08:49
@matthewcroughan:defenestrate.itmatthewcroughan partitions defaults to [] rather than {} 16:09:00
@lassulus:lassul.uslassulusprobably dead code16:09:32
@lassulus:lassul.uslassulusbut yeah, should be {}16:09:42
@matthewcroughan:defenestrate.itmatthewcroughaninteresting that there are defaults that don't matter, and don't cause errors16:09:44
@matthewcroughan:defenestrate.itmatthewcroughandidn't know that could happen with tests + module system16:09:52
@lassulus:lassul.uslassuluswell nobody defined an empty table yet16:09:56
@matthewcroughan:defenestrate.itmatthewcroughanso there should be a test with emptiness?16:10:06
@lassulus:lassul.uslassuluscould, not sure if it's useful16:10:16
@matthewcroughan:defenestrate.itmatthewcroughan a language server like nil would use the default to present the default to the user, maybe 16:10:41
@matthewcroughan:defenestrate.itmatthewcroughantiny amount of usefulness16:10:46
@lassulus:lassul.uslassulusbut yeah, you can PR the change16:10:57
@lassulus:lassul.uslassulusmaybe add an emtoy table in the complext test16:11:16
@matthewcroughan:defenestrate.itmatthewcroughan Yeah just sifting through the gpt.nix to try to refactor the hybrid stuff 16:11:17
@matthewcroughan:defenestrate.itmatthewcroughanComparing the two 16:11:34
@lassulus:lassul.uslassulusI think that maybe a new type gpt_hybrid.nix which is basically gpt.nix but extended would be best16:11:53
@lassulus:lassul.uslassulusor maybe add an hybrid flag on the partitions and just run the hybrid code then16:12:20
@matthewcroughan:defenestrate.itmatthewcroughanrequires different formatting 16:14:42
@matthewcroughan:defenestrate.itmatthewcroughanit's a mindfsck16:14:46

Show newer messages


Back to Room ListRoom Version: 10