22 lines
425 B
Nix
22 lines
425 B
Nix
{ config, lib, ... }:
|
|
let
|
|
inherit (lib) mkIf mkEnableOption;
|
|
|
|
cfg = config.modules.networking.nfs;
|
|
in
|
|
{
|
|
options.modules.networking.nfs = {
|
|
enable = mkEnableOption "Enable NFS";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
networking.firewall.allowedTCPPorts = [ 2049 ];
|
|
|
|
services.nfs.server = {
|
|
enable = true;
|
|
exports = ''
|
|
/var/media manwe(rw,sync,no_subtree_check,fsid=0)
|
|
'';
|
|
};
|
|
};
|
|
}
|