feat: add nfs mesh

This commit is contained in:
2025-12-13 22:40:04 -08:00
parent ae0a4d5f21
commit 07e49b1591
5 changed files with 148 additions and 26 deletions

31
nix/modules/mounts.nix Normal file
View File

@@ -0,0 +1,31 @@
{
pkgs,
lib,
config,
...
}:
{
options.mounts = {
enable = lib.mkEnableOption "enable mounts" // {
default = true;
};
};
config = lib.mkIf config.mounts.enable {
boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true;
systemd.tmpfiles.rules = [ "d /mnt/data 0755 luca users -" ];
fileSystems = {
"/mnt/data" = {
device = "rufus:/data";
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=600"
];
};
};
};
}