1
0

disk.nix 1.2 KB

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