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
machines
AMD-Workstation
Dell-Laptop
Home-Hypervisor

@ -90,6 +90,11 @@
"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";

@ -40,6 +40,12 @@
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" ];
home-manager.users.${config.mainuser} = {
home.packages = [

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

@ -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";
services.udisks2.enable = false;
fonts.enableDefaultPackages = false;
@ -126,6 +132,7 @@ in {
"recursive-nix"
];
environment.systemPackages = with pkgs; [ nfs-utils ];
home-manager.users.${config.mainuser} = {
home.file.".config/libvirt/libvirt.conf".text = ''
uri_default = "qemu:///system"