rename file share to holocron
This commit is contained in:
28
modules/holocron/nfs/default.nix
Normal file
28
modules/holocron/nfs/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
# define nfs exports
|
||||
let
|
||||
cfg = config.holocron.nfs;
|
||||
nfs_exports = ''
|
||||
/holocron/media *(ro,sync,no_subtree_check)
|
||||
'';
|
||||
#/holocron/vault *(rw,sync,no_subtree_check,no_root_squash)
|
||||
in {
|
||||
options.holocron.nfs = {
|
||||
enable = lib.mkEnableOption "enables nfs";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable nfs with all exports
|
||||
services.nfs = {
|
||||
server = {
|
||||
enable = true;
|
||||
exports = nfs_exports;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user