UNPKG

penguins-eggs

Version:

A remaster system tool, compatible with Almalinux, Alpine, Arch, Debian, Devuan, Fedora, Manjaro, Opensuse, Ubuntu and derivatives

83 lines (82 loc) 2.93 kB
/** * ./src/classes/incubation/distros/arch.ts * penguins-eggs v.25.7.x / ecmascript 2020 * author: Piero Proietti * email: piero.proietti@gmail.com * license: MIT */ import CFS from '../../../krill/classes/cfs.js'; import Fisherman from '../fisherman.js'; /** * */ export class Archlinux { distro; installer = {}; isClone = false; release = false; remix; theme; user_opt; verbose = false; /** * @param remix * @param distro * @param displaymanager * @param verbose */ constructor(installer, remix, distro, user_opt, release = false, theme = 'eggs', isClone = false, verbose = false) { this.installer = installer; this.remix = remix; this.distro = distro; this.user_opt = user_opt; this.verbose = verbose; this.release = release; this.theme = theme; this.isClone = isClone; } /** * locale, partitions, users can come from themes */ async create() { const fisherman = new Fisherman(this.distro, this.installer, this.verbose); await fisherman.createCalamaresSettings(this.theme, this.isClone); await fisherman.buildModule('welcome'); await fisherman.buildModule('partition', this.theme); await fisherman.buildModule('mount'); await fisherman.buildModuleUnpackfs(); await fisherman.buildModule('machineid'); await fisherman.buildModule('networkcfg'); await fisherman.buildModule('locale', this.theme); await fisherman.buildModule('keyboard'); await fisherman.buildModule('localecfg', this.theme); await fisherman.buildModule('luksbootkeyfile'); await fisherman.buildModule('luksopenswaphookcfg'); await fisherman.buildModule('fstab'); await fisherman.shellprocess('prepare-chroot'); await fisherman.buildModule('initcpiocfg'); await fisherman.buildModuleInitcpio(); await fisherman.buildModule('users', this.theme); await fisherman.buildModule('displaymanager'); await fisherman.buildModule('hwclock'); await fisherman.shellprocess('disable-grub-btrfs'); await fisherman.buildModule('grubcfg'); await fisherman.buildModule('bootloader'); await fisherman.buildModulePackages(this.distro, this.release); await fisherman.buildModule('luksbootkeyfile'); await fisherman.buildModule('plymouthcfg'); await fisherman.buildModuleRemoveuser(this.user_opt); /** * cfs: custom final steps */ const cfs = new CFS(); const steps = await cfs.steps(); if (steps.length > 0) { for (const step of steps) { await fisherman.buildCalamaresModule(step, true, this.theme); } } await fisherman.buildModule('umount'); await fisherman.buildModuleFinished(); } }