From 88669ec19c59ddfaf7ab4929ad71d82bf92fbc2e Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 8 Apr 2025 17:52:30 +0200 Subject: [PATCH 1/2] flake-parts: ensure `flake.darwinConfigurations` is mergeable We didn't run into issues previously for `nixosConfigurations` because there is already a [flake-parts module] that creates the option inside `flake`. [flake-parts module]: https://github.com/hercules-ci/flake-parts/blob/main/modules/nixosConfigurations.nix --- flakeModules/clan.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flakeModules/clan.nix b/flakeModules/clan.nix index a78ac5aad..21530f0c2 100644 --- a/flakeModules/clan.nix +++ b/flakeModules/clan.nix @@ -44,11 +44,12 @@ in }; }; - options.flake = - flake-parts-lib.mkSubmoduleOptions { + options.flake = flake-parts-lib.mkSubmoduleOptions ( + { clan = lib.mkOption { type = types.raw; }; } - // outputModule.topLevel.options; + // outputModule.topLevel.options + ); config = { flake = { clan = outputModule.clan; From 1079fb78123d9700edc8837eef7339cee165d914 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 8 Apr 2025 18:03:26 +0200 Subject: [PATCH 2/2] flake-parts: remove unnecessary `mkSubmoduleOptions` This is no longer necessary as of https://github.com/NixOS/nixpkgs/pull/156533. --- flakeModules/clan.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/flakeModules/clan.nix b/flakeModules/clan.nix index 21530f0c2..4c3456998 100644 --- a/flakeModules/clan.nix +++ b/flakeModules/clan.nix @@ -2,7 +2,6 @@ clan-core: { config, lib, - flake-parts-lib, self, inputs, ... @@ -44,12 +43,10 @@ in }; }; - options.flake = flake-parts-lib.mkSubmoduleOptions ( - { - clan = lib.mkOption { type = types.raw; }; - } - // outputModule.topLevel.options - ); + options.flake = { + clan = lib.mkOption { type = types.raw; }; + } // outputModule.topLevel.options; + config = { flake = { clan = outputModule.clan;