infrastructure/nixos/hosts/hades/storage/configuration.nix

63 lines
1.5 KiB
Nix
Raw Normal View History

2023-12-29 02:23:21 +01:00
{ ... }:
2023-12-28 18:45:12 +01:00
{
2023-12-29 02:23:21 +01:00
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
./fs.nix
];
2023-12-28 18:45:12 +01:00
boot.loader.systemd-boot.enable = true;
2023-12-29 13:01:36 +01:00
services = {
2023-12-28 18:45:12 +01:00
2023-12-29 13:01:36 +01:00
# Enable the OpenSSH daemon.
openssh.enable = true; # Did you read the comment?
nfs.server = {
enable = true;
exports = ''
/mnt/storage *(rw,async,no_subtree_check,fsid=0,all_squash,anonuid=0,anongid=0)
'';
};
snapraid = {
enable = true;
parityFiles =
[ "/mnt/parity1/snapraid.parity" "/mnt/parity2/snapraid.parity-2" ];
dataDisks = {
d1 = "/mnt/disk1";
d2 = "/mnt/disk2";
d3 = "/mnt/disk3";
d4 = "/mnt/disk4";
d5 = "/mnt/disk5";
d6 = "/mnt/disk6";
};
contentFiles = [
"/var/lib/snapraid/snapraid.content"
"/mnt/disk1/snapraid.content"
"/mnt/disk2/snapraid.content"
"/mnt/disk3/snapraid.content"
"/mnt/disk5/snapraid.content"
];
exclude = [
"/lost+found/"
"*.tmp"
"/tmp/"
"*.unrecoverable"
"/.Trash-1000/"
"/rancher/"
"/torrents/"
"/exclusion-zone/"
"/roms/"
"/roms/"
];
};
};
2023-12-28 18:45:12 +01:00
# Disable firewall, as NFS makes it annoying
networking.firewall.enable = false;
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
2023-12-29 13:01:36 +01:00
system.stateVersion = "23.11";
2023-12-28 18:45:12 +01:00
}