diff --git a/flake.lock b/flake.lock index b6f9cc4..8aa200d 100644 --- a/flake.lock +++ b/flake.lock @@ -17,41 +17,7 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "utils": "utils" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "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": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 6af057f..eac39b1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,32 +1,28 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs"; - utils.url = "github:numtide/flake-utils"; }; outputs = - { - self, - nixpkgs, - utils, - }: - (utils.lib.eachDefaultSystem ( - system: - let - pkgs = import nixpkgs { + { self, nixpkgs }: + let + lib = nixpkgs.lib; + makePkgs = + system: + import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; - in - { - formatter = pkgs.nixfmt-rfc-style; - packages.default = pkgs.artemist-blog; - devShells.default = pkgs.mkShell { - buildInputs = pkgs.artemist-blog.buildInputs ++ (with pkgs; [ bundix ]); - }; - } - )) - // { + forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f (makePkgs system)); + in + { + formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); + packages = forAllSystems (pkgs: { + default = pkgs.artemist-blog; + }); + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { buildInputs = pkgs.artemist-blog.buildInputs ++ (with pkgs; [ bundix ]); }; + }); overlays.default = final: prev: { artemist-blog = let