Merge pull request #640 from MatthewCroughan/mc/extraPostVM-nixosConfig

make-disk-image: make extraPostVM configurable from module.nix
This commit is contained in:
lassulus 2024-05-19 15:52:33 +02:00 committed by GitHub
commit 601be8412d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -3,7 +3,7 @@
, pkgs ? nixosConfig.pkgs
, lib ? pkgs.lib
, name ? "${nixosConfig.config.networking.hostName}-disko-images"
, extraPostVM ? ""
, extraPostVM ? nixosConfig.config.disko.extraPostVM
, checked ? false
}:
let

View file

@ -17,6 +17,17 @@ in
'';
default = [ ];
};
extraPostVM = lib.mkOption {
type = lib.types.str;
description = ''
extra shell code to execute once the disk image(s) have been succesfully created and moved to $out
'';
default = "";
example = pkgs.literalExpression ''
''${pkgs.zstd}/bin/zstd --compress $out/*raw
rm $out/*raw
'';
};
memSize = lib.mkOption {
type = lib.types.int;
description = ''