diff --git a/flake.lock b/flake.lock index 1aa6da9..f394fea 100644 --- a/flake.lock +++ b/flake.lock @@ -1,30 +1,12 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1715037484, - "narHash": "sha256-OUt8xQFmBU96Hmm4T9tOWTu4oCswCzoVl+pxSq/kiFc=", + "lastModified": 1722415718, + "narHash": "sha256-5US0/pgxbMksF92k1+eOa8arJTJiPvsdZj9Dl+vJkM4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ad7efee13e0d216bf29992311536fce1d3eefbef", + "rev": "c3392ad349a5227f4a3464dce87bcc5046692fce", "type": "github" }, "original": { @@ -36,24 +18,8 @@ }, "root": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index e74df65..c818d66 100644 --- a/flake.nix +++ b/flake.nix @@ -1,35 +1,20 @@ { inputs = { - nixpkgs = { - url = "github:nixos/nixpkgs/nixpkgs-unstable"; - }; - - flake-utils = { - url = "github:numtide/flake-utils"; - }; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; - - outputs = { - self, - nixpkgs, - flake-utils, - ... - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - corepackEnable = pkgs.runCommand "corepack-enable" {} '' - mkdir -p $out/bin - ${pkgs.nodejs-18_x}/bin/corepack enable --install-directory $out/bin - ''; - in { - formatter = pkgs.alejandra; - devShells = { - default = pkgs.mkShell { - buildInputs = with pkgs; [ - nodejs_22 - corepackEnable - ]; - }; + outputs = {nixpkgs, ...}: let + forAllSystems = function: + nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed + (system: function nixpkgs.legacyPackages.${system}); + in { + formatter = forAllSystems (pkgs: pkgs.alejandra); + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + corepack + nodejs_22 + ]; }; }); + }; }