mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 09:14:28 +00:00
Merge pull request #229030 from atorres1985-contrib/with-lib-is-bad
With lib is bad: removes `with lib;` occurrences - part I
This commit is contained in:
commit
c637afe9c1
@ -2,8 +2,6 @@
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports =
|
||||
[ ../../../modules/virtualisation/cloudstack-config.nix ];
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the default lxd configuration.
|
||||
|
@ -1,7 +1,5 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../../modules/virtualisation/lxc-container.nix
|
||||
|
@ -1,7 +1,5 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
# WARNING: THIS CONFIGURATION IS AUTOGENERATED AND WILL BE OVERWRITTEN AUTOMATICALLY
|
||||
|
||||
{
|
||||
|
@ -1,7 +1,10 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkAliasOptionModuleMD
|
||||
mkRemovedOptionModule;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
/*
|
||||
|
@ -1,8 +1,6 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
name = "3proxy";
|
||||
meta = with lib.maintainers; {
|
||||
maintainers = [ misuzu ];
|
||||
};
|
||||
meta.maintainers = with lib.maintainers; [ misuzu ];
|
||||
|
||||
nodes = {
|
||||
peer0 = { lib, ... }: {
|
||||
|
@ -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 =
|
||||
|
@ -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 =
|
||||
|
@ -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, ... }:
|
||||
|
@ -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}"
|
||||
|
@ -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 = [
|
||||
|
@ -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;
|
||||
|
@ -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, ... }: {
|
||||
|
@ -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 ];
|
||||
|
@ -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 ''
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -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 =
|
||||
|
@ -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;
|
||||
|
@ -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 =
|
||||
{ ... }:
|
||||
|
@ -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, ... }: {
|
||||
|
@ -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 = { ... }:
|
||||
|
@ -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 = {
|
||||
|
@ -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" ]"""
|
||||
|
@ -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 ];
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 =
|
||||
{ ... }:
|
||||
|
@ -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")
|
||||
|
@ -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 ];
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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 = {
|
||||
|
@ -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, ... }:
|
||||
|
@ -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 = {
|
||||
|
@ -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, ... }:
|
||||
|
@ -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;
|
||||
|
@ -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, ... }:
|
||||
|
@ -17,10 +17,9 @@ let
|
||||
'';
|
||||
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
name = "miniflux";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ ];
|
||||
meta.maintainers = [ ];
|
||||
|
||||
nodes = {
|
||||
default =
|
||||
|
@ -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";
|
||||
};
|
||||
|
@ -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, ... }:
|
||||
|
@ -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, ... }:
|
||||
|
@ -1,7 +1,5 @@
|
||||
import ../make-test-python.nix ({ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
krb5 =
|
||||
{ enable = true;
|
||||
|
@ -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 ];
|
||||
|
@ -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; };
|
||||
|
||||
|
@ -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, ... }: {
|
||||
|
@ -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 = { ... }: {
|
||||
|
@ -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, ... }:
|
||||
|
@ -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 = { ... }:
|
||||
|
||||
|
@ -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" ];
|
||||
}
|
||||
|
@ -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, ... }: {
|
||||
|
@ -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, ... }:
|
||||
|
@ -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, ... }:
|
||||
|
@ -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, ... }:
|
||||
|
@ -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, ... }:
|
||||
|
@ -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;
|
||||
|
@ -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, ... }:
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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, ... }:
|
||||
|
@ -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 ];
|
||||
|
@ -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 = {
|
||||
|
@ -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 ];
|
||||
|
Loading…
Reference in New Issue
Block a user