FEATURE: setup nfs-client on citadel

This commit is contained in:
Sam 2025-01-19 12:22:50 +00:00
parent ee98b5cf89
commit ba181205c4
5 changed files with 11 additions and 34 deletions

View File

@ -49,9 +49,9 @@ in {
../common/optional/openssh.nix
../common/optional/dwm.nix
# ../common/optional/fileserver/media.nix
# ../common/optional/fileserver/homeshare.nix
# ../common/optional/fileserver/photos.nix
../common/optional/fileserver/nfs-client/media.nix
../common/optional/fileserver/nfs-client/photos.nix
../common/optional/fileserver/nfs-client/personal.nix
../common/optional/printing.nix
../common/optional/backlight.nix
@ -69,9 +69,10 @@ in {
];
boot = {
supportedFilesystems = ["nfs"];
blacklistedKernelModules = ["snd_hda_intel" "snd_soc_skl"];
kernelModules = ["iwlwifi"];
initrd.kernelModules = ["thinkpad-acpi" "acpi-call"];
initrd.kernelModules = ["thinkpad-acpi" "acpi-call" "nfs"];
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
extraModulePackages = [
config.boot.kernelPackages.acpi_call

View File

@ -1,27 +0,0 @@
{...}:
{
fileSystems."/exports" = {
device = "/dev/vdb1";
fsType = "ext4";
};
services.nfs.server = {
enable = true;
# fixed rpc.statd port; for firewall
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
extraNfsdConfig = '''';
exports = ''
/exports *(rw,insecure,all_squash)
'';
};
# open nfs ports
networking.firewall = {
enable = true;
# for NFSv3; view with `rpcinfo -p`
allowedTCPPorts = [ 111 2049 4000 4001 4002 20048 ];
allowedUDPPorts = [ 111 2049 4000 4001 4002 20048 ];
};
}

View File

@ -1,6 +1,7 @@
{configVars, ...}: let
{configVars, pkgs, ...}: let
fileserverIp = configVars.networking.addresses.fileserver.ip;
in {
environment.systemPackages = [pkgs.nfs-utils];
fileSystems."/media/media" = {
device = "${fileserverIp}:/srv/export/media";
fsType = "nfs";

View File

@ -1,6 +1,7 @@
{configVars, ...}: let
{configVars, pkgs, ...}: let
fileserverIp = configVars.networking.addresses.fileserver.ip;
in {
environment.systemPackages = [pkgs.nfs-utils];
fileSystems."/media/personal" = {
device = "${fileserverIp}:/srv/export/personal";
fsType = "nfs";

View File

@ -1,6 +1,7 @@
{configVars, ...}: let
{configVars, pkgs, ...}: let
fileserverIp = configVars.networking.addresses.fileserver.ip;
in {
environment.systemPackages = [pkgs.nfs-utils];
fileSystems."/media/photos" = {
device = "${fileserverIp}:/srv/export/photos";
fsType = "nfs";