33 lines
753 B
Nix
33 lines
753 B
Nix
|
{
|
||
|
#fileSystems."/export/" = {
|
||
|
# device = "/mnt/mafuyu";
|
||
|
# options = [ "bind" ];
|
||
|
#};
|
||
|
|
||
|
services.nfs.server = {
|
||
|
enable = true;
|
||
|
# fixed rpc.statd port; for firewall
|
||
|
lockdPort = 4001;
|
||
|
mountdPort = 4002;
|
||
|
statdPort = 4000;
|
||
|
extraNfsdConfig = '''';
|
||
|
exports = ''
|
||
|
/home/ftp 192.168.1.0/24(rw)
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
networking.firewall = {
|
||
|
allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||
|
allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
|
||
|
};
|
||
|
|
||
|
#systemd.services.create-mount-dir = {
|
||
|
# serviceConfig = {
|
||
|
# ExecStart = "mkdir /export";
|
||
|
# };
|
||
|
# wantedBy = [ "multi-user.target" ];
|
||
|
# after = [ "remote-fs.target" ];
|
||
|
# description = "Create a directory we can mount on fs";
|
||
|
#};
|
||
|
}
|