summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-11-20 10:01:49 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-11-20 10:01:49 +0100
commit65edeb8633de16792a84195f77a6b4ea408e2608 (patch)
treebe3960fdb869c4d25b8128fb1080810e6ea22756 /nixos/modules/system
parent13bab298fc1ad49db5449b262125d25d849bc90e (diff)
parent648152fdbbdbb8a51335b94647ea9f959f42064d (diff)
Merge master into staging-next
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/networkd.nix2
-rw-r--r--nixos/modules/system/boot/timesyncd.nix13
2 files changed, 14 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 85a106527fe08..c091d86303498 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -10,7 +10,7 @@ let
 
   checkLink = checkUnitConfig "Link" [
     (assertOnlyFields [
-      "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "OriginalName"
+      "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "Name" "OriginalName"
       "MTUBytes" "BitsPerSecond" "Duplex" "AutoNegotiation" "WakeOnLan" "Port"
       "TCPSegmentationOffload" "TCP6SegmentationOffload" "GenericSegmentationOffload"
       "GenericReceiveOffload" "LargeReceiveOffload" "RxChannels" "TxChannels"
diff --git a/nixos/modules/system/boot/timesyncd.nix b/nixos/modules/system/boot/timesyncd.nix
index 8282cdd6f3aad..0b1d0ff6c22b8 100644
--- a/nixos/modules/system/boot/timesyncd.nix
+++ b/nixos/modules/system/boot/timesyncd.nix
@@ -20,6 +20,18 @@ with lib;
           The set of NTP servers from which to synchronise.
         '';
       };
+      extraConfig = mkOption {
+        default = "";
+        type = types.lines;
+        example = ''
+          PollIntervalMaxSec=180
+        '';
+        description = ''
+          Extra config options for systemd-timesyncd. See
+          <link xlink:href="https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html">
+          timesyncd.conf(5)</link> for available options.
+        '';
+      };
     };
   };
 
@@ -35,6 +47,7 @@ with lib;
     environment.etc."systemd/timesyncd.conf".text = ''
       [Time]
       NTP=${concatStringsSep " " config.services.timesyncd.servers}
+      ${config.services.timesyncd.extraConfig}
     '';
 
     users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync;