mirror of
https://github.com/nix-community/disko.git
synced 2024-09-19 02:27:27 +03:00
make-disk-image: make extraPostVM configurable from module.nix
This commit is contained in:
parent
5f6dbcce99
commit
4444751300
@ -3,7 +3,7 @@
|
|||||||
, pkgs ? nixosConfig.pkgs
|
, pkgs ? nixosConfig.pkgs
|
||||||
, lib ? pkgs.lib
|
, lib ? pkgs.lib
|
||||||
, name ? "${nixosConfig.config.networking.hostName}-disko-images"
|
, name ? "${nixosConfig.config.networking.hostName}-disko-images"
|
||||||
, extraPostVM ? ""
|
, extraPostVM ? nixosConfig.config.disko.extraPostVM
|
||||||
, checked ? false
|
, checked ? false
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
11
module.nix
11
module.nix
@ -17,6 +17,17 @@ in
|
|||||||
'';
|
'';
|
||||||
default = [ ];
|
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 {
|
memSize = lib.mkOption {
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
description = ''
|
description = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user