From 8e4b3323d1a6ae7911ae29bd319cd75f1d41b8aa Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 17 Jun 2022 21:29:29 -0400 Subject: [PATCH] nixos/device-tree: use new overlay syntax in example Since dtc 1.4.7 (released in 2018), there has been a much nicer syntax for device tree overlays. This commit converts the dtsText example to use this syntax. --- nixos/modules/hardware/device-tree.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index be67116ad50..682b4bc0d75 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -36,14 +36,11 @@ let /plugin/; / { compatible = "raspberrypi"; - fragment@0 { - target-path = "/soc"; - __overlay__ { - pps { - compatible = "pps-gpio"; - status = "okay"; - }; - }; + }; + &{/soc} { + pps { + compatible = "pps-gpio"; + status = "okay"; }; }; '';