NTP: Difference between revisions
imported>Tobias.bora No edit summary |
imported>Tobias.bora mNo edit summary |
||
Line 59: | Line 59: | ||
The procedure depends on how you configure internet. By default (if you have not installed network manager…) the [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/network-interfaces-scripted.nix module <code>network-interfaces-scripted</code>] will be used… unfortunately as far as I know this script cannot deal with NTP. | The procedure depends on how you configure internet. By default (if you have not installed network manager…) the [https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/network-interfaces-scripted.nix module <code>network-interfaces-scripted</code>] will be used… unfortunately as far as I know this script cannot deal with NTP. | ||
If you use <code>systemd-networkd</code>, then it should automatically use the right NTP… However if you want the configuration to be automatic you want to use <code>networking.useNetworkd = true;</code> instead of <code>systemd.network.enable</code> ( | If you use <code>systemd-networkd</code>, then it should automatically use the right NTP… However if you want the configuration to be automatic you want to use <code>networking.useNetworkd = true;</code> instead of <code>systemd.network.enable</code> (<code>useNetworkd</code> will automatically configure <code>systemd.network</code> to provide a good default experience as alone <code>systemd.network</code> does basically nothing). However, <code>networking.useNetworkd</code> is apparently experimental now (2022) according to its documentation, so use it at your own risks. As far as I understand you can also '''disable''' the default behavior using: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
systemd.network.config = { | systemd.network.config = { |