custom kernel
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-04-15 00:16:53 +02:00
parent 84dad2bcaa
commit 8382174219
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 10 additions and 2 deletions

View file

@ -57,6 +57,9 @@ pkg = [
"micro"
]
# Custom kernel
kernel = "linux-lts"
# Enable virtualization
virtualization = true

View file

@ -59,6 +59,8 @@ pub struct PackageConfig {
pub virtualization: Option<bool>,
/// Enable docker
pub docker: Option<bool>,
/// Custom kernel package
pub kernel: Option<String>,
}
#[derive(Debug, Clone, Deserialize)]

View file

@ -48,9 +48,7 @@ pub fn pacstrap(conf: &PackageConfig) {
"-K",
"/mnt",
"base",
"linux",
"linux-firmware",
"linux-headers",
"git",
"networkmanager",
"nano",
@ -61,6 +59,11 @@ pub fn pacstrap(conf: &PackageConfig) {
"plymouth",
];
let linux_kernel = "linux".to_string();
let kernel = conf.kernel.as_ref().unwrap_or(&linux_kernel);
let headers = format!("{kernel}-headers");
cmd.extend(&[kernel.as_str(), headers.as_str()]);
#[cfg(target_arch = "aarch64")]
{
cmd.extend(&["archlinuxarm-keyring"]);