diff options
-rw-r--r-- | flake.lock | 40 | ||||
-rw-r--r-- | flake.nix | 54 |
2 files changed, 25 insertions, 69 deletions
@@ -1,30 +1,12 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1688764204, - "narHash": "sha256-FsvK+tIvelCI0tWwlMDKfiyb7P/KfxpGbXMrdCKiT8s=", + "lastModified": 1690370995, + "narHash": "sha256-9z//23jGegLJrf3ITStLwVf715O39dq5u48Kr/XW14U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d8bb6c681cf86265fdcf3cc3119f757bbb085835", + "rev": "f3fbbc36b4e179a5985b9ab12624e9dfe7989341", "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", @@ -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 ]; }; - } - ); + }); + }; } |