From: Paul Hänsch Date: Thu, 16 Feb 2023 17:22:02 +0000 (+0100) Subject: additional config options X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d3a191eb58a1bacad15a428ebde992b8dd6766e6;p=blast additional config options --- diff --git a/debian-bookworm-desktop.mk b/debian-bookworm-desktop.mk index 4a0697e..c2bec23 100644 --- a/debian-bookworm-desktop.mk +++ b/debian-bookworm-desktop.mk @@ -2,6 +2,9 @@ subvol=/mnt/bookworm release=bookworm +mainuser=... +fsuid=... + define SOURCES := deb http://deb.debian.org/debian bullseye main deb http://deb.debian.org/debian ${release} main @@ -25,7 +28,7 @@ packages += minetest minetest-server minetest-mod-craftguide minetest-mod-ethere # packages += 0ad flare-game openarena ## Hostname for the generated machine -hostname=debian +hostname=${mainuser}-debian ## Root password will be salted and encrypted in image # rootpass=topsecret @@ -39,7 +42,8 @@ hostname=debian ## Comma separated list of users to be set up. ## User logins will start out with an empty password ## If the live module is in use, users will also be added to the sudo group -users=adam,steve +# users=adam,steve +users=${mainuser} ## Wifi configuration, if a Wifi password is given, WPA encryption will be used ## without the password, the system will try to connect to an open wifi @@ -61,3 +65,21 @@ keyboard=de ## can be choosen to install packages from ## See modules/approx.mk if you need more flexibility # approx=http://localhost:9000/debian + +CFGROOT = cfg_root/ + +.PHONY: _fstab _sudo +_target: _fstab _sudo + +_sudo: _config cfg_root + chroot cfg_root adduser ${mainuser} sudo + +_fstab: _config cfg_root + mkdir -p cfg_root/mnt/fsroot + printf '%s 0 0\n' \ + 'UUID=${fsuid} / btrfs auto,rw,subvol=bookworm' \ + 'UUID=${fsuid} /home btrfs auto,rw,subvol=home' \ + 'UUID=${fsuid} /mnt/fsroot btrfs auto,rw,nofail' \ + 'LABEL=SYSTEM /boot/efi vfat auto,ro,nofail' \ + 'LABEL=SWAP swap swap sw,nofail' \ + >cfg_root/etc/fstab