From 428b3a54cabd0fd93fa487979e225c43de679785 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:21:47 +0200 Subject: [PATCH 1/3] Add systems input to leverage extensible flake systems pattern Add the systems input to transitively leverage the "externally extensible flake systems" [1] pattern. [1]: https://github.com/nix-systems/nix-systems --- flake.lock | 5 ++++- flake.nix | 8 +++++++- nix/tests/default.nix | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 4f993667..45000024 100644 --- a/flake.lock +++ b/flake.lock @@ -36,6 +36,7 @@ "inputs": { "flake-compat": "flake-compat", "nixpkgs": "nixpkgs", + "systems": "systems", "utils": "utils" } }, @@ -56,7 +57,9 @@ }, "utils": { "inputs": { - "systems": "systems" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1731533236, diff --git a/flake.nix b/flake.nix index 465f2123..e4446ca1 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - utils.url = "github:numtide/flake-utils"; + systems.url = "github:nix-systems/default"; + + utils = { + url = "github:numtide/flake-utils"; + inputs.systems.follows = "systems"; + }; + flake-compat = { url = "github:edolstra/flake-compat"; flake = false; diff --git a/nix/tests/default.nix b/nix/tests/default.nix index 3ee755a2..3ae67a23 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -50,11 +50,11 @@ let flakeInputs = '' deploy-rs.url = "${../..}"; deploy-rs.inputs.utils.follows = "utils"; + deploy-rs.inputs.systems.follows = "systems"; deploy-rs.inputs.flake-compat.follows = "flake-compat"; nixpkgs.url = "${inputs.nixpkgs}"; utils.url = "${inputs.utils}"; - utils.inputs.systems.follows = "systems"; systems.url = "${inputs.utils.inputs.systems}"; flake-compat.url = "${inputs.flake-compat}"; flake-compat.flake = false; From 1686c4e1d45be322bdba161cc8bb3468e782107c Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:31:49 +0200 Subject: [PATCH 2/3] Conventionally rename 'utils' input to 'flake-utils' --- flake.lock | 44 +++++++++++++++++++++---------------------- flake.nix | 6 +++--- nix/tests/default.nix | 6 +++--- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index 45000024..07dfb03b 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,26 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1743014863, @@ -35,9 +55,9 @@ "root": { "inputs": { "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "systems": "systems", - "utils": "utils" + "systems": "systems" } }, "systems": { @@ -54,26 +74,6 @@ "repo": "default", "type": "github" } - }, - "utils": { - "inputs": { - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index e4446ca1..ba182ee0 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; systems.url = "github:nix-systems/default"; - utils = { + flake-utils = { url = "github:numtide/flake-utils"; inputs.systems.follows = "systems"; }; @@ -21,7 +21,7 @@ }; }; - outputs = { self, nixpkgs, utils, ... }@inputs: + outputs = { self, nixpkgs, flake-utils, ... }@inputs: { overlays.default = final: prev: { @@ -151,7 +151,7 @@ }; }; } // - utils.lib.eachSystem (utils.lib.defaultSystems ++ ["aarch64-darwin"]) (system: + flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems ++ ["aarch64-darwin"]) (system: let pkgs = import nixpkgs { inherit system; diff --git a/nix/tests/default.nix b/nix/tests/default.nix index 3ae67a23..c97c693e 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -49,13 +49,13 @@ let flakeInputs = '' deploy-rs.url = "${../..}"; - deploy-rs.inputs.utils.follows = "utils"; + deploy-rs.inputs.flake-utils.follows = "flake-utils"; deploy-rs.inputs.systems.follows = "systems"; deploy-rs.inputs.flake-compat.follows = "flake-compat"; nixpkgs.url = "${inputs.nixpkgs}"; - utils.url = "${inputs.utils}"; - systems.url = "${inputs.utils.inputs.systems}"; + flake-utils.url = "${inputs.flake-utils}"; + systems.url = "${inputs.flake-utils.inputs.systems}"; flake-compat.url = "${inputs.flake-compat}"; flake-compat.flake = false; From 710f9d7c1a5a47af49a43581c716c657b98967db Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:08:00 +0200 Subject: [PATCH 3/3] Remove redundant aarch64-darwin system already present by default Remove the explicitly added aarch64-darwin system that is already included in the default systems input. Maybe this was not the case at the time of commit ed1ee1d86684 ("add aarch64-darwin to built systems") from four years ago. Reverts: ed1ee1d86684 ("add aarch64-darwin to built systems") --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ba182ee0..bd458167 100644 --- a/flake.nix +++ b/flake.nix @@ -151,7 +151,7 @@ }; }; } // - flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems ++ ["aarch64-darwin"]) (system: + flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system;