services: add new nas nfs share

This commit is contained in:
2023-01-07 19:43:12 +01:00
parent 78a120c99b
commit 845a69089b
5 changed files with 66 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
#
# Services
#
# flake.nix
# ├─ ./hosts
# │ └─ home.nix
# └─ ./modules
# └─ ./services
# └─ default.nix *
# └─ ...
#
[
./nfs.nix
]
# picom, polybar and sxhkd are pulled from desktop module
# redshift temporarely disables

17
modules/services/nfs.nix Normal file
View File

@@ -0,0 +1,17 @@
{config, pkgs, lib, ...}: {
# enable nfs
services.nfs.server = rec {
enable = true;
exports = ''
/export 192.168.2.0/24(rw,fsid=0,no_subtree_check)
/export/Pluto 192.168.2.0/24(rw,no_subtree_check)
/export/Mars 192.168.2.0/24(rw,no_subtree_check)
'';
};
# open the firewall
networking.firewall = {
interfaces.enp0s31f6 = {
allowedTCPPorts = [ 2049 ];
};
};
}