From 2b0e2d6d90be4c4b85c0c059b767f05ee850d9e9 Mon Sep 17 00:00:00 2001 From: goyalyashpal Date: Fri, 2 Aug 2024 16:50:04 +0000 Subject: [PATCH] refac(examples): Denest the source --- example/legacy-table.nix | 70 +++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/example/legacy-table.nix b/example/legacy-table.nix index b022e8ff..1df4f001 100644 --- a/example/legacy-table.nix +++ b/example/legacy-table.nix @@ -1,40 +1,38 @@ { - disko.devices = { - disk = { - main = { - device = "/dev/sda"; - type = "disk"; - content = { - type = "table"; - format = "gpt"; - partitions = [ - { - name = "ESP"; - start = "1M"; - end = "500M"; - bootable = true; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - } - { - name = "root"; - start = "500M"; - end = "100%"; - part-type = "primary"; - bootable = true; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - } - ]; - }; - }; - }; + disko.devices.disk.main = { + device = "/dev/sda"; + type = "disk"; + }; + + disko.devices.disk.main.content = { + type = "table"; + format = "gpt"; }; + + disko.devices.disk.main.content.partitions = [ + { + name = "ESP"; + start = "1M"; + end = "500M"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + name = "root"; + start = "500M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; }