Skip to content

Commit

Permalink
chore: Simplify tests
Browse files Browse the repository at this point in the history
Removes the redundant `self`.
  • Loading branch information
donovanglover committed Apr 5, 2024
1 parent 22e31ff commit 41ce567
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ in
(import ./lib.nix) {
name = "hyprland";

nodes.machine = { self, pkgs, ... }: {
nodes.machine = { nix-config, ... }: {
imports = attrValues {
inherit (self.nixosModules) system desktop;
inherit (nix-config.nixosModules) system desktop;
};
};

Expand Down
11 changes: 6 additions & 5 deletions tests/lib.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
test: { pkgs, self }:
test: { self, pkgs }:
let
inherit (pkgs) lib;
inherit (pkgs.lib) mkDefault;
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest {
imports = [ test ];

hostPkgs = pkgs;
defaults.documentation.enable = lib.mkDefault false;
defaults.documentation.enable = mkDefault false;

node.specialArgs = {
inherit self;
nix-config = self;
};
imports = [ test ];
}).config.result
4 changes: 2 additions & 2 deletions tests/neovim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ in
(import ./lib.nix) {
name = "neovim";

nodes.machine = { self, pkgs, ... }: {
nodes.machine = { nix-config, ... }: {
imports = attrValues {
inherit (self.nixosModules) system shell;
inherit (nix-config.nixosModules) system shell;
};
};

Expand Down

0 comments on commit 41ce567

Please sign in to comment.