From 5803ada3b4912902682d72562cdd0ed85cfe4d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Mon, 1 Jan 2024 13:28:18 +0100 Subject: [PATCH] nix flake add systems input --- flake.nix | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index b666502..9a2a2a5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,22 +1,38 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; + }; + systems = { + url = "github:nix-systems/default"; + }; }; - outputs = inputs@{ nixpkgs, flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" "aarch64-linux" ]; + outputs = inputs @ { + nixpkgs, + flake-parts, + ... + }: + flake-parts.lib.mkFlake {inherit inputs;} { + systems = import inputs.systems; - perSystem = { pkgs, system, ... }: { - devShells.default = pkgs.mkShell { packages = with pkgs; [ marp-cli ]; }; + perSystem = { + pkgs, + system, + ... + }: { + devShells.default = pkgs.mkShell {packages = with pkgs; [marp-cli];}; packages.slides = pkgs.stdenvNoCC.mkDerivation { name = "slides"; src = ./.; dontUnpack = true; - buildInputs = with pkgs; [ marp-cli ]; + buildInputs = with pkgs; [marp-cli]; buildPhase = '' marp --html $src/slides.md --allow-local-files -o slides.html @@ -31,4 +47,3 @@ }; }; } -