add pkgs.parted where partprobe is needed

This commit is contained in:
lassulus 2023-09-12 11:31:25 +02:00 committed by mergify[bot]
parent 7304727801
commit 79785c1cfc
4 changed files with 14 additions and 4 deletions

View File

@ -18,9 +18,10 @@ let
bash bash
coreutils coreutils
gnused gnused
parted # for partprobe
systemdMinimal systemdMinimal
nix nix
utillinux util-linux
]; ];
preVM = '' preVM = ''
${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)} ${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}

View File

@ -146,7 +146,11 @@ in
readOnly = true; readOnly = true;
type = lib.types.functionTo (lib.types.listOf lib.types.package); type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: default = pkgs:
[ pkgs.gptfdisk pkgs.systemdMinimal ] ++ lib.flatten (map [
pkgs.gptfdisk
pkgs.systemdMinimal
pkgs.parted # for partprobe
] ++ lib.flatten (map
(partition: (partition:
lib.optional (partition.content != null) (partition.content._pkgs pkgs) lib.optional (partition.content != null) (partition.content._pkgs pkgs)
) )

View File

@ -74,7 +74,9 @@
internal = true; internal = true;
readOnly = true; readOnly = true;
type = lib.types.functionTo (lib.types.listOf lib.types.package); type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: (lib.optionals (config.content != null) (config.content._pkgs pkgs)); default = pkgs: [
pkgs.parted # for partprobe
] ++ (lib.optionals (config.content != null) (config.content._pkgs pkgs));
description = "Packages"; description = "Packages";
}; };
}; };

View File

@ -72,7 +72,10 @@
internal = true; internal = true;
readOnly = true; readOnly = true;
type = lib.types.functionTo (lib.types.listOf lib.types.package); type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: [ pkgs.util-linux ] ++ lib.optionals (config.content != null) (config.content._pkgs pkgs); default = pkgs: [
pkgs.util-linux
pkgs.parted # for partprobe
] ++ lib.optionals (config.content != null) (config.content._pkgs pkgs);
description = "Packages"; description = "Packages";
}; };
}; };