Skip to content

Commit

Permalink
Merge pull request #640 from MatthewCroughan/mc/extraPostVM-nixosConfig
Browse files Browse the repository at this point in the history
make-disk-image: make extraPostVM configurable from module.nix
  • Loading branch information
Lassulus authored May 19, 2024
2 parents 5f6dbcc + 4444751 commit 601be84
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down

0 comments on commit 601be84

Please sign in to comment.