Improve custom ISO experience
This commit is contained in:
parent
d05be2e0af
commit
7d8a741b9e
2 changed files with 10 additions and 6 deletions
|
@ -9,4 +9,7 @@
|
||||||
|
|
||||||
#Many installs will need this, and it won't hurt either way
|
#Many installs will need this, and it won't hurt either way
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
|
||||||
|
#Prevent user from being locked out of the system before switching to proper config
|
||||||
|
users.mutableUsers = pkgs.lib.mkForce true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,14 @@ let
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
cryptsetup luksFormat $1
|
cryptsetup luksFormat $1$3
|
||||||
cryptsetup open $1 nixos
|
if cryptsetup open $1$3 nixos
|
||||||
|
then
|
||||||
echo "Encrypted device accessible via /dev/mapper/nixos"
|
echo "Encrypted device accessible via /dev/mapper/nixos"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
make-filesystems = pkgs.writeScriptBin "make-filesystems" ''
|
create-filesystems = pkgs.writeScriptBin "create-filesystems" ''
|
||||||
if [[ $# -ne 2 ]]
|
if [[ $# -ne 2 ]]
|
||||||
then
|
then
|
||||||
echo "Usage: make-filesystems <BOOT partition> <root partition>"
|
echo "Usage: make-filesystems <BOOT partition> <root partition>"
|
||||||
|
@ -57,7 +58,7 @@ in
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.cryptsetup
|
pkgs.cryptsetup
|
||||||
create-partitions
|
create-partitions
|
||||||
make-filesystems
|
create-filesystems
|
||||||
prep-install
|
prep-install
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue