From 621c26fd90f9b5687e450bdbe5d44091bc4fbac4 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 14 Jun 2022 22:52:14 -0400 Subject: [PATCH] fix nixosModule warning --- flake.nix | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 2c29d98..e9e8ce2 100644 --- a/flake.nix +++ b/flake.nix @@ -27,12 +27,11 @@ }; }; - in - { - lib = { inherit forAllSystems hardware deploy; }; - - nixosModules = - { inherit pins; } // + mods = + { + inherit pins; + pkgs.nixpkgs.overlays = [ (_: mypkgs) ]; + } // nixpkgs.lib.mapAttrs' (name: type: { name = nixpkgs.lib.removeSuffix ".nix" name; @@ -40,15 +39,14 @@ }) (builtins.readDir ./modules); - nixosModule = { - imports = builtins.attrValues self.nixosModules; - nixpkgs.overlays = [ - (_: mypkgs) - ]; - }; + in + { + lib = { inherit forAllSystems hardware deploy; }; + + nixosModules = mods // { default.imports = builtins.attrValues mods; }; nixosConfigurations = - import ./hosts nixpkgs hardware self.nixosModule; + import ./hosts nixpkgs hardware self.nixosModules.default; apps = forAllSystems (system: import lib/apps.nix nixpkgs.legacyPackages.${system});