From 705d895f0ee0113c58245cfdce8e8fa032a17b11 Mon Sep 17 00:00:00 2001 From: ahtlon Date: Sat, 26 Oct 2024 19:56:46 +0200 Subject: [PATCH] erstmal statisches mounten --es fehlt die disk uuid --- machines/lucia/file_server.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/machines/lucia/file_server.nix b/machines/lucia/file_server.nix index c326b04..c0403ef 100644 --- a/machines/lucia/file_server.nix +++ b/machines/lucia/file_server.nix @@ -1,29 +1,36 @@ -{config, pkgs, ... }: { #automount mit udisks2 #siehe udevadm monitor #bash-script? #user-oder root mount #systemd-automount villeicht - - + fileSystems = { + "/mnt/extHdd0" = { #statisches mounten ist am einfachsten aber kein hotplug möglich + device = "/dev/disk/by-uuid/"; #noch ausfüllen + fsType = "ext4"; #zfs wäre hier cool + options = [ "users" "nofail" ]; + }; + "/exports/extHdd0" = { + device = "/mnt/extHdd0"; + fsType = "none"; + }; + }; + users.groups = { nfs = {gid = 1003; }; }; #erstelle nfs user und gruppe für isolation users.user.nfs = { isSystemUser = true; group = "nfs"; uid = "1003"; }; + users.user.malobeo.extraGroups = [ "nfs" ]; systemd.tmpfiles.rules = [ "d /export 0775 nfs nfs -" ]; #erstelle nfs ordner services.nfs.server = { enable = true; exports = '' - /export 192.168.1.0/24(ro, async, all_squash, anonuid=1003, anongid=1003) + /export 192.168.1.0/24(ro, nohide, no_subtree_check, async, all_squash, anonuid=1003, anongid=1003) ''; }; - networking.firewall = { - allowedTCPPorts = []; - allowedUDPPorts = []; - }; + networking.firewall.allowedTCPPorts = [ 2049 ]; #wir benutzen NfsV4 hoffentlich } \ No newline at end of file