Btrfs: Difference between revisions

imported>Tripplilley
m Creating Subvolumes: fix typo in section title
imported>Vieta
No edit summary
Line 197: Line 197:


<code>
<code>
mkfs.vfat -n boot "$DISK"p1  
mkfs.vfat -n BOOT "$DISK"p1  
</code>
</code>


Line 270: Line 270:
</syntaxhighlight >
</syntaxhighlight >


Configure <code>hardware-configuration.nix</code>
<syntaxhighlight  lang="nix">
# enable btrfs support
boot.supportedFilesystems = [ "btrfs" ];
fileSystems."/var/log" =
    { device = "/dev/disk/by-uuid/X";
      fsType = "btrfs";
      # enable noatime and zstd to the other subvolumes aswell
      options = [ "subvol=log" "compress=zstd" "noatime" ];
      # to have a correct log order
      neededForBoot = true;
    };
</syntaxhighlight >
Generate Nixconfig:
Generate Nixconfig:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">