summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-05-17 20:24:46 -0300
committerGitHub <noreply@github.com>2023-05-17 20:24:46 -0300
commitc637afe9c187098c6780963212f409426a19b465 (patch)
tree50f0ac9510b72462f207c5fa2c0ce53cdad57f7b
parent3c41d044393239c3574268a60062a6c3ca74d3c7 (diff)
parentaec8dddef7af66a7a4dc93449a23bdf638d342b6 (diff)
downloadnixpkgs-c637afe9c187098c6780963212f409426a19b465.tar
nixpkgs-c637afe9c187098c6780963212f409426a19b465.tar.gz
nixpkgs-c637afe9c187098c6780963212f409426a19b465.tar.bz2
nixpkgs-c637afe9c187098c6780963212f409426a19b465.tar.lz
nixpkgs-c637afe9c187098c6780963212f409426a19b465.tar.xz
nixpkgs-c637afe9c187098c6780963212f409426a19b465.tar.zst
nixpkgs-c637afe9c187098c6780963212f409426a19b465.zip
Merge pull request #229030 from atorres1985-contrib/with-lib-is-bad
With lib is bad: removes `with lib;` occurrences - part I
-rw-r--r--nixos/maintainers/scripts/cloudstack/cloudstack-image.nix2
-rw-r--r--nixos/maintainers/scripts/lxd/lxd-image-inner.nix2
-rw-r--r--nixos/maintainers/scripts/lxd/lxd-image.nix2
-rw-r--r--nixos/maintainers/scripts/lxd/nix.tpl2
-rw-r--r--nixos/modules/rename.nix7
-rw-r--r--nixos/tests/3proxy.nix4
-rw-r--r--nixos/tests/apparmor.nix7
-rw-r--r--nixos/tests/atuin.nix3
-rw-r--r--nixos/tests/bazarr.nix4
-rw-r--r--nixos/tests/boot-stage1.nix4
-rw-r--r--nixos/tests/budgie.nix4
-rw-r--r--nixos/tests/cadvisor.nix8
-rw-r--r--nixos/tests/calibre-web.nix3
-rw-r--r--nixos/tests/cinnamon.nix4
-rw-r--r--nixos/tests/common/acme/server/default.nix10
-rw-r--r--nixos/tests/common/auto.nix19
-rw-r--r--nixos/tests/convos.nix6
-rw-r--r--nixos/tests/couchdb.nix14
-rw-r--r--nixos/tests/doas.nix4
-rw-r--r--nixos/tests/doh-proxy-rust.nix4
-rw-r--r--nixos/tests/esphome.nix3
-rw-r--r--nixos/tests/fluidd.nix4
-rw-r--r--nixos/tests/gitlab.nix16
-rw-r--r--nixos/tests/gnome-flashback.nix11
-rw-r--r--nixos/tests/gnome-xorg.nix4
-rw-r--r--nixos/tests/gnome.nix4
-rw-r--r--nixos/tests/hadoop/hdfs.nix7
-rw-r--r--nixos/tests/hardened.nix1
-rw-r--r--nixos/tests/hibernate.nix4
-rw-r--r--nixos/tests/iftop.nix4
-rw-r--r--nixos/tests/jackett.nix4
-rw-r--r--nixos/tests/jirafeau.nix4
-rw-r--r--nixos/tests/komga.nix4
-rw-r--r--nixos/tests/libreddit.nix4
-rw-r--r--nixos/tests/lidarr.nix4
-rw-r--r--nixos/tests/miniflux.nix3
-rw-r--r--nixos/tests/misc.nix15
-rw-r--r--nixos/tests/mpv.nix4
-rw-r--r--nixos/tests/n8n.nix5
-rw-r--r--nixos/tests/nfs/kerberos.nix2
-rw-r--r--nixos/tests/noto-fonts.nix4
-rw-r--r--nixos/tests/nzbhydra2.nix5
-rw-r--r--nixos/tests/oci-containers.nix5
-rw-r--r--nixos/tests/odoo.nix6
-rw-r--r--nixos/tests/ombi.nix4
-rw-r--r--nixos/tests/pantheon.nix4
-rw-r--r--nixos/tests/please.nix8
-rw-r--r--nixos/tests/polaris.nix4
-rw-r--r--nixos/tests/prowlarr.nix4
-rw-r--r--nixos/tests/quake3.nix6
-rw-r--r--nixos/tests/radarr.nix4
-rw-r--r--nixos/tests/readarr.nix8
-rw-r--r--nixos/tests/redis.nix10
-rw-r--r--nixos/tests/sonarr.nix4
-rw-r--r--nixos/tests/sudo.nix8
-rw-r--r--nixos/tests/systemd-timesyncd.nix4
-rw-r--r--nixos/tests/tor.nix8
-rw-r--r--nixos/tests/ulogd.nix4
-rw-r--r--nixos/tests/uptime-kuma.nix4
-rw-r--r--nixos/tests/xautolock.nix4
-rw-r--r--nixos/tests/xss-lock.nix8
-rw-r--r--nixos/tests/yabar.nix10
62 files changed, 109 insertions, 237 deletions
diff --git a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
index 005f75476e9..b66ee5d7b9b 100644
--- a/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
+++ b/nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
@@ -2,8 +2,6 @@
 
 { config, lib, pkgs, ... }:
 
-with lib;
-
 {
   imports =
     [ ../../../modules/virtualisation/cloudstack-config.nix ];
diff --git a/nixos/maintainers/scripts/lxd/lxd-image-inner.nix b/nixos/maintainers/scripts/lxd/lxd-image-inner.nix
index ee55da1e9ce..c1a9b1aacd1 100644
--- a/nixos/maintainers/scripts/lxd/lxd-image-inner.nix
+++ b/nixos/maintainers/scripts/lxd/lxd-image-inner.nix
@@ -4,8 +4,6 @@
 
 { config, pkgs, lib, ... }:
 
-with lib;
-
 {
   imports =
     [ # Include the default lxd configuration.
diff --git a/nixos/maintainers/scripts/lxd/lxd-image.nix b/nixos/maintainers/scripts/lxd/lxd-image.nix
index cf30836dffe..07605c5c312 100644
--- a/nixos/maintainers/scripts/lxd/lxd-image.nix
+++ b/nixos/maintainers/scripts/lxd/lxd-image.nix
@@ -1,7 +1,5 @@
 { lib, config, pkgs, ... }:
 
-with lib;
-
 {
   imports = [
     ../../../modules/virtualisation/lxc-container.nix
diff --git a/nixos/maintainers/scripts/lxd/nix.tpl b/nixos/maintainers/scripts/lxd/nix.tpl
index 307258ddc62..25ae1bc399f 100644
--- a/nixos/maintainers/scripts/lxd/nix.tpl
+++ b/nixos/maintainers/scripts/lxd/nix.tpl
@@ -1,7 +1,5 @@
 { lib, config, pkgs, ... }:
 
-with lib;
-
 # WARNING: THIS CONFIGURATION IS AUTOGENERATED AND WILL BE OVERWRITTEN AUTOMATICALLY
 
 {
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 45a27029dff..a4a2c316fd6 100644
--- a/nixos/modules/rename.nix
+++ b/nixos/modules/rename.nix
@@ -1,7 +1,10 @@
 { lib, pkgs, ... }:
 
-with lib;
-
+let
+  inherit (lib)
+    mkAliasOptionModuleMD
+    mkRemovedOptionModule;
+in
 {
   imports = [
     /*
diff --git a/nixos/tests/3proxy.nix b/nixos/tests/3proxy.nix
index 647d9d57c7f..83d39de018a 100644
--- a/nixos/tests/3proxy.nix
+++ b/nixos/tests/3proxy.nix
@@ -1,8 +1,6 @@
 { lib, pkgs, ... }: {
   name = "3proxy";
-  meta = with lib.maintainers; {
-    maintainers = [ misuzu ];
-  };
+  meta.maintainers = with lib.maintainers; [ misuzu ];
 
   nodes = {
     peer0 = { lib, ... }: {
diff --git a/nixos/tests/apparmor.nix b/nixos/tests/apparmor.nix
index f85bff0295e..99a5cd558eb 100644
--- a/nixos/tests/apparmor.nix
+++ b/nixos/tests/apparmor.nix
@@ -1,14 +1,11 @@
 import ./make-test-python.nix ({ pkgs, ... } : {
   name = "apparmor";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ julm ];
-  };
+  meta.maintainers = with lib.maintainers; [ julm ];
 
   nodes.machine =
     { lib, pkgs, config, ... }:
-    with lib;
     {
-      security.apparmor.enable = mkDefault true;
+      security.apparmor.enable = lib.mkDefault true;
     };
 
   testScript =
diff --git a/nixos/tests/atuin.nix b/nixos/tests/atuin.nix
index 2bc5494f555..9f23a3cf671 100644
--- a/nixos/tests/atuin.nix
+++ b/nixos/tests/atuin.nix
@@ -6,10 +6,9 @@ let
   testPass = "password";
   testEmail = "test.testerman@test.com";
 in
-with lib;
 {
   name = "atuin";
-  meta.maintainers = with pkgs.lib.maintainers; [ devusb ];
+  meta.maintainers = with lib.maintainers; [ devusb ];
 
   nodes = {
     server =
diff --git a/nixos/tests/bazarr.nix b/nixos/tests/bazarr.nix
index e59833e5e94..aa0550e243a 100644
--- a/nixos/tests/bazarr.nix
+++ b/nixos/tests/bazarr.nix
@@ -1,13 +1,11 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 let
   port = 42069;
 in
 {
   name = "bazarr";
-  meta.maintainers = with maintainers; [ d-xo ];
+  meta.maintainers = with lib.maintainers; [ d-xo ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/boot-stage1.nix b/nixos/tests/boot-stage1.nix
index fbe82d61afa..7bef34f4cc3 100644
--- a/nixos/tests/boot-stage1.nix
+++ b/nixos/tests/boot-stage1.nix
@@ -107,8 +107,8 @@ import ./make-test-python.nix ({ pkgs, ... }: {
         '';
       };
 
-      copyCanaries = with lib; concatMapStrings (canary: ''
-        ${optionalString (canary ? child) ''
+      copyCanaries = lib.concatMapStrings (canary: ''
+        ${lib.optionalString (canary ? child) ''
           copy_bin_and_libs "${canary.child}/bin/${canary.child.name}"
         ''}
         copy_bin_and_libs "${canary}/bin/${canary.name}"
diff --git a/nixos/tests/budgie.nix b/nixos/tests/budgie.nix
index 8fe32bb26fb..b1b0e618c88 100644
--- a/nixos/tests/budgie.nix
+++ b/nixos/tests/budgie.nix
@@ -1,9 +1,7 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "budgie";
 
-  meta = with lib; {
-    maintainers = [ maintainers.federicoschonborn ];
-  };
+  meta.maintainers = [ lib.maintainers.federicoschonborn ];
 
   nodes.machine = { ... }: {
     imports = [
diff --git a/nixos/tests/cadvisor.nix b/nixos/tests/cadvisor.nix
index c372dea301d..70e068fcf21 100644
--- a/nixos/tests/cadvisor.nix
+++ b/nixos/tests/cadvisor.nix
@@ -1,15 +1,13 @@
-import ./make-test-python.nix ({ pkgs, ... } : {
+import ./make-test-python.nix ({ lib, pkgs, ... } : {
   name = "cadvisor";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ offline ];
-  };
+  meta.maintainers = with lib.maintainers; [ offline ];
 
   nodes = {
     machine = { ... }: {
       services.cadvisor.enable = true;
     };
 
-    influxdb = { lib, ... }: with lib; {
+    influxdb = { lib, ... }: {
       services.cadvisor.enable = true;
       services.cadvisor.storageDriver = "influxdb";
       services.influxdb.enable = true;
diff --git a/nixos/tests/calibre-web.nix b/nixos/tests/calibre-web.nix
index 9832d546978..aea9bca3ebe 100644
--- a/nixos/tests/calibre-web.nix
+++ b/nixos/tests/calibre-web.nix
@@ -5,10 +5,9 @@ import ./make-test-python.nix (
       port = 3142;
       defaultPort = 8083;
     in
-      with lib;
       {
         name = "calibre-web";
-        meta.maintainers = with pkgs.lib.maintainers; [ pborzenkov ];
+        meta.maintainers = with lib.maintainers; [ pborzenkov ];
 
         nodes = {
           customized = { pkgs, ... }: {
diff --git a/nixos/tests/cinnamon.nix b/nixos/tests/cinnamon.nix
index f0add414292..e455d96c4fb 100644
--- a/nixos/tests/cinnamon.nix
+++ b/nixos/tests/cinnamon.nix
@@ -1,9 +1,7 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "cinnamon";
 
-  meta = with lib; {
-    maintainers = teams.cinnamon.members;
-  };
+  meta.maintainers = lib.teams.cinnamon.members;
 
   nodes.machine = { nodes, ... }: {
     imports = [ ./common/user-account.nix ];
diff --git a/nixos/tests/common/acme/server/default.nix b/nixos/tests/common/acme/server/default.nix
index b81f860125c..2a2e3b08a1d 100644
--- a/nixos/tests/common/acme/server/default.nix
+++ b/nixos/tests/common/acme/server/default.nix
@@ -76,9 +76,9 @@ let
 in {
   imports = [ ../../resolver.nix ];
 
-  options.test-support.acme = with lib; {
-    caDomain = mkOption {
-      type = types.str;
+  options.test-support.acme = {
+    caDomain = lib.mkOption {
+      type = lib.types.str;
       readOnly = true;
       default = domain;
       description = lib.mdDoc ''
@@ -86,8 +86,8 @@ in {
         identify the CA server.
       '';
     };
-    caCert = mkOption {
-      type = types.path;
+    caCert = lib.mkOption {
+      type = lib.types.path;
       readOnly = true;
       default = testCerts.ca.cert;
       description = lib.mdDoc ''
diff --git a/nixos/tests/common/auto.nix b/nixos/tests/common/auto.nix
index f2ab82f88ff..ac56bed4a88 100644
--- a/nixos/tests/common/auto.nix
+++ b/nixos/tests/common/auto.nix
@@ -1,23 +1,16 @@
 { config, lib, ... }:
 
-with lib;
-
 let
-
   dmcfg = config.services.xserver.displayManager;
   cfg = config.test-support.displayManager.auto;
-
 in
-
 {
 
   ###### interface
 
   options = {
-
     test-support.displayManager.auto = {
-
-      enable = mkOption {
+      enable = lib.mkOption {
         default = false;
         description = lib.mdDoc ''
           Whether to enable the fake "auto" display manager, which
@@ -27,20 +20,16 @@ in
         '';
       };
 
-      user = mkOption {
+      user = lib.mkOption {
         default = "root";
         description = lib.mdDoc "The user account to login automatically.";
       };
-
     };
-
   };
 
-
   ###### implementation
 
-  config = mkIf cfg.enable {
-
+  config = lib.mkIf cfg.enable {
     services.xserver.displayManager = {
       lightdm.enable = true;
       autoLogin = {
@@ -62,7 +51,5 @@ in
 
         session  include   lightdm
     '';
-
   };
-
 }
diff --git a/nixos/tests/convos.nix b/nixos/tests/convos.nix
index a5dafed8f6f..8fe5892da9e 100644
--- a/nixos/tests/convos.nix
+++ b/nixos/tests/convos.nix
@@ -1,14 +1,12 @@
 import ./make-test-python.nix ({ lib, pkgs, ... }:
 
-with lib;
+
 let
   port = 3333;
 in
 {
   name = "convos";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ sgo ];
-  };
+  meta.maintainers = with lib.maintainers; [ sgo ];
 
   nodes = {
     machine =
diff --git a/nixos/tests/couchdb.nix b/nixos/tests/couchdb.nix
index b57072d6be2..cf6ca8e4548 100644
--- a/nixos/tests/couchdb.nix
+++ b/nixos/tests/couchdb.nix
@@ -1,9 +1,8 @@
 let
-
   makeNode = couchpkg: user: passwd:
     { pkgs, ... } :
 
-      { environment.systemPackages = with pkgs; [ jq ];
+      { environment.systemPackages = [ pkgs.jq ];
         services.couchdb.enable = true;
         services.couchdb.package = couchpkg;
         services.couchdb.adminUser = user;
@@ -12,16 +11,11 @@ let
   testuser = "testadmin";
   testpass = "cowabunga";
   testlogin = "${testuser}:${testpass}@";
-
-in import ./make-test-python.nix ({ pkgs, lib, ...}:
-
-with lib;
-
+in
+import ./make-test-python.nix ({ pkgs, lib, ...}:
 {
   name = "couchdb";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ ];
-  };
+  meta.maintainers = [ ];
 
   nodes = {
     couchdb3 = makeNode pkgs.couchdb3 testuser testpass;
diff --git a/nixos/tests/doas.nix b/nixos/tests/doas.nix
index 3713c728195..2aa8b02caf5 100644
--- a/nixos/tests/doas.nix
+++ b/nixos/tests/doas.nix
@@ -2,9 +2,7 @@
 import ./make-test-python.nix (
   { lib, ... }: {
     name = "doas";
-    meta = with lib.maintainers; {
-      maintainers = [ cole-h ];
-    };
+    meta.maintainers = with lib.maintainers; [ cole-h ];
 
     nodes.machine =
       { ... }:
diff --git a/nixos/tests/doh-proxy-rust.nix b/nixos/tests/doh-proxy-rust.nix
index 11ed87d23bb..8c743fe77e3 100644
--- a/nixos/tests/doh-proxy-rust.nix
+++ b/nixos/tests/doh-proxy-rust.nix
@@ -1,8 +1,6 @@
 import ./make-test-python.nix ({ lib, pkgs, ... }: {
   name = "doh-proxy-rust";
-  meta = with lib.maintainers; {
-    maintainers = [ stephank ];
-  };
+  meta.maintainers = with lib.maintainers; [ stephank ];
 
   nodes = {
     machine = { pkgs, lib, ... }: {
diff --git a/nixos/tests/esphome.nix b/nixos/tests/esphome.nix
index b8dbdb0b379..5a318b65a72 100644
--- a/nixos/tests/esphome.nix
+++ b/nixos/tests/esphome.nix
@@ -4,10 +4,9 @@ let
   testPort = 6052;
   unixSocket = "/run/esphome/esphome.sock";
 in
-with lib;
 {
   name = "esphome";
-  meta.maintainers = with pkgs.lib.maintainers; [ oddlama ];
+  meta.maintainers = with lib.maintainers; [ oddlama ];
 
   nodes = {
     esphomeTcp = { ... }:
diff --git a/nixos/tests/fluidd.nix b/nixos/tests/fluidd.nix
index f49a4110d71..82a2c1e4049 100644
--- a/nixos/tests/fluidd.nix
+++ b/nixos/tests/fluidd.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "fluidd";
-  meta.maintainers = with maintainers; [ vtuan10 ];
+  meta.maintainers = with lib.maintainers; [ vtuan10 ];
 
   nodes.machine = { pkgs, ... }: {
     services.fluidd = {
diff --git a/nixos/tests/gitlab.nix b/nixos/tests/gitlab.nix
index 672b497e7ec..d4e7603c20c 100644
--- a/nixos/tests/gitlab.nix
+++ b/nixos/tests/gitlab.nix
@@ -11,8 +11,6 @@
 
 { pkgs, lib, ... }:
 
-with lib;
-
 let
   inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
   initialRootPassword = "notproduction";
@@ -30,9 +28,7 @@ let
   bobProjectId = "3";
 in {
   name = "gitlab";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ globin yayayayaka ];
-  };
+  meta.maintainers = with lib.maintainers; [ globin yayayayaka ];
 
   nodes = {
     gitlab = { ... }: {
@@ -43,10 +39,10 @@ in {
       virtualisation.useNixStoreImage = true;
       virtualisation.writableStore = false;
 
-      systemd.services.gitlab.serviceConfig.Restart = mkForce "no";
-      systemd.services.gitlab-workhorse.serviceConfig.Restart = mkForce "no";
-      systemd.services.gitaly.serviceConfig.Restart = mkForce "no";
-      systemd.services.gitlab-sidekiq.serviceConfig.Restart = mkForce "no";
+      systemd.services.gitlab.serviceConfig.Restart = lib.mkForce "no";
+      systemd.services.gitlab-workhorse.serviceConfig.Restart = lib.mkForce "no";
+      systemd.services.gitaly.serviceConfig.Restart = lib.mkForce "no";
+      systemd.services.gitlab-sidekiq.serviceConfig.Restart = lib.mkForce "no";
 
       services.nginx = {
         enable = true;
@@ -195,7 +191,7 @@ in {
         gitlab.succeed(
             "echo \"Authorization: Bearer $(curl -X POST -H 'Content-Type: application/json' -d @${auth} http://gitlab/oauth/token | ${pkgs.jq}/bin/jq -r '.access_token')\" >/tmp/headers"
         )
-      '' + optionalString doSetup ''
+      '' + lib.optionalString doSetup ''
         with subtest("Create user Alice"):
             gitlab.succeed(
                 """[ "$(curl -o /dev/null -w '%{http_code}' -X POST -H 'Content-Type: application/json' -H @/tmp/headers -d @${createUserAlice} http://gitlab/api/v4/users)" = "201" ]"""
diff --git a/nixos/tests/gnome-flashback.nix b/nixos/tests/gnome-flashback.nix
index c97264e6928..70569db797e 100644
--- a/nixos/tests/gnome-flashback.nix
+++ b/nixos/tests/gnome-flashback.nix
@@ -1,12 +1,11 @@
 import ./make-test-python.nix ({ pkgs, lib, ...} : {
   name = "gnome-flashback";
-  meta = with lib; {
-    maintainers = teams.gnome.members ++ [ maintainers.chpatrick ];
-  };
+  meta.maintainers = lib.teams.gnome.members ++ [ lib.maintainers.chpatrick ];
 
-  nodes.machine = { nodes, ... }: let
-    user = nodes.machine.config.users.users.alice;
-  in
+  nodes.machine = { nodes, ... }:
+    let
+      user = nodes.machine.config.users.users.alice;
+    in
 
     { imports = [ ./common/user-account.nix ];
 
diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix
index d616d4f0235..7762fff5c3a 100644
--- a/nixos/tests/gnome-xorg.nix
+++ b/nixos/tests/gnome-xorg.nix
@@ -1,7 +1,7 @@
 import ./make-test-python.nix ({ pkgs, lib, ...} : {
   name = "gnome-xorg";
-  meta = with lib; {
-    maintainers = teams.gnome.members;
+  meta = {
+    maintainers = lib.teams.gnome.members;
   };
 
   nodes.machine = { nodes, ... }: let
diff --git a/nixos/tests/gnome.nix b/nixos/tests/gnome.nix
index 5a28e3bb0e8..9aa88c4852c 100644
--- a/nixos/tests/gnome.nix
+++ b/nixos/tests/gnome.nix
@@ -1,8 +1,6 @@
 import ./make-test-python.nix ({ pkgs, lib, ...} : {
   name = "gnome";
-  meta = with lib; {
-    maintainers = teams.gnome.members;
-  };
+  meta.maintainers = lib.teams.gnome.members;
 
   nodes.machine =
     { ... }:
diff --git a/nixos/tests/hadoop/hdfs.nix b/nixos/tests/hadoop/hdfs.nix
index 9415500463d..429d4bf6b53 100644
--- a/nixos/tests/hadoop/hdfs.nix
+++ b/nixos/tests/hadoop/hdfs.nix
@@ -1,6 +1,5 @@
 # Test a minimal HDFS cluster with no HA
 import ../make-test-python.nix ({ package, lib, ... }:
-with lib;
 {
   name = "hadoop-hdfs";
 
@@ -22,7 +21,7 @@ with lib;
           };
           httpfs = {
             # The NixOS hadoop module only support webHDFS on 3.3 and newer
-            enable = mkIf (versionAtLeast package.version "3.3") true;
+            enable = lib.mkIf (lib.versionAtLeast package.version "3.3") true;
             openFirewall = true;
           };
         };
@@ -57,7 +56,7 @@ with lib;
 
     datanode.wait_for_unit("hdfs-datanode")
     datanode.wait_for_unit("network.target")
-  '' + ( if versionAtLeast package.version "3" then ''
+  '' + (if lib.versionAtLeast package.version "3" then ''
     datanode.wait_for_open_port(9864)
     datanode.wait_for_open_port(9866)
     datanode.wait_for_open_port(9867)
@@ -76,7 +75,7 @@ with lib;
     datanode.succeed("echo testfilecontents | sudo -u hdfs hdfs dfs -put - /testfile")
     assert "testfilecontents" in datanode.succeed("sudo -u hdfs hdfs dfs -cat /testfile")
 
-  '' + optionalString ( versionAtLeast package.version "3.3" ) ''
+  '' + lib.optionalString (lib.versionAtLeast package.version "3.3" ) ''
     namenode.wait_for_unit("hdfs-httpfs")
     namenode.wait_for_open_port(14000)
     assert "testfilecontents" in datanode.succeed("curl -f \"http://namenode:14000/webhdfs/v1/testfile?user.name=hdfs&op=OPEN\" 2>&1")
diff --git a/nixos/tests/hardened.nix b/nixos/tests/hardened.nix
index ccb85816854..f54506224e5 100644
--- a/nixos/tests/hardened.nix
+++ b/nixos/tests/hardened.nix
@@ -6,7 +6,6 @@ import ./make-test-python.nix ({ pkgs, ... } : {
 
   nodes.machine =
     { lib, pkgs, config, ... }:
-    with lib;
     { users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
       users.users.sybil = { isNormalUser = true; group = "wheel"; };
       imports = [ ../modules/profiles/hardened.nix ];
diff --git a/nixos/tests/hibernate.nix b/nixos/tests/hibernate.nix
index 4d0b53e95b3..24b4ed382c1 100644
--- a/nixos/tests/hibernate.nix
+++ b/nixos/tests/hibernate.nix
@@ -46,14 +46,14 @@ in makeTest {
 
   nodes = {
     # System configuration used for installing the installedConfig from above.
-    machine = { config, lib, pkgs, ... }: with lib; {
+    machine = { config, lib, pkgs, ... }: {
       imports = [
         ../modules/profiles/installation-device.nix
         ../modules/profiles/base.nix
       ];
 
       nix.settings = {
-        substituters = mkForce [];
+        substituters = lib.mkForce [];
         hashed-mirrors = null;
         connect-timeout = 1;
       };
diff --git a/nixos/tests/iftop.nix b/nixos/tests/iftop.nix
index 6d0090b3946..933f115a8a5 100644
--- a/nixos/tests/iftop.nix
+++ b/nixos/tests/iftop.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }:
 
-with lib;
-
 {
   name = "iftop";
-  meta.maintainers = with pkgs.lib.maintainers; [ ma27 ];
+  meta.maintainers = with lib.maintainers; [ ma27 ];
 
   nodes = {
     withIftop = {
diff --git a/nixos/tests/jackett.nix b/nixos/tests/jackett.nix
index 0a706c99b99..bc8b724e8b4 100644
--- a/nixos/tests/jackett.nix
+++ b/nixos/tests/jackett.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "jackett";
-  meta.maintainers = with maintainers; [ etu ];
+  meta.maintainers = with lib.maintainers; [ etu ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/jirafeau.nix b/nixos/tests/jirafeau.nix
index 0f5af7f718a..dbfaf515e25 100644
--- a/nixos/tests/jirafeau.nix
+++ b/nixos/tests/jirafeau.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "jirafeau";
-  meta.maintainers = with maintainers; [ davidtwco ];
+  meta.maintainers = with lib.maintainers; [ davidtwco ];
 
   nodes.machine = { pkgs, ... }: {
     services.jirafeau = {
diff --git a/nixos/tests/komga.nix b/nixos/tests/komga.nix
index 02db50ef25f..d48d19bbbdd 100644
--- a/nixos/tests/komga.nix
+++ b/nixos/tests/komga.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "komga";
-  meta.maintainers = with maintainers; [ govanify ];
+  meta.maintainers = with lib.maintainers; [ govanify ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/libreddit.nix b/nixos/tests/libreddit.nix
index 82a44cb4e9c..ecf347b9e12 100644
--- a/nixos/tests/libreddit.nix
+++ b/nixos/tests/libreddit.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "libreddit";
-  meta.maintainers = with maintainers; [ fab ];
+  meta.maintainers = with lib.maintainers; [ fab ];
 
   nodes.machine = {
     services.libreddit.enable = true;
diff --git a/nixos/tests/lidarr.nix b/nixos/tests/lidarr.nix
index 7fbaea62f80..8230dda5373 100644
--- a/nixos/tests/lidarr.nix
+++ b/nixos/tests/lidarr.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "lidarr";
-  meta.maintainers = with maintainers; [ etu ];
+  meta.maintainers = with lib.maintainers; [ etu ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/miniflux.nix b/nixos/tests/miniflux.nix
index d905aea048a..be3e7abb6ab 100644
--- a/nixos/tests/miniflux.nix
+++ b/nixos/tests/miniflux.nix
@@ -17,10 +17,9 @@ let
           '';
 
 in
-with lib;
 {
   name = "miniflux";
-  meta.maintainers = with pkgs.lib.maintainers; [ ];
+  meta.maintainers = [ ];
 
   nodes = {
     default =
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index 0d5f0fe2f04..442b45948c6 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -1,20 +1,17 @@
 # Miscellaneous small tests that don't warrant their own VM run.
 
-import ./make-test-python.nix ({ pkgs, ...} : let
+import ./make-test-python.nix ({ lib, pkgs, ...} : let
   foo = pkgs.writeText "foo" "Hello World";
 in {
   name = "misc";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ eelco ];
-  };
+  meta.maintainers = with lib.maintainers; [ eelco ];
 
   nodes.machine =
     { lib, ... }:
-    with lib;
-    { swapDevices = mkOverride 0
+    { swapDevices = lib.mkOverride 0
         [ { device = "/root/swapfile"; size = 128; } ];
-      environment.variables.EDITOR = mkOverride 0 "emacs";
-      documentation.nixos.enable = mkOverride 0 true;
+      environment.variables.EDITOR = lib.mkOverride 0 "emacs";
+      documentation.nixos.enable = lib.mkOverride 0 true;
       systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ];
       virtualisation.fileSystems = { "/tmp2" =
         { fsType = "tmpfs";
@@ -32,7 +29,7 @@ in {
           options = [ "bind" "rw" "noauto" ];
         };
       };
-      systemd.automounts = singleton
+      systemd.automounts = lib.singleton
         { wantedBy = [ "multi-user.target" ];
           where = "/tmp2";
         };
diff --git a/nixos/tests/mpv.nix b/nixos/tests/mpv.nix
index a4803f3cb5b..32a81cbe249 100644
--- a/nixos/tests/mpv.nix
+++ b/nixos/tests/mpv.nix
@@ -1,13 +1,11 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 let
   port = toString 4321;
 in
 {
   name = "mpv";
-  meta.maintainers = with maintainers; [ zopieux ];
+  meta.maintainers = with lib.maintainers; [ zopieux ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/n8n.nix b/nixos/tests/n8n.nix
index 044240fbce7..771296bf37a 100644
--- a/nixos/tests/n8n.nix
+++ b/nixos/tests/n8n.nix
@@ -1,13 +1,10 @@
 import ./make-test-python.nix ({ lib, ... }:
-
-with lib;
-
 let
   port = 5678;
 in
 {
   name = "n8n";
-  meta.maintainers = with maintainers; [ freezeboy k900 ];
+  meta.maintainers = with lib.maintainers; [ freezeboy k900 ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/nfs/kerberos.nix b/nixos/tests/nfs/kerberos.nix
index 5684131f671..a7d08bc628c 100644
--- a/nixos/tests/nfs/kerberos.nix
+++ b/nixos/tests/nfs/kerberos.nix
@@ -1,7 +1,5 @@
 import ../make-test-python.nix ({ pkgs, lib, ... }:
 
-with lib;
-
 let
   krb5 =
     { enable = true;
diff --git a/nixos/tests/noto-fonts.nix b/nixos/tests/noto-fonts.nix
index e4c33fe26a9..0515f16d101 100644
--- a/nixos/tests/noto-fonts.nix
+++ b/nixos/tests/noto-fonts.nix
@@ -1,8 +1,6 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "noto-fonts";
-  meta = {
-    maintainers = with lib.maintainers; [ nickcao midchildan ];
-  };
+  meta.maintainers = with lib.maintainers; [ nickcao midchildan ];
 
   nodes.machine = {
     imports = [ ./common/x11.nix ];
diff --git a/nixos/tests/nzbhydra2.nix b/nixos/tests/nzbhydra2.nix
index c82c756c3a1..e1d528cd952 100644
--- a/nixos/tests/nzbhydra2.nix
+++ b/nixos/tests/nzbhydra2.nix
@@ -1,10 +1,7 @@
 import ./make-test-python.nix ({ lib, ... }:
-
-  with lib;
-
   {
     name = "nzbhydra2";
-    meta.maintainers = with maintainers; [ jamiemagee ];
+    meta.maintainers = with lib.maintainers; [ jamiemagee ];
 
     nodes.machine = { pkgs, ... }: { services.nzbhydra2.enable = true; };
 
diff --git a/nixos/tests/oci-containers.nix b/nixos/tests/oci-containers.nix
index 1bcfb276dbe..1afa9df36df 100644
--- a/nixos/tests/oci-containers.nix
+++ b/nixos/tests/oci-containers.nix
@@ -11,9 +11,8 @@ let
   mkOCITest = backend: makeTest {
     name = "oci-containers-${backend}";
 
-    meta = {
-      maintainers = with lib.maintainers; [ adisbladis benley mkaito ] ++ lib.teams.serokell.members;
-    };
+    meta.maintainers = lib.teams.serokell.members
+                       ++ (with lib.maintainers; [ adisbladis benley mkaito ]);
 
     nodes = {
       ${backend} = { pkgs, ... }: {
diff --git a/nixos/tests/odoo.nix b/nixos/tests/odoo.nix
index 96e3405482b..7c2cf31370f 100644
--- a/nixos/tests/odoo.nix
+++ b/nixos/tests/odoo.nix
@@ -1,8 +1,6 @@
-import ./make-test-python.nix ({ pkgs, lib, ...} : with lib; {
+import ./make-test-python.nix ({ pkgs, lib, ...} : {
   name = "odoo";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ mkg20001 ];
-  };
+  meta.maintainers = with lib.maintainers; [ mkg20001 ];
 
   nodes = {
     server = { ... }: {
diff --git a/nixos/tests/ombi.nix b/nixos/tests/ombi.nix
index ce3064ce6ac..fb3a37c978e 100644
--- a/nixos/tests/ombi.nix
+++ b/nixos/tests/ombi.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "ombi";
-  meta.maintainers = with maintainers; [ woky ];
+  meta.maintainers = with lib.maintainers; [ woky ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix
index 0b920c7a6d5..653fcc6edad 100644
--- a/nixos/tests/pantheon.nix
+++ b/nixos/tests/pantheon.nix
@@ -3,9 +3,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
 {
   name = "pantheon";
 
-  meta = with lib; {
-    maintainers = teams.pantheon.members;
-  };
+  meta.maintainers = lib.teams.pantheon.members;
 
   nodes.machine = { ... }:
 
diff --git a/nixos/tests/please.nix b/nixos/tests/please.nix
index 2437cfe1613..af825ae4b9b 100644
--- a/nixos/tests/please.nix
+++ b/nixos/tests/please.nix
@@ -6,10 +6,10 @@ import ./make-test-python.nix ({ lib, ... }:
   nodes.machine =
     { ... }:
     {
-      users.users = with lib; mkMerge [
-        (listToAttrs (map
-          (n: nameValuePair n { isNormalUser = true; })
-          (genList (x: "user${toString x}") 6)))
+      users.users = lib.mkMerge [
+        (lib.listToAttrs (map
+          (n: lib.nameValuePair n { isNormalUser = true; })
+          (lib.genList (x: "user${toString x}") 6)))
         {
           user0.extraGroups = [ "wheel" ];
         }
diff --git a/nixos/tests/polaris.nix b/nixos/tests/polaris.nix
index fb2e67f075a..bb105d60003 100644
--- a/nixos/tests/polaris.nix
+++ b/nixos/tests/polaris.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "polaris";
-  meta.maintainers = with maintainers; [ pbsds ];
+  meta.maintainers = with lib.maintainers; [ pbsds ];
 
   nodes.machine =
     { pkgs, ... }: {
diff --git a/nixos/tests/prowlarr.nix b/nixos/tests/prowlarr.nix
index 144cbd5fc95..af669afd570 100644
--- a/nixos/tests/prowlarr.nix
+++ b/nixos/tests/prowlarr.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "prowlarr";
-  meta.maintainers = with maintainers; [ jdreaver ];
+  meta.maintainers = with lib.maintainers; [ jdreaver ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix
index ef5fcc41476..2d8c5207001 100644
--- a/nixos/tests/quake3.nix
+++ b/nixos/tests/quake3.nix
@@ -11,11 +11,11 @@ let
     };
 
   # Only allow the demo data to be used (only if it's unfreeRedistributable).
-  unfreePredicate = pkg: with lib; let
+  unfreePredicate = pkg: let
     allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ];
     allowLicenses = [ lib.licenses.unfreeRedistributable ];
-  in elem pkg.pname allowPackageNames &&
-     elem (pkg.meta.license or null) allowLicenses;
+  in lib.elem pkg.pname allowPackageNames &&
+     lib.elem (pkg.meta.license or null) allowLicenses;
 
   client =
     { pkgs, ... }:
diff --git a/nixos/tests/radarr.nix b/nixos/tests/radarr.nix
index 85fd6572f06..bf9eb11c2b1 100644
--- a/nixos/tests/radarr.nix
+++ b/nixos/tests/radarr.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "radarr";
-  meta.maintainers = with maintainers; [ etu ];
+  meta.maintainers = with lib.maintainers; [ etu ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/readarr.nix b/nixos/tests/readarr.nix
index bb7dd852984..7c144e2ee02 100644
--- a/nixos/tests/readarr.nix
+++ b/nixos/tests/readarr.nix
@@ -1,10 +1,6 @@
-import ./make-test-python.nix ({ lib, ... }:
-
-with lib;
-
-{
+import ./make-test-python.nix ({ lib, ... }: {
   name = "readarr";
-  meta.maintainers = with maintainers; [ jocelynthode ];
+  meta.maintainers = with lib.maintainers; [ jocelynthode ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/redis.nix b/nixos/tests/redis.nix
index abea1657f3e..94b50d07be6 100644
--- a/nixos/tests/redis.nix
+++ b/nixos/tests/redis.nix
@@ -1,19 +1,17 @@
-import ./make-test-python.nix ({ pkgs, ... }:
+import ./make-test-python.nix ({ pkgs, lib, ... }:
 {
   name = "redis";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ flokli ];
-  };
+  meta.maintainers = with lib.maintainers; [ flokli ];
 
   nodes = {
     machine =
-      { pkgs, lib, ... }: with lib;
+      { pkgs, lib, ... }:
 
       {
         services.redis.servers."".enable = true;
         services.redis.servers."test".enable = true;
 
-        users.users = listToAttrs (map (suffix: nameValuePair "member${suffix}" {
+        users.users = lib.listToAttrs (map (suffix: lib.nameValuePair "member${suffix}" {
           createHome = false;
           description = "A member of the redis${suffix} group";
           isNormalUser = true;
diff --git a/nixos/tests/sonarr.nix b/nixos/tests/sonarr.nix
index bdfc8916cb7..57e6b72db3a 100644
--- a/nixos/tests/sonarr.nix
+++ b/nixos/tests/sonarr.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "sonarr";
-  meta.maintainers = with maintainers; [ etu ];
+  meta.maintainers = with lib.maintainers; [ etu ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/sudo.nix b/nixos/tests/sudo.nix
index 661fe9989e7..3b6028c6f0b 100644
--- a/nixos/tests/sudo.nix
+++ b/nixos/tests/sudo.nix
@@ -2,17 +2,13 @@
 
 let
   password = "helloworld";
-
 in
-  import ./make-test-python.nix ({ pkgs, ...} : {
+  import ./make-test-python.nix ({ lib, pkgs, ...} : {
     name = "sudo";
-    meta = with pkgs.lib.maintainers; {
-      maintainers = [ lschuermann ];
-    };
+    meta.maintainers = with lib.maintainers; [ lschuermann ];
 
     nodes.machine =
       { lib, ... }:
-      with lib;
       {
         users.groups = { foobar = {}; barfoo = {}; baz = { gid = 1337; }; };
         users.users = {
diff --git a/nixos/tests/systemd-timesyncd.nix b/nixos/tests/systemd-timesyncd.nix
index ad5b9a47383..43abd36c47d 100644
--- a/nixos/tests/systemd-timesyncd.nix
+++ b/nixos/tests/systemd-timesyncd.nix
@@ -11,11 +11,11 @@ in {
   name = "systemd-timesyncd";
   nodes = {
     current = mkVM {};
-    pre1909 = mkVM ({lib, ... }: with lib; {
+    pre1909 = mkVM ({lib, ... }: {
       # create the path that should be migrated by our activation script when
       # upgrading to a newer nixos version
       system.stateVersion = "19.03";
-      system.activationScripts.simulate-old-timesync-state-dir = mkBefore ''
+      system.activationScripts.simulate-old-timesync-state-dir = lib.mkBefore ''
         rm -f /var/lib/systemd/timesync
         mkdir -p /var/lib/systemd /var/lib/private/systemd/timesync
         ln -s /var/lib/private/systemd/timesync /var/lib/systemd/timesync
diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix
index 71ec9df4641..b55fbf91232 100644
--- a/nixos/tests/tor.nix
+++ b/nixos/tests/tor.nix
@@ -1,15 +1,13 @@
-import ./make-test-python.nix ({ lib, ... }: with lib;
-
-{
+import ./make-test-python.nix ({ lib, ... }: {
   name = "tor";
-  meta.maintainers = with maintainers; [ joachifm ];
+  meta.maintainers = with lib.maintainers; [ joachifm ];
 
   nodes.client = { pkgs, ... }: {
     boot.kernelParams = [ "audit=0" "apparmor=0" "quiet" ];
     networking.firewall.enable = false;
     networking.useDHCP = false;
 
-    environment.systemPackages = with pkgs; [ netcat ];
+    environment.systemPackages = [ pkgs.netcat ];
     services.tor.enable = true;
     services.tor.client.enable = true;
     services.tor.settings.ControlPort = 9051;
diff --git a/nixos/tests/ulogd.nix b/nixos/tests/ulogd.nix
index ce52d855ffc..d351fdae798 100644
--- a/nixos/tests/ulogd.nix
+++ b/nixos/tests/ulogd.nix
@@ -1,9 +1,7 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "ulogd";
 
-  meta = with lib; {
-    maintainers = with maintainers; [ p-h ];
-  };
+  meta.maintainers = with lib.maintainers; [ p-h ];
 
   nodes.machine = { ... }: {
     networking.firewall.enable = false;
diff --git a/nixos/tests/uptime-kuma.nix b/nixos/tests/uptime-kuma.nix
index 3d588d73cdb..00e2008a525 100644
--- a/nixos/tests/uptime-kuma.nix
+++ b/nixos/tests/uptime-kuma.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ lib, ... }:
 
-with lib;
-
 {
   name = "uptime-kuma";
-  meta.maintainers = with maintainers; [ julienmalka ];
+  meta.maintainers = with lib.maintainers; [ julienmalka ];
 
   nodes.machine =
     { pkgs, ... }:
diff --git a/nixos/tests/xautolock.nix b/nixos/tests/xautolock.nix
index 529567e0797..cf81c4a1cf0 100644
--- a/nixos/tests/xautolock.nix
+++ b/nixos/tests/xautolock.nix
@@ -1,10 +1,8 @@
 import ./make-test-python.nix ({ pkgs, lib, ... }:
 
-with lib;
-
 {
   name = "xautolock";
-  meta.maintainers = with pkgs.lib.maintainers; [ ];
+  meta.maintainers = [ ];
 
   nodes.machine = {
     imports = [ ./common/x11.nix ./common/user-account.nix ];
diff --git a/nixos/tests/xss-lock.nix b/nixos/tests/xss-lock.nix
index c927d9274e6..e4e41a5aa79 100644
--- a/nixos/tests/xss-lock.nix
+++ b/nixos/tests/xss-lock.nix
@@ -1,10 +1,6 @@
-import ./make-test-python.nix ({ pkgs, lib, ... }:
-
-with lib;
-
-{
+import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "xss-lock";
-  meta.maintainers = with pkgs.lib.maintainers; [ ];
+  meta.maintainers = [ ];
 
   nodes = {
     simple = {
diff --git a/nixos/tests/yabar.nix b/nixos/tests/yabar.nix
index ff7a47ae637..212a8ce4bbf 100644
--- a/nixos/tests/yabar.nix
+++ b/nixos/tests/yabar.nix
@@ -1,12 +1,6 @@
-import ./make-test-python.nix ({ pkgs, lib, ... }:
-
-with lib;
-
-{
+import ./make-test-python.nix ({ pkgs, lib, ... }: {
   name = "yabar";
-  meta = with pkgs.lib.maintainers; {
-    maintainers = [ ];
-  };
+  meta.maintainers = [ ];
 
   nodes.machine = {
     imports = [ ./common/x11.nix ./common/user-account.nix ];