Skip to content

Commit

Permalink
add pkgs.parted where partprobe is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lassulus authored and mergify[bot] committed Sep 12, 2023
1 parent 7304727 commit 79785c1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ let
bash
coreutils
gnused
parted # for partprobe
systemdMinimal
nix
utillinux
util-linux
];
preVM = ''
${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}
Expand Down
6 changes: 5 additions & 1 deletion lib/types/gpt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ in
readOnly = true;
type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs:
[ pkgs.gptfdisk pkgs.systemdMinimal ] ++ lib.flatten (map
[
pkgs.gptfdisk
pkgs.systemdMinimal
pkgs.parted # for partprobe
] ++ lib.flatten (map
(partition:
lib.optional (partition.content != null) (partition.content._pkgs pkgs)
)
Expand Down
4 changes: 3 additions & 1 deletion lib/types/mdadm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
internal = true;
readOnly = true;
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";
};
};
Expand Down
5 changes: 4 additions & 1 deletion lib/types/zfs_volume.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
internal = true;
readOnly = true;
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";
};
};
Expand Down

0 comments on commit 79785c1

Please sign in to comment.