From fc8206e7a61d7eb02006f9010e62ebdb3336d0d2 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 28 Sep 2023 12:07:36 +0300 Subject: [PATCH] flake: utilize nix-systems for overridable flake systems nix-systems introduces a brand-new pattern that allows the end user to add or remove systems from the list of supported systems to the flake See https://github.com/nix-systems/nix-systems for more details --- flake.lock | 16 ++++++++++++++++ flake.nix | 10 ++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index f939c12..bc72a53 100644 --- a/flake.lock +++ b/flake.lock @@ -1501,6 +1501,7 @@ "scrollbar-nvim": "scrollbar-nvim", "smartcolumn": "smartcolumn", "sqls-nvim": "sqls-nvim", + "systems": "systems_2", "tabular": "tabular", "telescope": "telescope", "tidalcycles": "tidalcycles", @@ -1639,6 +1640,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tabular": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 48a280f..e287dc1 100644 --- a/flake.nix +++ b/flake.nix @@ -7,12 +7,9 @@ ... } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { - systems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; + # provide overridable systems + # https://github.com/nix-systems/nix-systems + systems = import inputs.systems; imports = [ # add lib to module args @@ -55,6 +52,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-utils.url = "github:numtide/flake-utils"; + systems.url = "github:nix-systems/default"; # For generating documentation website nmd = {