Improve custom ISO experience

This commit is contained in:
Vili Sinervä 2024-08-28 13:18:09 +03:00
parent d05be2e0af
commit 7d8a741b9e
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996
2 changed files with 10 additions and 6 deletions

View file

@ -9,4 +9,7 @@
#Many installs will need this, and it won't hurt either way
services.qemuGuest.enable = true;
#Prevent user from being locked out of the system before switching to proper config
users.mutableUsers = pkgs.lib.mkForce true;
}

View file

@ -21,13 +21,14 @@ let
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
cryptsetup luksFormat $1
cryptsetup open $1 nixos
cryptsetup luksFormat $1$3
if cryptsetup open $1$3 nixos
then
echo "Encrypted device accessible via /dev/mapper/nixos"
fi
fi
'';
make-filesystems = pkgs.writeScriptBin "make-filesystems" ''
create-filesystems = pkgs.writeScriptBin "create-filesystems" ''
if [[ $# -ne 2 ]]
then
echo "Usage: make-filesystems <BOOT partition> <root partition>"
@ -57,7 +58,7 @@ in
environment.systemPackages = [
pkgs.cryptsetup
create-partitions
make-filesystems
create-filesystems
prep-install
];