Merge pull request #229030 from atorres1985-contrib/with-lib-is-bad

With lib is bad: removes `with lib;` occurrences - part I

-2
nixos/maintainers/scripts/cloudstack/cloudstack-image.nix
···
{ config, lib, pkgs, ... }:
-
with lib;
-
{
imports =
[ ../../../modules/virtualisation/cloudstack-config.nix ];
-2
nixos/maintainers/scripts/lxd/lxd-image-inner.nix
···
{ config, pkgs, lib, ... }:
-
with lib;
-
{
imports =
[ # Include the default lxd configuration.
-2
nixos/maintainers/scripts/lxd/lxd-image.nix
···
{ lib, config, pkgs, ... }:
-
with lib;
-
{
imports = [
../../../modules/virtualisation/lxc-container.nix
-2
nixos/maintainers/scripts/lxd/nix.tpl
···
{ lib, config, pkgs, ... }:
-
with lib;
-
# WARNING: THIS CONFIGURATION IS AUTOGENERATED AND WILL BE OVERWRITTEN AUTOMATICALLY
{
+5 -2
nixos/modules/rename.nix
···
{ lib, pkgs, ... }:
-
with lib;
-
+
let
+
inherit (lib)
+
mkAliasOptionModuleMD
+
mkRemovedOptionModule;
+
in
{
imports = [
/*
+1 -3
nixos/tests/3proxy.nix
···
{ lib, pkgs, ... }: {
name = "3proxy";
-
meta = with lib.maintainers; {
-
maintainers = [ misuzu ];
-
};
+
meta.maintainers = with lib.maintainers; [ misuzu ];
nodes = {
peer0 = { lib, ... }: {
+2 -5
nixos/tests/apparmor.nix
···
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 =
+1 -2
nixos/tests/atuin.nix
···
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 =
+1 -3
nixos/tests/bazarr.nix
···
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, ... }:
+2 -2
nixos/tests/boot-stage1.nix
···
'';
};
-
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}"
+1 -3
nixos/tests/budgie.nix
···
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "budgie";
-
meta = with lib; {
-
maintainers = [ maintainers.federicoschonborn ];
-
};
+
meta.maintainers = [ lib.maintainers.federicoschonborn ];
nodes.machine = { ... }: {
imports = [
+3 -5
nixos/tests/cadvisor.nix
···
-
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;
+1 -2
nixos/tests/calibre-web.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, ... }: {
+1 -3
nixos/tests/cinnamon.nix
···
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 ];
+5 -5
nixos/tests/common/acme/server/default.nix
···
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 ''
···
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 ''
+3 -16
nixos/tests/common/auto.nix
···
{ 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
···
'';
};
-
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 = {
···
session include lightdm
'';
-
};
-
}
+2 -4
nixos/tests/convos.nix
···
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 =
+4 -10
nixos/tests/couchdb.nix
···
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;
···
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;
+1 -3
nixos/tests/doas.nix
···
import ./make-test-python.nix (
{ lib, ... }: {
name = "doas";
-
meta = with lib.maintainers; {
-
maintainers = [ cole-h ];
-
};
+
meta.maintainers = with lib.maintainers; [ cole-h ];
nodes.machine =
{ ... }:
+1 -3
nixos/tests/doh-proxy-rust.nix
···
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, ... }: {
+1 -2
nixos/tests/esphome.nix
···
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 = { ... }:
+1 -3
nixos/tests/fluidd.nix
···
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 = {
+6 -10
nixos/tests/gitlab.nix
···
{ pkgs, lib, ... }:
-
with lib;
-
let
inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
initialRootPassword = "notproduction";
···
bobProjectId = "3";
in {
name = "gitlab";
-
meta = with pkgs.lib.maintainers; {
-
maintainers = [ globin yayayayaka ];
-
};
+
meta.maintainers = with lib.maintainers; [ globin yayayayaka ];
nodes = {
gitlab = { ... }: {
···
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;
···
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" ]"""
+5 -6
nixos/tests/gnome-flashback.nix
···
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 ];
+2 -2
nixos/tests/gnome-xorg.nix
···
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
+1 -3
nixos/tests/gnome.nix
···
import ./make-test-python.nix ({ pkgs, lib, ...} : {
name = "gnome";
-
meta = with lib; {
-
maintainers = teams.gnome.members;
-
};
+
meta.maintainers = lib.teams.gnome.members;
nodes.machine =
{ ... }:
+3 -4
nixos/tests/hadoop/hdfs.nix
···
# Test a minimal HDFS cluster with no HA
import ../make-test-python.nix ({ package, lib, ... }:
-
with lib;
{
name = "hadoop-hdfs";
···
};
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;
};
};
···
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)
···
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")
-1
nixos/tests/hardened.nix
···
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 ];
+2 -2
nixos/tests/hibernate.nix
···
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;
};
+1 -3
nixos/tests/iftop.nix
···
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 = {
+1 -3
nixos/tests/jackett.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "jackett";
-
meta.maintainers = with maintainers; [ etu ];
+
meta.maintainers = with lib.maintainers; [ etu ];
nodes.machine =
{ pkgs, ... }:
+1 -3
nixos/tests/jirafeau.nix
···
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 = {
+1 -3
nixos/tests/komga.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "komga";
-
meta.maintainers = with maintainers; [ govanify ];
+
meta.maintainers = with lib.maintainers; [ govanify ];
nodes.machine =
{ pkgs, ... }:
+1 -3
nixos/tests/libreddit.nix
···
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;
+1 -3
nixos/tests/lidarr.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "lidarr";
-
meta.maintainers = with maintainers; [ etu ];
+
meta.maintainers = with lib.maintainers; [ etu ];
nodes.machine =
{ pkgs, ... }:
+1 -2
nixos/tests/miniflux.nix
···
'';
in
-
with lib;
{
name = "miniflux";
-
meta.maintainers = with pkgs.lib.maintainers; [ ];
+
meta.maintainers = [ ];
nodes = {
default =
+6 -9
nixos/tests/misc.nix
···
# 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";
···
options = [ "bind" "rw" "noauto" ];
};
};
-
systemd.automounts = singleton
+
systemd.automounts = lib.singleton
{ wantedBy = [ "multi-user.target" ];
where = "/tmp2";
};
+1 -3
nixos/tests/mpv.nix
···
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, ... }:
+1 -4
nixos/tests/n8n.nix
···
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, ... }:
-2
nixos/tests/nfs/kerberos.nix
···
import ../make-test-python.nix ({ pkgs, lib, ... }:
-
with lib;
-
let
krb5 =
{ enable = true;
+1 -3
nixos/tests/noto-fonts.nix
···
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 ];
+1 -4
nixos/tests/nzbhydra2.nix
···
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; };
+2 -3
nixos/tests/oci-containers.nix
···
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, ... }: {
+2 -4
nixos/tests/odoo.nix
···
-
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 = { ... }: {
+1 -3
nixos/tests/ombi.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "ombi";
-
meta.maintainers = with maintainers; [ woky ];
+
meta.maintainers = with lib.maintainers; [ woky ];
nodes.machine =
{ pkgs, ... }:
+1 -3
nixos/tests/pantheon.nix
···
{
name = "pantheon";
-
meta = with lib; {
-
maintainers = teams.pantheon.members;
-
};
+
meta.maintainers = lib.teams.pantheon.members;
nodes.machine = { ... }:
+4 -4
nixos/tests/please.nix
···
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" ];
}
+1 -3
nixos/tests/polaris.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "polaris";
-
meta.maintainers = with maintainers; [ pbsds ];
+
meta.maintainers = with lib.maintainers; [ pbsds ];
nodes.machine =
{ pkgs, ... }: {
+1 -3
nixos/tests/prowlarr.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "prowlarr";
-
meta.maintainers = with maintainers; [ jdreaver ];
+
meta.maintainers = with lib.maintainers; [ jdreaver ];
nodes.machine =
{ pkgs, ... }:
+3 -3
nixos/tests/quake3.nix
···
};
# 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, ... }:
+1 -3
nixos/tests/radarr.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "radarr";
-
meta.maintainers = with maintainers; [ etu ];
+
meta.maintainers = with lib.maintainers; [ etu ];
nodes.machine =
{ pkgs, ... }:
+2 -6
nixos/tests/readarr.nix
···
-
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, ... }:
+4 -6
nixos/tests/redis.nix
···
-
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;
+1 -3
nixos/tests/sonarr.nix
···
import ./make-test-python.nix ({ lib, ... }:
-
with lib;
-
{
name = "sonarr";
-
meta.maintainers = with maintainers; [ etu ];
+
meta.maintainers = with lib.maintainers; [ etu ];
nodes.machine =
{ pkgs, ... }:
+2 -6
nixos/tests/sudo.nix
···
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 = {
+2 -2
nixos/tests/systemd-timesyncd.nix
···
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
+3 -5
nixos/tests/tor.nix
···
-
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;
+1 -3
nixos/tests/ulogd.nix
···
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;
+1 -3
nixos/tests/uptime-kuma.nix
···
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, ... }:
+1 -3
nixos/tests/xautolock.nix
···
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 ];
+2 -6
nixos/tests/xss-lock.nix
···
-
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 = {
+2 -8
nixos/tests/yabar.nix
···
-
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 ];