dot

NixOS dotfiles
git clone https://git.echoz.io/dot.git
Log | Files | Refs

default.nix (1483B)


      1 { disko, ... }:
      2 {
      3   imports = [ disko.nixosModules.disko ];
      4 
      5   disko.devices = {
      6     disk.system = {
      7       type = "disk";
      8 
      9       content = {
     10         type = "gpt";
     11         partitions = {
     12           boot = {
     13             size = "1G";
     14             type = "EF00";
     15             content = {
     16               type = "filesystem";
     17               format = "vfat";
     18               mountpoint = "/boot";
     19               mountOptions = [ "nofail" ];
     20             };
     21           };
     22 
     23           zfs = {
     24             size = "100%";
     25             content = {
     26               type = "zfs";
     27               pool = "system";
     28             };
     29           };
     30         };
     31       };
     32     };
     33 
     34     zpool.system = {
     35       type = "zpool";
     36       rootFsOptions = {
     37         mountpoint = "none";
     38         compression = "zstd";
     39         acltype = "posixacl";
     40         xattr = "sa";
     41         encryption = "aes-256-gcm";
     42         keyformat = "passphrase";
     43         keylocation = "prompt";
     44       };
     45       options.ashift = "12";
     46 
     47       datasets = {
     48         root = {
     49           type = "zfs_fs";
     50           options.mountpoint = "none";
     51         };
     52 
     53         "root/current" = {
     54           type = "zfs_fs";
     55           options.mountpoint = "legacy";
     56           mountpoint = "/";
     57         };
     58 
     59         nix = {
     60           type = "zfs_fs";
     61           options.mountpoint = "legacy";
     62           mountpoint = "/nix";
     63         };
     64 
     65         fix = {
     66           type = "zfs_fs";
     67           options.mountpoint = "legacy";
     68           mountpoint = "/fix";
     69         };
     70       };
     71     };
     72   };
     73 }