NixOS deployment for LinuxLab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

66 lines
1.2 KiB

{ pkgs, lib, ... }:
with lib;
{
services.nfs.server = {
enable = true;
exports = ''
/home 10.33.64.0/20(rw,async,no_root_squash)
'';
};
networking.firewall.allowedTCPPorts = [
2049 # NFSv4
];
environment.systemPackages = with pkgs; [
quota
];
disko.devices = {
disk = genAttrs [
"pci-0000:00:17.0-ata-1"
"pci-0000:00:17.0-ata-2"
"pci-0000:00:17.0-ata-3"
"pci-0000:00:17.0-ata-4"
]
(path: {
type = "disk";
device = "/dev/disk/by-path/${path}";
content = {
type = "mdraid";
name = "home";
};
});
mdadm = {
home = {
type = "mdadm";
level = 5;
content = {
type = "gpt";
partitions = {
primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
extraArgs = [
"-Oquota"
"-Equotatype=usrquota"
];
mountOptions = [
"defaults"
"quota"
];
};
};
};
};
};
};
};
}