remove plymouth ask for password and instead just hide splash
This commit is contained in:
parent
0dcbf3b711
commit
ab4f87de72
|
@ -194,11 +194,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714736743,
|
"lastModified": 1714825428,
|
||||||
"narHash": "sha256-DPXEeLRIHazWyMYVXmhvJlfSAV0aF9nc9y6k4vthx8U=",
|
"narHash": "sha256-6U4cppyR0u6sqSSVr3GMrnIXhP2YGR0knfgrUGtr/1Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "5f91bfaba4e2a2a2fdcce3b711b76b9aed14cbde",
|
"rev": "5847f3365c16afafc10c56994beadd4cdc8552ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -52,6 +52,12 @@ in {
|
||||||
mkdir -m 0755 -p /keys
|
mkdir -m 0755 -p /keys
|
||||||
mkdir -m 0755 -p ${encryptedUSB.mountpoint}
|
mkdir -m 0755 -p ${encryptedUSB.mountpoint}
|
||||||
|
|
||||||
|
${
|
||||||
|
if config.boot.plymouth.enable
|
||||||
|
then "${pkgs.plymouth}/bin/plymouth hide-splash"
|
||||||
|
else ""
|
||||||
|
}
|
||||||
|
|
||||||
${
|
${
|
||||||
if cfg.allowPasswordDecrypt
|
if cfg.allowPasswordDecrypt
|
||||||
then ''
|
then ''
|
||||||
|
@ -68,45 +74,17 @@ in {
|
||||||
|
|
||||||
while !(test -b ${encryptedUSB.encryptedPath}) && [ "$USE_PASSWORD_FALLBACK" == "false" ]
|
while !(test -b ${encryptedUSB.encryptedPath}) && [ "$USE_PASSWORD_FALLBACK" == "false" ]
|
||||||
do
|
do
|
||||||
${
|
echo "Please Plug In USB"
|
||||||
if config.boot.plymouth.enable
|
|
||||||
then ''
|
|
||||||
${pkgs.plymouth}/bin/plymouth display-message --text="Please Plug In USB"
|
|
||||||
''
|
|
||||||
else ''
|
|
||||||
echo "Please Plug In USB"
|
|
||||||
''
|
|
||||||
}
|
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
${
|
if [ "$USE_PASSWORD_FALLBACK" == "true" ]; then
|
||||||
if config.boot.plymouth.enable
|
echo "Please Decrypt Drive"
|
||||||
then ''
|
cryptsetup open ${driveData.encryptedPath} ${driveData.mapperName}
|
||||||
${pkgs.plymouth}/bin/plymouth hide-message --text="Please Plug In USB"
|
else
|
||||||
|
echo "Please Decrypt USB"
|
||||||
if [ "$USE_PASSWORD_FALLBACK" == "true" ]; then
|
cryptsetup open ${encryptedUSB.encryptedPath} ${encryptedUSB.preBootMapperName}
|
||||||
${pkgs.plymouth}/bin/plymouth ask-for-password \
|
fi
|
||||||
--prompt="Please Enter Password" \
|
|
||||||
--command="cryptsetup -T1 open ${driveData.encryptedPath} ${driveData.mapperName}" \
|
|
||||||
--number-of-tries=3
|
|
||||||
else
|
|
||||||
${pkgs.plymouth}/bin/plymouth ask-for-password \
|
|
||||||
--prompt="Please Decrypt USB" \
|
|
||||||
--command="cryptsetup -T1 open ${encryptedUSB.encryptedPath} ${encryptedUSB.preBootMapperName}" \
|
|
||||||
--number-of-tries=3
|
|
||||||
fi
|
|
||||||
''
|
|
||||||
else ''
|
|
||||||
if [ "$USE_PASSWORD_FALLBACK" == "true" ]; then
|
|
||||||
echo "Please Decrypt Drive"
|
|
||||||
cryptsetup open ${driveData.encryptedPath} ${driveData.mapperName}
|
|
||||||
else
|
|
||||||
echo "Please Decrypt USB"
|
|
||||||
cryptsetup open ${encryptedUSB.encryptedPath} ${encryptedUSB.preBootMapperName}
|
|
||||||
fi
|
|
||||||
''
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$USE_PASSWORD_FALLBACK" == "false" ]; then
|
if [ "$USE_PASSWORD_FALLBACK" == "false" ]; then
|
||||||
mount -n -t ${encryptedUSB.unencryptedFSType} -o ro ${encryptedUSB.preBootMapperPath} ${encryptedUSB.mountpoint}
|
mount -n -t ${encryptedUSB.unencryptedFSType} -o ro ${encryptedUSB.preBootMapperPath} ${encryptedUSB.mountpoint}
|
||||||
|
@ -119,6 +97,12 @@ in {
|
||||||
else
|
else
|
||||||
touch /keys/${config.networking.hostName}.key
|
touch /keys/${config.networking.hostName}.key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
${
|
||||||
|
if config.boot.plymouth.enable
|
||||||
|
then "${pkgs.plymouth}/bin/plymouth show-splash"
|
||||||
|
else ""
|
||||||
|
}
|
||||||
'');
|
'');
|
||||||
initrd.luks.devices = {
|
initrd.luks.devices = {
|
||||||
"${driveData.mapperName}" = {
|
"${driveData.mapperName}" = {
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
profiles.mullvad
|
profiles.mullvad
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.plymouth.enable = true;
|
|
||||||
|
|
||||||
home-manager.users.chaos = {
|
home-manager.users.chaos = {
|
||||||
imports = with tree; [
|
imports = with tree; [
|
||||||
home.gui.base
|
home.gui.base
|
||||||
|
|
Loading…
Reference in a new issue