summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet @ jormungand <asmadeus@codewreck.org>2021-12-26 03:51:48 +0100
committerDominique Martinet @ jormungand <asmadeus@codewreck.org>2021-12-26 03:51:48 +0100
commit97a11110afb25a6064e3d7d41a416adae9f53778 (patch)
tree6e724c05cb71907db7eb569ba20c3f47ce24f587
parent897b80f192d498e1e061dcedd01ded104942bdf4 (diff)
jormungand: add nfs server
-rw-r--r--machines/jormungand/configuration.nix1
-rw-r--r--machines/jormungand/nfs.nix14
2 files changed, 15 insertions, 0 deletions
diff --git a/machines/jormungand/configuration.nix b/machines/jormungand/configuration.nix
index c53f4ea..e523ecb 100644
--- a/machines/jormungand/configuration.nix
+++ b/machines/jormungand/configuration.nix
@@ -19,6 +19,7 @@
./mumble.nix
./matrix.nix
./mpd.nix
+ ./nfs.nix
./nginx.nix
];
diff --git a/machines/jormungand/nfs.nix b/machines/jormungand/nfs.nix
new file mode 100644
index 0000000..18300bd
--- /dev/null
+++ b/machines/jormungand/nfs.nix
@@ -0,0 +1,14 @@
+{ config, pkgs, ... }:
+
+{
+ networking.firewall.extraCommands = ''
+ ip6tables -A nixos-fw -i wg0 -m tcp -p tcp --dport 2049 -m comment --comment nfs -j nixos-fw-accept
+ '';
+
+ services.nfs.server = {
+ enable = true;
+ exports = ''
+/home/asmadeus *(ro,fsid=0,insecure)
+ '';
+ };
+}