From 267dda322449232326bce09e881b412b25271238 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 5 Apr 2024 09:02:00 -0400 Subject: [PATCH] chore: Add missing imports to tests Necessary since system now depends on home-manager and desktop depends on stylix, which also depends on home-manager. Note that since conditional imports can't be used and we include the system module inside of our containers which don't have access to self, importing the required modules inside the module itself cannot be used. --- tests/hyprland.nix | 13 ++++++++----- tests/neovim.nix | 12 +++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/hyprland.nix b/tests/hyprland.nix index cd0d4824..b516dd0a 100644 --- a/tests/hyprland.nix +++ b/tests/hyprland.nix @@ -1,12 +1,15 @@ # TODO: Write test to ensure that Hyprland starts with basic config -(import ./lib.nix) { +let + inherit (builtins) attrValues; +in (import ./lib.nix) { name = "hyprland"; nodes.machine = { self, pkgs, ... }: { - imports = with self.nixosModules; [ - system - desktop - ]; + imports = attrValues { + inherit (self.inputs.home-manager.nixosModules) home-manager; + inherit (self.inputs.stylix.nixosModules) stylix; + inherit (self.nixosModules) system desktop; + }; }; testScript = /* python */ '' diff --git a/tests/neovim.nix b/tests/neovim.nix index 1c50f63f..30ef3f23 100644 --- a/tests/neovim.nix +++ b/tests/neovim.nix @@ -1,12 +1,14 @@ # TODO: Ensure that neovim config works without errors on startup -(import ./lib.nix) { +let + inherit (builtins) attrValues; +in (import ./lib.nix) { name = "neovim"; nodes.machine = { self, pkgs, ... }: { - imports = with self.nixosModules; [ - system - shell - ]; + imports = attrValues { + inherit (self.inputs.home-manager.nixosModules) home-manager; + inherit (self.nixosModules) system shell; + }; }; testScript = /* python */ ''