4 Commits

Author SHA1 Message Date
ahtlon
9a667c8bdc kleine fehler behoben 2024-10-26 20:16:19 +02:00
ahtlon
705d895f0e erstmal statisches mounten --es fehlt die disk uuid 2024-10-26 19:56:46 +02:00
ahtlon
cfc023f9b1 erstelle nfs user 2024-10-26 19:33:49 +02:00
ahtlon
1201f0fc53 erstelle exports ordner 2024-10-26 19:08:14 +02:00
3 changed files with 38 additions and 0 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
*.log
result
*.qcow2
.direnv/

View File

@@ -7,6 +7,7 @@ in
imports =
[ # Include the results of the hardware scan.
../modules/malobeo_user.nix
./file_server.nix
];
sops.defaultSopsFile = ./secrets.yaml;

View File

@@ -0,0 +1,36 @@
{
#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.users.nfs = {
isSystemUser = true;
group = "nfs";
uid = 1003;
};
users.users.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, nohide, no_subtree_check, async, all_squash, anonuid=1003, anongid=1003)
'';
};
networking.firewall.allowedTCPPorts = [ 2049 ]; #wir benutzen NfsV4 hoffentlich
}