From a49c020fc8cab17eaaf012228019dc600e97d083 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 20 Oct 2024 17:36:53 -0700 Subject: [PATCH] fix(tests): Remove unthemed modules from tests --- tests/darwin.nix | 9 ++---- tests/default.nix | 6 ++-- tests/home.nix | 34 --------------------- tests/nixos.nix | 77 ++++++++++++++++++++++++----------------------- 4 files changed, 45 insertions(+), 81 deletions(-) diff --git a/tests/darwin.nix b/tests/darwin.nix index d7e230c..b7eb7b3 100644 --- a/tests/darwin.nix +++ b/tests/darwin.nix @@ -18,15 +18,9 @@ programs = { cava.enable = lib.mkForce false; # NOTE: this may actually work on darwin, but the package is currently not supported foot.enable = lib.mkForce false; - fuzzel.enable = lib.mkForce false; - hyprlock.enable = lib.mkForce false; - imv.enable = lib.mkForce false; - mpv.enable = lib.mkForce false; # NOTE: same as cava, but `mpv` fails to build currently - obs-studio.enable = lib.mkForce false; rio.enable = lib.mkForce false; # marked as broken rofi.enable = lib.mkForce false; swaylock.enable = lib.mkForce false; - tofi.enable = lib.mkForce false; waybar.enable = lib.mkForce false; }; @@ -44,4 +38,5 @@ }; } ]; -}).activationPackage +}) +.activationPackage diff --git a/tests/default.nix b/tests/default.nix index cc370e7..1da8615 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -6,11 +6,11 @@ home-manager-stable, }: lib.optionalAttrs nixpkgs.stdenv.isLinux { - nixos-test-unstable = nixpkgs.callPackage ./nixos.nix { inherit home-manager; }; - nixos-test-stable = nixpkgs-stable.callPackage ./nixos.nix { home-manager = home-manager-stable; }; + nixos-test-unstable = nixpkgs.callPackage ./nixos.nix {inherit home-manager;}; + nixos-test-stable = nixpkgs-stable.callPackage ./nixos.nix {home-manager = home-manager-stable;}; } // lib.optionalAttrs nixpkgs.stdenv.isDarwin { - darwin-test-unstable = nixpkgs.callPackage ./darwin.nix { inherit home-manager; }; + darwin-test-unstable = nixpkgs.callPackage ./darwin.nix {inherit home-manager;}; darwin-test-stable = nixpkgs-stable.callPackage ./darwin.nix { home-manager = home-manager-stable; }; diff --git a/tests/home.nix b/tests/home.nix index 751416e..8b24d7e 100644 --- a/tests/home.nix +++ b/tests/home.nix @@ -16,59 +16,25 @@ i18n.inputMethod.enabled = "fcitx5"; programs = { - aerc.enable = true; alacritty.enable = true; bat.enable = true; - bottom.enable = true; btop.enable = true; cava.enable = true; fish.enable = true; foot.enable = true; - freetube.enable = true; - fuzzel.enable = true; fzf.enable = true; - gh-dash.enable = true; - git = { - enable = true; - delta.enable = true; - }; - gitui.enable = true; - # this is enabled by default already, but still - # listing explicitly so we know it's tested - glamour.rose-pine.enable = true; helix.enable = true; - hyprlock.enable = true; - imv.enable = true; k9s.enable = true; kitty.enable = true; - lazygit.enable = true; - micro.enable = true; - mpv.enable = true; neovim.enable = true; - newsboat.enable = true; rio.enable = true; rofi.enable = true; - skim.enable = true; - spotify-player.enable = true; starship.enable = true; swaylock.enable = true; tmux.enable = true; - tofi.enable = true; - obs-studio.enable = true; waybar.enable = true; - yazi.enable = true; zathura.enable = true; zellij.enable = true; - zsh = { - enable = true; - syntaxHighlighting.enable = true; - }; - }; - - qt = { - enable = true; - platformTheme.name = "kvantum"; - style.name = "kvantum"; }; services = { diff --git a/tests/nixos.nix b/tests/nixos.nix index 9f39471..ee60f1b 100644 --- a/tests/nixos.nix +++ b/tests/nixos.nix @@ -1,46 +1,49 @@ -{ testers, home-manager }: +{ + testers, + home-manager, +}: testers.runNixOSTest { name = "module-test"; - nodes.machine = - { lib, pkgs, ... }: - { - imports = [ - home-manager.nixosModules.default - ../modules/nixos - ./common.nix - ]; + nodes.machine = { + lib, + pkgs, + ... + }: { + imports = [ + home-manager.nixosModules.default + ../modules/nixos + ./common.nix + ]; - boot = { - loader.grub.enable = true; - plymouth.enable = true; - }; - - services = { - displayManager.sddm = { - enable = true; - package = pkgs.kdePackages.sddm; # our module/the upstream port requires the qt6 version - }; - xserver.enable = true; # required for sddm - }; - - console.enable = true; - - users.users.test = { - isNormalUser = true; - home = "/home/test"; - }; - - virtualisation = { - memorySize = 4096; - writableStore = true; - }; - - home-manager.users.test = { - imports = [ ./home.nix ]; - }; + boot = { + loader.grub.enable = true; }; + services = { + displayManager.sddm = { + enable = true; + }; + xserver.enable = true; # required for sddm + }; + + console.enable = true; + + users.users.test = { + isNormalUser = true; + home = "/home/test"; + }; + + virtualisation = { + memorySize = 4096; + writableStore = true; + }; + + home-manager.users.test = { + imports = [./home.nix]; + }; + }; + testScript = _: '' machine.start() machine.wait_for_unit("home-manager-test.service")