Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [hoodoo@T480:~/wtfflake]$ cat modules/host/laptop-luks.nix
- { config, pkgs, ... }:
- {
- # boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.loader.efi.efiSysMountPoint = "/boot/efi";
- boot.loader.grub = {
- enable = true;
- device = "nodev";
- version = 2;
- efiSupport = true;
- enableCryptodisk = true;
- };
- boot.initrd = {
- luks.devices."root" = {
- device = "/dev/disk/by-uuid/09aedaee-45c1-4c5d-b762-d13bf5fbd028";
- preLVM = true;
- keyFile = "/keyfile0.bin";
- allowDiscards = true;
- };
- secrets = {
- # Create /mnt/etc/secrets/initrd directory and copy keys to it
- "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin";
- };
- };
- }
- [hoodoo@T480:~/wtfflake]$ cat modules/host/laptop-hardware-configuration.nix
- # Do not modify this file! It was generated by ‘nixos-generate-config’
- # and may be overwritten by future invocations. Please make changes
- # to /etc/nixos/configuration.nix instead.
- { config, lib, pkgs, modulesPath, ... }:
- {
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
- boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "uas" "sd_mod" ];
- boot.initrd.kernelModules = [ "dm-snapshot" ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/1abe65eb-ea59-4c35-a53f-1e9c1701dfc1";
- fsType = "ext4";
- };
- fileSystems."/boot/efi" =
- { device = "/dev/disk/by-uuid/35AE-D6BA";
- fsType = "vfat";
- };
- swapDevices =
- [ { device = "/dev/disk/by-uuid/552bbbde-3054-4b5e-829b-28ee5126ffbd"; }
- ];
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement