This commit is contained in:
2025-08-29 15:25:40 +02:00
parent 26440bfeee
commit f3821f0dfa
201 changed files with 2461 additions and 1546 deletions

View File

@@ -2,10 +2,17 @@
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types;
}:
let
inherit (lib)
mkIf
mkEnableOption
mkOption
types
;
cfg = config.nixos.services.nfs;
in {
in
{
options.nixos.services.nfs = {
enable = mkEnableOption "Enable NFS support";
@@ -37,18 +44,28 @@ in {
};
options = mkOption {
type = types.listOf types.str;
default = ["x-systemd.automount"];
default = [ "x-systemd.automount" ];
description = "Mount options";
};
};
};
config = mkIf cfg.enable {
boot.supportedFilesystems = ["nfs"];
boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true;
networking.firewall = {
allowedTCPPorts = [2049 4000 4001 4002];
allowedUDPPorts = [2049 4000 4001 4002];
allowedTCPPorts = [
2049
4000
4001
4002
];
allowedUDPPorts = [
2049
4000
4001
4002
];
};
services.nfs.server = mkIf cfg.server.enable {