Rename the grub menu of ISO image

This commit is contained in:
Qingsong Chen 2025-12-12 08:53:04 +00:00 committed by Tate, Hongliang Tian
parent 1b0afa63c2
commit 8b219c077e
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
{ pkgs ? import <nixpkgs> { }, autoInstall ? false, test-command ? ""
, extra-substituters ? "", extra-trusted-public-keys ? "", ... }:
, extra-substituters ? "", extra-trusted-public-keys ? "", version ? "", ... }:
let
installer = pkgs.callPackage ../aster_nixos_installer {
inherit test-command extra-substituters extra-trusted-public-keys;
@ -10,6 +10,10 @@ let
"${pkgs.path}/nixos/modules/installer/cd-dvd/channel.nix"
];
system.nixos.distroName = "Asterinas NixOS";
system.nixos.label = "${version}";
isoImage.appendToMenuLabel = " Installer";
services.getty.autologinUser = pkgs.lib.mkForce "root";
environment.systemPackages = [ installer ];
environment.loginShellInit = ''

View File

@ -8,6 +8,7 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
ASTERINAS_DIR=$(realpath ${SCRIPT_DIR}/../..)
DISTRO_DIR=$(realpath ${ASTERINAS_DIR}/distro)
TARGET_DIR=${ASTERINAS_DIR}/target/nixos
VERSION=$(cat ${ASTERINAS_DIR}/VERSION)
mkdir -p ${TARGET_DIR}
@ -16,4 +17,5 @@ nix-build ${DISTRO_DIR}/iso_image \
--argstr test-command "${NIXOS_TEST_COMMAND}" \
--argstr extra-substituters "${RELEASE_SUBSTITUTER} ${DEV_SUBSTITUTER}" \
--argstr extra-trusted-public-keys "${RELEASE_TRUSTED_PUBLIC_KEY} ${DEV_TRUSTED_PUBLIC_KEY}" \
--argstr version ${VERSION} \
--out-link ${TARGET_DIR}/iso_image