From fbcb58a26bd52d891cf91f5f5eceb97559701326 Mon Sep 17 00:00:00 2001 From: Tristan Date: Tue, 1 Oct 2024 16:45:08 +0100 Subject: [PATCH] nixbook: remove decryption script, quiet boot --- hardware/fcs-tristan-nixbook.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index 2d6d179..17d970e 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -23,14 +23,17 @@ in { options = ["subvol=@" "compress=zstd" "autodefrag"]; }; - boot.initrd.postDeviceCommands = pkgs.lib.mkBefore (decrypt { - keydevice = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; - keypartname = "usbkey"; - }); + boot.initrd.luks.devices."usbkey" = { + device = "/dev/disk/by-id/usb-Generic_Flash_Disk_BCC97785-0:0"; + }; boot.initrd.luks.devices."cryptroot" = { device = "/dev/disk/by-uuid/570cc51f-bd5c-4bee-a18f-f6aabaf60881"; keyFileSize = 4096; + preOpenCommands = '' + mkdir -m 0755 -p /key + mount -n -t vfat -o ro /dev/mapper/usbkey /key + ''; keyFile = "/key/keyfile"; preLVM = false; }; @@ -54,6 +57,11 @@ in { swapDevices = [{device = "/swap/swapfile";}]; + boot.plymouth.enable = true; + boot.initrd.verbose = false; + boot.consoleLogLevel = 1; + boot.kernelParams = [ "quiet" "udev.log_level=3" ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction