server.nix/drives.nix

46 lines
1.1 KiB
Nix
Raw Permalink Normal View History

{ lib, pkgs, ... }: {
environment.systemPackages = with pkgs; [
mergerfs
mergerfs-tools
];
fileSystems = {
"/mnt/seagate-8tb-1" = {
device = "/dev/disk/by-uuid/94471772-5f7e-4a59-b731-4cac02cb1c86";
fsType = "btrfs";
options = [ "nofail" ];
};
"/mnt/seagate-8tb-2" = {
device = "/dev/disk/by-uuid/e970d4e0-8019-4d04-9a23-e89e5c82081d";
fsType = "btrfs";
options = [ "nofail" ];
};
"/mnt/drive2" = {
device = "/dev/disk/by-uuid/3203fc16-136f-4b17-b844-7584394ea870"; # 18tb hdd
fsType = "ext4";
options = [ "nofail" ];
};
"/mnt/drive1" = {
device = "/dev/disk/by-uuid/23aa13b8-3e1a-4cd7-890d-68a54d8f13fa"; # 16tb hdd
fsType = "btrfs";
options = [ "nofail" ];
};
"/mnt/media" = rec {
device = lib.concatStringsSep ":" depends;
fsType = "fuse.mergerfs";
depends = [
"/mnt/drive1/media"
"/mnt/drive2/media"
"/mnt/seagate-8tb-1/media"
"/mnt/seagate-8tb-2/media"
];
options = [
"cache.files=partial"
"dropcacheonclose=true"
"category.create=mfs"
];
};
};
}