auto mount nfs share

This commit is contained in:
Dmitriy Kholkin 2024-12-28 11:37:41 +03:00
parent a13dd36e92
commit c864010843
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
4 changed files with 20 additions and 1 deletions

View File

@ -90,6 +90,11 @@
"gid=${toString config.users.groups.users.gid}" "gid=${toString config.users.groups.users.gid}"
]; ];
}; };
"/media/local-nfs" = {
device = "10.10.10.11:/";
fsType = "nfs4";
options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" ];
};
}; };
powerManagement.cpuFreqGovernor = "schedutil"; powerManagement.cpuFreqGovernor = "schedutil";

View File

@ -40,6 +40,12 @@
boot.kernelParams = [ "mem_sleep_default=deep" ]; boot.kernelParams = [ "mem_sleep_default=deep" ];
fileSystems."/media/local-nfs" = {
device = "10.10.10.11:/";
fsType = "nfs4";
options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" ];
};
persist.state.homeDirectories = [ ".config/Moonlight Game Streaming Project" ]; persist.state.homeDirectories = [ ".config/Moonlight Game Streaming Project" ];
home-manager.users.${config.mainuser} = { home-manager.users.${config.mainuser} = {
home.packages = [ home.packages = [

View File

@ -52,7 +52,7 @@ in {
useOSProber = false; useOSProber = false;
}; };
}; };
kernelModules = [ "tcp_bbr" "veth" ]; kernelModules = [ "tcp_bbr" "veth" "nfsv4" ];
kernelParams = [ kernelParams = [
"zfs.zfs_arc_max=${zfs_arc_max}" "zfs.zfs_arc_max=${zfs_arc_max}"
"zswap.enabled=0" "zswap.enabled=0"
@ -76,6 +76,7 @@ in {
"vm.overcommit_memory" = lib.mkForce 1; "vm.overcommit_memory" = lib.mkForce 1;
}; };
supportedFilesystems = [ "nfs4" ];
zfs.extraPools = [ "bpool" "rpool" "nas-pool" ]; zfs.extraPools = [ "bpool" "rpool" "nas-pool" ];
}; };

View File

@ -99,6 +99,12 @@ in {
}; };
}; };
fileSystems."/media/local-nfs" = {
device = "10.10.10.11:/";
fsType = "nfs4";
options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" ];
};
environment.memoryAllocator.provider = "libc"; environment.memoryAllocator.provider = "libc";
services.udisks2.enable = false; services.udisks2.enable = false;
fonts.enableDefaultPackages = false; fonts.enableDefaultPackages = false;
@ -126,6 +132,7 @@ in {
"recursive-nix" "recursive-nix"
]; ];
environment.systemPackages = with pkgs; [ nfs-utils ];
home-manager.users.${config.mainuser} = { home-manager.users.${config.mainuser} = {
home.file.".config/libvirt/libvirt.conf".text = '' home.file.".config/libvirt/libvirt.conf".text = ''
uri_default = "qemu:///system" uri_default = "qemu:///system"