From 6fe1e93a34aed2b3bcd98b5fb6bc1c8c1790d2e7 Mon Sep 17 00:00:00 2001 From: Alexandre Jesus Date: Tue, 1 Aug 2023 13:11:58 +0100 Subject: Remove unecessary flake-utils --- flake.nix | 54 ++++++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 32 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 0c21a28..5dcb756 100644 --- a/flake.nix +++ b/flake.nix @@ -1,26 +1,26 @@ { - description = "My personal website"; + description = "adbjesus.com website"; inputs = { nixpkgs = { url = "github:nixos/nixpkgs/nixos-23.05"; }; - - flake-utils = { - url = "github:numtide/flake-utils"; - }; }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; }; - in rec { - packages.website = pkgs.stdenv.mkDerivation { - name = "website"; - src = self; - - buildInputs = [ pkgs.zola ]; + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" ]; + forAllSystems = function: + nixpkgs.lib.genAttrs systems (system: function nixpkgs.legacyPackages.${system}); + in rec { + packages = nixpkgs.lib.genAttrs systems (system: { + adbjesus-website = nixpkgs.legacyPackages.${system}.stdenv.mkDerivation { + name = "adbjesus-website"; + src = ./.; + + buildInputs = with nixpkgs.legacyPackages.${system}; [ + zola + ]; buildPhase = '' zola build @@ -32,24 +32,14 @@ ''; }; - packages.default = self.packages.${system}.website; - - apps.default = flake-utils.lib.mkApp { - drv = pkgs.writeShellApplication { - name = "serve"; + default = self.packages.${system}.adbjesus-website; + }); - runtimeInputs = [ pkgs.zola ]; - - text = '' - zola serve - ''; - }; - }; - - devShells.default = pkgs.mkShell { - inputsFrom = [ self.packages.${system}.website ]; + devShells = nixpkgs.lib.genAttrs systems (system: { + default = nixpkgs.legacyPackages.${system}.mkShell { + inputsFrom = [ self.packages.${system}.adbjesus-website ]; }; - } - ); + }); + }; } -- cgit v1.2.3