mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-26 00:18:28 +02:00
nfs: init
This commit is contained in:
parent
bff20285d2
commit
97a9bbce42
5 changed files with 56 additions and 8 deletions
|
@ -4,6 +4,7 @@
|
|||
./hardware-configuration.nix
|
||||
./modules/networks
|
||||
./modules/monitoring
|
||||
./modules/nfs
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
|
|
19
hosts/fujitsu/modules/nfs/default.nix
Normal file
19
hosts/fujitsu/modules/nfs/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ ... }:
|
||||
{
|
||||
fileSystems."/export" = {
|
||||
device = "/dev/sda2";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=export" "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = ''
|
||||
/export 192.168.42.2(rw,fsid=0,no_subtree_check)
|
||||
/export/movies 192.168.42.2(rw,fsid=0,no_subtree_check)
|
||||
/export/shows 192.168.42.2(rw,fsid=0,no_subtree_check)
|
||||
'';
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 2049 ];
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue