diff --git a/disko-install b/disko-install index 2c5596ef..89882d6a 100755 --- a/disko-install +++ b/disko-install @@ -110,6 +110,15 @@ parseArgs() { extraSystemConfig="$2" shift ;; + --disko-system-config) + 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 diff --git a/install-cli.nix b/install-cli.nix index 955670f7..b4d71885 100644 --- a/install-cli.nix +++ b/install-cli.nix @@ -2,6 +2,7 @@ , flakeAttr , diskMappings , extraSystemConfig ? "{}" +, extraDiskoSystemConfig ? "{}" , writeEfiBootEntries ? false , rootMountPoint ? "/mnt" , @@ -41,6 +42,9 @@ let { disko.rootMountPoint = rootMountPoint; disko.devices.disk = lib.mkVMOverride cleanedDisks; + imports = [ + ({ _file = "disko-install --system-config"; } // (builtins.fromJSON extraDiskoSystemConfig)) + ]; } ]; };