Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions disko-install
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ parseArgs() {
extraSystemConfig="$2"
shift
;;
--disko-system-config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be part of usage with some explanation, since it's not obvious what it's useful for.

if [[ $# -lt 2 ]]; then
echo "Option $1 requires one JSON argument." >&2
exit 1
fi
# shellcheck disable=SC2034
extraDiskoSystemConfig="$2"
shift
;;
--extra-files)
if [[ $# -lt 3 ]]; then
echo "Option $1 requires two arguments: source, destination" >&2
Expand Down
4 changes: 4 additions & 0 deletions install-cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, flakeAttr
, diskMappings
, extraSystemConfig ? "{}"
, extraDiskoSystemConfig ? "{}"
, writeEfiBootEntries ? false
, rootMountPoint ? "/mnt"
,
Expand Down Expand Up @@ -41,6 +42,9 @@ let
{
disko.rootMountPoint = rootMountPoint;
disko.devices.disk = lib.mkVMOverride cleanedDisks;
imports = [
({ _file = "disko-install --system-config"; } // (builtins.fromJSON extraDiskoSystemConfig))
];
}
];
};
Expand Down