From 85518a2916f27e0351deafa0fd0960279bfc4b3d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 27 Nov 2022 16:08:31 +0000 Subject: [PATCH] Remove darwinModules It should be added to the nix-darwin project instead. --- ChangeLog.md | 8 ++++++++ all-modules.nix | 1 - dev/tests/eval-tests.nix | 2 -- modules/darwinModules.nix | 27 --------------------------- 4 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 modules/darwinModules.nix diff --git a/ChangeLog.md b/ChangeLog.md index 9b693f1..ed0be96 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,12 @@ +# 2022-11-27 + + - The `darwinModules` option has been removed. This was added in the early days + without full consideration. The removal will have no effect on most flakes + considering that the [`flake` option](https://flake.parts/options/flake-parts.html#opt-flake) + allows any attribute to be set. This attribute and related attributes should + be added to the nix-darwin project instead. + # 2022-10-11 - The `nixpkgs` input has been renamed to `nixpkgs-lib` to signify that the diff --git a/all-modules.nix b/all-modules.nix index 42bfdf2..039ce97 100644 --- a/all-modules.nix +++ b/all-modules.nix @@ -3,7 +3,6 @@ imports = [ ./modules/apps.nix ./modules/checks.nix - ./modules/darwinModules.nix ./modules/devShells.nix ./modules/flake.nix ./modules/formatter.nix diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index 450b6a8..276269c 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -31,7 +31,6 @@ rec { assert empty == { apps = { }; checks = { }; - darwinModules = { }; devShells = { }; formatter = { }; legacyPackages = { }; @@ -44,7 +43,6 @@ rec { assert example1 == { apps = { a = { }; b = { }; }; checks = { a = { }; b = { }; }; - darwinModules = { }; devShells = { a = { }; b = { }; }; formatter = { }; legacyPackages = { a = { }; b = { }; }; diff --git a/modules/darwinModules.nix b/modules/darwinModules.nix deleted file mode 100644 index 2e39a00..0000000 --- a/modules/darwinModules.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, self, lib, flake-parts-lib, ... }: -let - inherit (lib) - filterAttrs - mapAttrs - mkOption - optionalAttrs - types - ; - inherit (flake-parts-lib) - mkSubmoduleOptions - ; -in -{ - options = { - flake = mkSubmoduleOptions { - darwinModules = mkOption { - type = types.lazyAttrsOf types.unspecified; - default = { }; - apply = mapAttrs (k: v: { _file = "${toString self.outPath}/flake.nix#darwinModules.${k}"; imports = [ v ]; }); - description = '' - [nix-darwin](https://daiderd.com/nix-darwin/) modules. - ''; - }; - }; - }; -}