42 lines
966 B
Nix
42 lines
966 B
Nix
{pkgs, ...}: {
|
|
# Media HDDs.
|
|
fileSystems."/mnt/hdd0" = {
|
|
device = "/dev/disk/by-uuid/fcee0188-8ca1-4fda-81b7-f5920c79ab48";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/hdd1" = {
|
|
device = "/dev/disk/by-uuid/5d9dd538-79e4-4168-be91-e0b040155cb3";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/hdd2" = {
|
|
device = "/dev/disk/by-uuid/5a43b7dc-3e28-459e-824a-ad45b5475361";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
# Install some packages.
|
|
environment.systemPackages = with pkgs; [
|
|
mergerfs
|
|
];
|
|
|
|
# MergerFS.
|
|
fileSystems."/media" = {
|
|
fsType = "fuse.mergerfs";
|
|
depends = ["/mnt/hdd0" "/mnt/hdd1" "/mnt/hdd2"];
|
|
device = "/mnt/hdd0:/mnt/hdd1:/mnt/hdd2";
|
|
options = ["cache.files=partial" "dropcacheonclose=true" "category.create=mfs" "func.getattr=newest"];
|
|
};
|
|
|
|
# Media group.
|
|
users.groups.media = {
|
|
gid = 1800;
|
|
};
|
|
|
|
users.users.fern.extraGroups = ["media"];
|
|
|
|
flock.docker = {
|
|
enable = true;
|
|
dockerMount = true;
|
|
};
|
|
}
|