nixos-config/modules/system/services/server/nfs/default.nix

11 lines
336 B
Nix

{ config, lib, ... }:
{
imports = [ ./user ];
config = lib.mkIf config.services.nfs.server.enable {
services.nfs.server.exports = "/storage *(rw)";
networking.firewall.extraInputRules = with lib; ''
ip6 saddr { ${concatStringsSep ", " (attrValues config.services.mycelium.ips)} } tcp dport 2049 accept
'';
};
}