Move nfs-share stuff to a module.
This commit is contained in:
parent
e94c4f7d81
commit
74c1b18ce2
@ -89,13 +89,6 @@
|
||||
# Enable zram swap device
|
||||
zramSwap.enable = true;
|
||||
|
||||
# Nfs share
|
||||
fileSystems."/mnt/share" = {
|
||||
device = "192.168.0.4:/mnt/nfs";
|
||||
fsType = "nfs";
|
||||
options = ["_netdev" "noauto" "x-systemd.automount" "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600"];
|
||||
};
|
||||
|
||||
# Setup auto-cpufreq
|
||||
programs.auto-cpufreq = {
|
||||
enable = true;
|
||||
|
@ -11,6 +11,7 @@
|
||||
./ryzenadj.nix
|
||||
./qemu.nix
|
||||
./amdgpu.nix
|
||||
./nfs-share.nix
|
||||
];
|
||||
|
||||
crony.bluetooth.enable = lib.mkDefault true;
|
||||
@ -24,4 +25,5 @@
|
||||
crony.ryzenadj.enable = lib.mkDefault true;
|
||||
crony.qemu.enable = lib.mkDefault true;
|
||||
crony.amdgpu.enable = lib.mkDefault true;
|
||||
crony.nfs-share.enable = lib.mkDefault true;
|
||||
}
|
||||
|
18
modules/nixos/nfs-share.nix
Normal file
18
modules/nixos/nfs-share.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
crony.nfs-share.enable = lib.mkEnableOption "Setup personal nfs share mount.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.crony.nfs-share.enable {
|
||||
# Nfs share
|
||||
fileSystems."/mnt/share" = {
|
||||
device = "192.168.0.4:/mnt/nfs";
|
||||
fsType = "nfs";
|
||||
options = ["_netdev" "noauto" "x-systemd.automount" "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user