Adding Options for ntp, nfs, and local hwclock

This commit is contained in:
Tyler Kelley 2024-02-06 00:44:36 -06:00
parent 5d17e11cb0
commit d1aede43c4
6 changed files with 30 additions and 1 deletions

View File

@ -6,10 +6,13 @@
./autorun.nix ./autorun.nix
./boot.nix ./boot.nix
./displaymanager.nix ./displaymanager.nix
./hwclock.nix
./intel-amd.nix ./intel-amd.nix
./intel-gpu.nix ./intel-gpu.nix
./intel-nvidia.nix ./intel-nvidia.nix
./neovim.nix ./neovim.nix
./nfs.nix
./ntp.nix
./nvidia.nix ./nvidia.nix
./packages.nix ./packages.nix
./polkit.nix ./polkit.nix

View File

@ -0,0 +1,6 @@
{ config, ... }:
let inherit (import ../../options.nix) localHWClock; in
lib.mkIf ("${localHWClock}" == "on") {
time.hardwareClockInLocalTime = true;
}

13
config/system/nfs.nix Normal file
View File

@ -0,0 +1,13 @@
{ config, ... }:
let inherit (import ../../options.nix) nfs; in
lib.mkIf ("${nfs}" == "on") {
fileSystems."${nfsMountPoint}" = {
device = "${nfsDevice}";
fsType = "nfs";
};
services = {
rpcbind.enable = true;
nfs.server.enable = true;
};
}

6
config/system/ntp.nix Normal file
View File

@ -0,0 +1,6 @@
{ config, ... }:
let inherit (import ../../options.nix) ntp; in
lib.mkIf ("${ntp}" == "on") {
networking.timeServers = options.networking.timeServers.default ++ [ "pool.ntp.org" ];
}

View File

@ -35,5 +35,4 @@
auth include login auth include login
''; '';
}; };
networking.timeServers = options.networking.timeServers.default ++ [ "pool.ntp.org" ];
} }

View File

@ -26,5 +26,7 @@
intel-bus-id = "PCI:0:2:0"; intel-bus-id = "PCI:0:2:0";
nvidia-bus-id = "PCI:14:0:0"; nvidia-bus-id = "PCI:14:0:0";
nfs = "on"; nfs = "on";
localHWClock = "off";
ntp = "on";
} }