From 11630e54a24d8e577ec8ac883a95c5f973a9b13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Mon, 1 Jan 2024 13:26:33 +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 c74be6e..d833394 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; [ pandoc ]; }; + perSystem = { + pkgs, + system, + ... + }: { + devShells.default = pkgs.mkShell {packages = with pkgs; [pandoc];}; packages.report = pkgs.stdenvNoCC.mkDerivation { name = "report"; src = ./docs; dontUnpack = true; - buildInputs = with pkgs; [ pandoc ]; + buildInputs = with pkgs; [pandoc]; buildPhase = '' pandoc $src/rapport.md -s -o index.html --katex @@ -31,4 +47,3 @@ }; }; } -