diff --git a/.envrc b/.envrc index 1d953f4..8392d15 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix +use flake \ No newline at end of file diff --git a/flake.lock b/flake.lock index 75a52c4..239c32d 100644 --- a/flake.lock +++ b/flake.lock @@ -59,6 +59,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1619345332, "narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=", @@ -73,7 +88,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -148,7 +163,7 @@ }, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -383,7 +398,7 @@ }, "pre-commit-hooks-nix": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { @@ -404,6 +419,7 @@ "root": { "inputs": { "darwin": "darwin", + "flake-utils": "flake-utils", "hercules-ci-agent": "hercules-ci-agent", "himalaya": "himalaya", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 36372d6..a9c350a 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,8 @@ darwin.url = "github:lnl7/nix-darwin/master"; darwin.inputs.nixpkgs.follows = "nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + flake-utils.inputs.nixpkgs.follows = "nixpkgs"; nixos-hardware.url = github:NixOS/nixos-hardware/master; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -163,6 +165,22 @@ air = defaultMacosSystem; sky = defaultMacosSystem; }; - }; + + + } // + inputs.flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" ] (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + treefmt + nixpkgs-fmt + # To enable webhint to analyze source files + nodejs + ]; + }; + } + ); } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 8efeb05..0000000 --- a/shell.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs ? import { }, ... }: -pkgs.mkShell { - buildInputs = with pkgs; [ - treefmt - nixpkgs-fmt - # To enable webhint to analyze source files - nodejs - ]; -}