From 7f69661e4ba0fda459764e707ce62c055bc8def2 Mon Sep 17 00:00:00 2001 From: Naman Agarwal Date: Mon, 27 Nov 2023 22:10:21 +0530 Subject: [PATCH] add dioxus --- flake.lock | 11 ++++++----- flake.nix | 9 ++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 8b5a665f..ace086ce 100644 --- a/flake.lock +++ b/flake.lock @@ -298,15 +298,16 @@ ] }, "locked": { - "lastModified": 1692524468, - "narHash": "sha256-wJffwu1deOgc3c/cBIZQ52dfWfPWBzjOamYBX121hcw=", - "owner": "numtide", + "lastModified": 1701102814, + "narHash": "sha256-o4E3iv8g0Gk5U9bsohpZdhXjNbbY2At9eyZms2Zl7g0=", + "owner": "divinenaman", "repo": "treefmt-nix", - "rev": "e2761d701581d8dcc4e0e88aecfde317ddf6f0cd", + "rev": "555e603c072f301fd6e0a129acf9758e46c98c7f", "type": "github" }, "original": { - "owner": "numtide", + "owner": "divinenaman", + "ref": "dioxus-cli-fmt", "repo": "treefmt-nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 6b48c642..5615c16f 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ rust-overlay.url = "github:oxalica/rust-overlay"; crane.url = "github:ipetkov/crane"; crane.inputs.nixpkgs.follows = "nixpkgs"; - treefmt-nix.url = "github:numtide/treefmt-nix"; + treefmt-nix.url = "github:divinenaman/treefmt-nix/dioxus-cli-fmt"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; process-compose-flake.url = "github:Platonic-Systems/process-compose-flake"; cargo-doc-live.url = "github:srid/cargo-doc-live"; @@ -59,8 +59,15 @@ # cf. https://numtide.github.io/treefmt/ treefmt.config = { projectRootFile = "flake.nix"; + + settings.formatter.dioxus = { + includes = [ "src/app/*.rs" ]; + # excludes = [ "*.rs" ]; + }; + programs = { nixpkgs-fmt.enable = true; + dioxus.enable = true; rustfmt.enable = true; }; };