Added options to nfs share and root
This commit is contained in:
parent
4f8c9c85aa
commit
3d71ee0bf8
|
@ -18,6 +18,8 @@
|
|||
email = email;
|
||||
sshEnable = true;
|
||||
nfsEnable = true;
|
||||
nfsRoot = "/nfs_export";
|
||||
nfsExports = [ "/kage" ];
|
||||
};
|
||||
|
||||
# deskCfg = {
|
||||
|
|
|
@ -27,6 +27,14 @@ in
|
|||
nfsEnable = lib.mkOption {
|
||||
default = false;
|
||||
};
|
||||
nfsRoot = lib.mkOption {
|
||||
default = "/nfs_export";
|
||||
type = lib.types.str;
|
||||
};
|
||||
nfsExports = lib.mkOption {
|
||||
default = [];
|
||||
description = "List of file paths provided as strings to the nfs exports";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
@ -73,7 +81,8 @@ in
|
|||
services.nfs.server = lib.mkIf srvConfig.nfsEnable {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/kage 192.168.1.149(rw,fsid=0,no_subtree_check)
|
||||
${srvConfig.nfsRoot} 192.168.1.*(rw,fsid=root,no_subtree_check)
|
||||
${concatMapStringsSep "\n" (n: "${srvConfig.nfsRoot}${n} 192.168.1.*(rw,no_subtree_check,nohide)") srvConfig.nfsExports}
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user