nixos-server/services/nfs.nix
2024-05-31 10:36:14 +02:00

32 lines
724 B
Nix

{ pkgs, lib, ... }:
{
name = "gitea";
config = {
services.nfs.server = {
enable = true;
createMountPoints = true;
exports = ''
/srv/nfs/music 192.168.0.0/16(rw,sync,no_subtree_check) *(ro,sync,no_subtree_check)
'';
};
};
ports = {
tcp = [ 111 2049 ];
udp = [ 111 2049 ];
http = null;
forward = [
{ container = 111; host = 111; proto = "tcp"; }
{ container = 111; host = 111; proto = "udp"; }
{ container = 2049; host = 2049; proto = "tcp"; }
{ container = 2049; host = 2049; proto = "udp"; }
];
};
hosts = [];
volumes = [{
name = "nfs";
mountPoint = "/srv/nfs/";
readOnly = false;
backup = false;
}];
}