diff --git a/machine-confs/generic.nix b/machine-confs/generic.nix index 56a4df9..0ecb2dc 100644 --- a/machine-confs/generic.nix +++ b/machine-confs/generic.nix @@ -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; } diff --git a/misc/custom-iso-base.nix b/misc/custom-iso-base.nix index 9b7f03c..2114d60 100644 --- a/misc/custom-iso-base.nix +++ b/misc/custom-iso-base.nix @@ -21,13 +21,14 @@ let echo if [[ $REPLY =~ ^[Yy]$ ]] then - cryptsetup luksFormat $1 - cryptsetup open $1 nixos - - echo "Encrypted device accessible via /dev/mapper/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 " @@ -57,7 +58,7 @@ in environment.systemPackages = [ pkgs.cryptsetup create-partitions - make-filesystems + create-filesystems prep-install ];