diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84bf37a6..ab49afc4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: exit 1 fi - run: nix-build --show-trace -A docs.jsonModuleMaintainers - - run: nix flake check + - run: ./format --ci - run: nix-shell --show-trace . -A install - run: yes | home-manager -I home-manager=. uninstall - run: nix-shell -j auto --show-trace --arg enableBig false --pure tests -A run.all diff --git a/flake.lock b/flake.lock index 942b67b6..7cfad76c 100644 --- a/flake.lock +++ b/flake.lock @@ -18,28 +18,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1743748085, - "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 722d6c31..14a01424 100644 --- a/flake.nix +++ b/flake.nix @@ -1,20 +1,12 @@ { description = "Home Manager for Nix"; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - treefmt-nix = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; outputs = { self, nixpkgs, - treefmt-nix, ... }: { @@ -54,23 +46,9 @@ // ( let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; - - treefmtEval = forAllSystems ( - system: - treefmt-nix.lib.evalModule nixpkgs.legacyPackages.${system} { - # Formatting configuration - programs = { - nixfmt.enable = true; - }; - } - ); in { - checks = forAllSystems (system: { - formatting = treefmtEval.${system}.config.build.check self; - }); - - formatter = forAllSystems (system: treefmtEval.${system}.config.build.wrapper); + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-tree); packages = forAllSystems ( system: diff --git a/format b/format index 0abf89a2..b4b9e1d0 100755 --- a/format +++ b/format @@ -14,7 +14,7 @@ for arg do echo "$0 [-c]" exit ;; - -c) + --ci) nixfmt_args+=("$arg") ;; -*)