added port to nfs

This commit is contained in:
Leyla Becker 2024-12-11 20:52:34 -06:00
parent 835945c925
commit 3d5aad50c4
2 changed files with 8 additions and 12 deletions

View file

@ -6,7 +6,6 @@
... ...
}: let }: let
jellyfinPort = 8096; jellyfinPort = 8096;
nfsPort = 2049;
dnsPort = 53; dnsPort = 53;
httpPort = 80; httpPort = 80;
httpsPort = 443; httpsPort = 443;
@ -264,16 +263,6 @@ in {
# DNS stub needs to be disabled so pi hole can bind # DNS stub needs to be disabled so pi hole can bind
# resolved.extraConfig = "DNSStubListener=no"; # resolved.extraConfig = "DNSStubListener=no";
nfs.server = {
enable = true;
exports = ''
/home/leyla 192.168.1.0/22(rw,sync,no_subtree_check,crossmnt)
/home/eve 192.168.1.0/22(rw,sync,no_subtree_check,crossmnt)
/home/ester 192.168.1.0/22(rw,sync,no_subtree_check,crossmnt)
/home/users 192.168.1.0/22(rw,sync,no_subtree_check,crossmnt)
'';
};
postgresql = { postgresql = {
enable = true; enable = true;
ensureUsers = [ ensureUsers = [
@ -432,7 +421,6 @@ in {
httpPort httpPort
httpsPort httpsPort
dnsPort dnsPort
nfsPort
] ]
++ (lib.optional isDebug [ ++ (lib.optional isDebug [
jellyfinPort jellyfinPort

View file

@ -6,6 +6,11 @@
options = { options = {
host.network_storage.nfs = { host.network_storage.nfs = {
enable = lib.mkEnableOption "is this server going to export network storage as nfs shares"; enable = lib.mkEnableOption "is this server going to export network storage as nfs shares";
port = lib.mkOption {
type = lib.types.int;
default = 2049;
description = "port that nfs will run on";
};
directories = lib.mkOption { directories = lib.mkOption {
type = lib.types.listOf ( type = lib.types.listOf (
lib.types.enum ( lib.types.enum (
@ -44,6 +49,9 @@
) )
); );
}; };
networking.firewall.allowedTCPPorts = [
config.host.network_storage.nfs.port
];
} }
) )
]; ];