1
0

disk.nix 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. { lib, inputs, ... }:
  2. {
  3. imports = [
  4. inputs.disko.nixosModules.disko
  5. ];
  6. disko.devices = {
  7. disk.disk1 = {
  8. device = lib.mkDefault "/dev/vda";
  9. type = "disk";
  10. content = {
  11. type = "gpt";
  12. partitions = {
  13. boot = {
  14. name = "boot";
  15. size = "1M";
  16. type = "EF02";
  17. };
  18. esp = {
  19. name = "ESP";
  20. size = "500M";
  21. type = "EF00";
  22. content = {
  23. type = "filesystem";
  24. format = "vfat";
  25. mountpoint = "/boot";
  26. };
  27. };
  28. root = {
  29. name = "root";
  30. size = "100%";
  31. content = {
  32. type = "lvm_pv";
  33. vg = "pool";
  34. };
  35. };
  36. };
  37. };
  38. };
  39. lvm_vg = {
  40. pool = {
  41. type = "lvm_vg";
  42. lvs = {
  43. root = {
  44. size = "100%FREE";
  45. content = {
  46. type = "filesystem";
  47. format = "ext4";
  48. mountpoint = "/";
  49. mountOptions = [
  50. "defaults"
  51. ];
  52. };
  53. };
  54. };
  55. };
  56. };
  57. };
  58. }