Home

cfg @main - refs - log -
-
https://git.jolheiser.com/cfg.git
Convert between various configuration formats
tree log patch
chore: update nixfig Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmZzic8ACgkQuFOtpdp7 v3pq1w//RQnyYQzkhgLX9ucoEs1LPwxjn5KkYJHoa932799G3ifnWq6n5D+nkzDY KBwmqF5KitYE/PRVNsjnieqH0XWoPGS8xF++jDCtyOz6Ba7jbSVH1Kp2t9UyF5/z j5zJIsQa1GDBwo5f3Fm6IXVOo3eAfyqNEtroTx5JN7ByO8HOWmxPpyM9tu9/aS21 gmYGdq2s5KSSjMZMh/R9P2wqaomXUaspay4S2IMyVSV4d0bR0fTb+isRTC3ZniZj y3MFqxLY3tfG1yJh+O/PjfcvL70p0Zs7p/E6tJHWggLNolSkomaDudb60PPnlndE A4vxq9Qu/yWol+66txrX4w2ndueJ8cTXcUyofGKaEYaucPkfDlSQhu4Cvijqb09n tPordIWwG018ETmrxIrpI6wKUk9W1HOnv0/WAFbKD2Qsxpnh+SmQjscoPWg/rAA8 +RkD69wNOYh3vNQMdOQRzGEfR6pogjAjRcPO1eD6oT9/nmjY8VjwRBM3xQH5loDn Qt4evl9hbhL1ewoVddpUcL0SHIoxa8ikqTgmLUxW+NoNawAuMXjGp5G3vc8qxzIh HkkSW2qyKGNz8KqeCIfP8x2yAn7EhzVdkPI3IgHGKrBhCRKfXp0gtT383HaxdLs3 IuxxSptCK9YU0MKGz59spgY3jLpbGMJQFlqBevHArLQWKX9HnR0= =P2tm -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
6 months ago
4 changed files, 11 additions(+), 1 deletions(-)
M cfg.go -> cfg.go
diff --git a/cfg.go b/cfg.go
index f71f6734d6d99bd1eae4dccd949af7701dbe90fe..53b30f56ea6aa8026b58a46a0b58403dbccb60db 100644
--- a/cfg.go
+++ b/cfg.go
@@ -68,6 +68,9 @@ 		return yaml.Marshal(v)
 	case TOML:
 		return toml.Marshal(v)
 	case NIX:
+		if nixfig.Fmt != nil {
+			return nixfig.MarshalFormat(v)
+		}
 		return nixfig.Marshal(v)
 	case KDL:
 		return kdl.Marshal(v)
M go.mod -> go.mod
diff --git a/go.mod b/go.mod
index a75721cc3e2402c3cb1f7882b73cc1ce2adaddc8..1be84f7f5ef96bf2a1055f5bb896d1204ac9fcfb 100644
--- a/go.mod
+++ b/go.mod
@@ -8,6 +9,7 @@ 	github.com/philandstuff/dhall-golang/v6 v6.0.2
 	github.com/sblinch/kdl-go v0.0.0-20240410000746-21754ba9ac55
 	github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
 module go.jolheiser.com/cfg
+	github.com/philandstuff/dhall-golang/v6 v6.0.2
 	gopkg.in/yaml.v3 v3.0.1
 )
 
M go.mod.sri -> go.mod.sri
diff --git a/go.mod.sri b/go.mod.sri
index 44410ee0cd981225930fb804eaee6ace814d2fd1..112a9d331474720e9ff7799c1ac1d708e22dfb18 100644
--- a/go.mod.sri
+++ b/go.mod.sri
@@ -1 +1 @@
-sha256-IKdsBsOJ41qh/d2ZxgkY0IihIGieYlTtdHRmFufS+yQ=
\ No newline at end of file
+sha256-UbjwyV55TOyTXiYZCdTmwinZ0SGLRS95qYmvD4odnnM=
\ No newline at end of file
M go.sum -> go.sum
diff --git a/go.sum b/go.sum
index 357afc93eec6b90d38fd402fa3a7003e372287b4..906a79050ead164bbdd7b5de006242a24983980a 100644
--- a/go.sum
+++ b/go.sum
@@ -60,6 +60,12 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
 github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
 go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda h1:TdrB7ewFKHdv61ziR0Fzhj6zalgyjXdjBZIJJcdTohc=
 go.jolheiser.com/nixfig v0.0.0-20231129190849-8b2170b2ecda/go.mod h1:GlnM735CZXZdJ7v9CMZ8Xjw1gZTrDXJ66Ak+jNwlwNU=
+go.jolheiser.com/nixfig v0.0.0-20240620013146-d3931c448175 h1:PDwpdixizHZQbU6DrXQCtMmnuTCPFivBUw7th2Fs+2k=
+go.jolheiser.com/nixfig v0.0.0-20240620013146-d3931c448175/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
+go.jolheiser.com/nixfig v0.0.0-20240620014138-f34fba6b99d6 h1:TB+c0tNI8bLvn+AddMV8Vy2r0zGRmZEkC4yhICrC7ts=
+go.jolheiser.com/nixfig v0.0.0-20240620014138-f34fba6b99d6/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
+go.jolheiser.com/nixfig v0.0.0-20240620014425-c1d5ec9d077a h1:KMiVqwvnDM3wpW7LmFb0W64HM2X7JZRXusGRrwGsYak=
+go.jolheiser.com/nixfig v0.0.0-20240620014425-c1d5ec9d077a/go.mod h1:ua/+4W7HyAsknnkU2gT2jzuURFx0cImj7Uht27606TY=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=