Advertisement
Guest User

Untitled

a guest
Jun 25th, 2021
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. [hoodoo@T480:~/wtfflake]$ cat modules/host/laptop-luks.nix
  2. { config, pkgs, ... }:
  3. {
  4. # boot.loader.systemd-boot.enable = true;
  5. boot.loader.efi.canTouchEfiVariables = true;
  6. boot.loader.efi.efiSysMountPoint = "/boot/efi";
  7. boot.loader.grub = {
  8. enable = true;
  9. device = "nodev";
  10. version = 2;
  11. efiSupport = true;
  12. enableCryptodisk = true;
  13. };
  14. boot.initrd = {
  15. luks.devices."root" = {
  16. device = "/dev/disk/by-uuid/09aedaee-45c1-4c5d-b762-d13bf5fbd028";
  17. preLVM = true;
  18. keyFile = "/keyfile0.bin";
  19. allowDiscards = true;
  20. };
  21. secrets = {
  22. # Create /mnt/etc/secrets/initrd directory and copy keys to it
  23. "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin";
  24. };
  25. };
  26. }
  27.  
  28. [hoodoo@T480:~/wtfflake]$ cat modules/host/laptop-hardware-configuration.nix
  29. # Do not modify this file! It was generated by ‘nixos-generate-config’
  30. # and may be overwritten by future invocations. Please make changes
  31. # to /etc/nixos/configuration.nix instead.
  32. { config, lib, pkgs, modulesPath, ... }:
  33.  
  34. {
  35. imports =
  36. [ (modulesPath + "/installer/scan/not-detected.nix")
  37. ];
  38.  
  39. boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "uas" "sd_mod" ];
  40. boot.initrd.kernelModules = [ "dm-snapshot" ];
  41. boot.kernelModules = [ "kvm-intel" ];
  42. boot.extraModulePackages = [ ];
  43.  
  44. fileSystems."/" =
  45. { device = "/dev/disk/by-uuid/1abe65eb-ea59-4c35-a53f-1e9c1701dfc1";
  46. fsType = "ext4";
  47. };
  48.  
  49. fileSystems."/boot/efi" =
  50. { device = "/dev/disk/by-uuid/35AE-D6BA";
  51. fsType = "vfat";
  52. };
  53.  
  54. swapDevices =
  55. [ { device = "/dev/disk/by-uuid/552bbbde-3054-4b5e-829b-28ee5126ffbd"; }
  56. ];
  57.  
  58. powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  59. }
  60.  
  61.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement