!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
19 May 2024
@matthewcroughan:defenestrate.itmatthewcroughan

usually the extraPostVM is used to compress the image. so not sure we would need to pass it in this case

11:42:16
@matthewcroughan:defenestrate.itmatthewcroughanJust a comment from lassulus, so what is the variable to get the disk image?11:42:26
@matthewcroughan:defenestrate.itmatthewcroughan I don't see an example of doing it, is it just $out?} 11:42:36
@matthewcroughan:defenestrate.itmatthewcroughan * I don't see an example of doing it, is it just $out? 11:42:37
@matthewcroughan:defenestrate.itmatthewcroughan ah right it's $out/*.raw isn't it? 11:43:22
@lassulus:lassul.uslassulusYes11:43:41
@matthewcroughan:defenestrate.itmatthewcroughan You wouldn't like to have a compressImage = true which just does this for the user on a per-disk basis/ 11:44:55
@matthewcroughan:defenestrate.itmatthewcroughan * You wouldn't like to have a compressImage = true which just does this for the user on a per-disk basis? 11:44:56
@matthewcroughan:defenestrate.itmatthewcroughanI suppose that wouldn't really be in line with rfc42.. making an option for everything is bad, but this is pure nix and not a "we should use the upstream configuration" problem11:45:29
@lassulus:lassul.uslassulusThere are so many different compressions11:45:49
@matthewcroughan:defenestrate.itmatthewcroughanyeah systemd-repart in nixpkgs has a string option for this11:46:00
@matthewcroughan:defenestrate.itmatthewcroughanhttps://github.com/NixOS/nixpkgs/blob/master/nixos/modules/image/repart.nix#L108-L12311:46:22
@matthewcroughan:defenestrate.itmatthewcroughanjust an enum for xz or zstd11:46:28
@lassulus:lassul.uslassulusBut a script option is more powerful11:46:51
@matthewcroughan:defenestrate.itmatthewcroughanWell yeah, I guess.. you're copying the mkDerivation pattern, but there are still tons of options you can set inside of mkDerivation, I'm constantly learning about them11:47:38
@matthewcroughan:defenestrate.itmatthewcroughanThough they're not set in the module system, they're just vars interpreted by the stdenv bash scripts, which may have been a mistake, hence why drv-parts exists11:48:13
@matthewcroughan:defenestrate.itmatthewcroughan the module option compressImage would just set up the extraPostVM. When you think about what people really want to do with a disk image builder, this is definitely nice to just have be there by default 11:49:44
@matthewcroughan:defenestrate.itmatthewcroughanAlthough I do agree it's difficult to decide what should and shouldn't be available, as this option might just annoy others11:50:08
@matthewcroughan:defenestrate.itmatthewcroughanIf disko remains simple and as a matter of policy does not add these helper options, then I can just make a flake based on disko that ties all of this up, like disko-utils 11:51:07
@matthewcroughan:defenestrate.itmatthewcroughan * If disko remains simple and as a matter of policy does not add these helper options, then I can just make a flake based on disko that ties all of the loose ends up, like disko-utils 11:51:20
@matthewcroughan:defenestrate.itmatthewcroughanhttps://sourcegraph.com/search?q=context:global+lang:Nix+extraPostVM&patternType=keyword&sm=011:58:56
@matthewcroughan:defenestrate.itmatthewcroughanDamn, no examples on the internet :D11:59:00
@lassulus:lassul.uslassulusI guess keeping things simple would be better11:59:08
@matthewcroughan:defenestrate.itmatthewcroughan Since I'm not importing the make-disk-image function directly, I'm just setting disko options in my config, I am not able to specify extraPostVM right? 11:59:32
@lassulus:lassul.uslassulusUh hmm11:59:58
@lassulus:lassul.uslassulusProbably not12:00:03
@lassulus:lassul.uslassulusMaybe add an option for that12:00:12
@matthewcroughan:defenestrate.itmatthewcroughanAnd that'll be a toplevel one right? 12:01:46
@matthewcroughan:defenestrate.itmatthewcroughan nixosConfig.config.disko.extraPostVM ? 12:02:03
@matthewcroughan:defenestrate.itmatthewcroughanhttps://github.com/nix-community/disko/pull/64012:12:22

Show newer messages


Back to Room ListRoom Version: 10