flake

Francesco Saccone's Nix flake.
git clone https://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

disk-config.nix (1147B)


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