From 478954208b5dd21bbca1601434ec4e6df76cf0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Mon, 1 Jan 2024 13:29:34 +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 8c01cb5..b2f0aba 100644 --- a/flake.nix +++ b/flake.nix @@ -1,23 +1,39 @@ { 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, ... }: { + perSystem = { + pkgs, + system, + ... + }: { devShells.default = - pkgs.mkShell { packages = with pkgs; [ marp-cli ]; }; + 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 @@ -32,4 +48,3 @@ }; }; } -