From 734cab332543184095fd1f046c98f26f3a4fd532 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Fri, 26 Nov 2021 15:26:29 +0100 Subject: rename test to tests --- test/.gitignore | 1 - test/vm.nix | 50 -------------------------------------------------- tests/.gitignore | 1 + tests/vm.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 test/.gitignore delete mode 100644 test/vm.nix create mode 100644 tests/.gitignore create mode 100644 tests/vm.nix diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index e2f5dd2..0000000 --- a/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -result \ No newline at end of file diff --git a/test/vm.nix b/test/vm.nix deleted file mode 100644 index 390d02b..0000000 --- a/test/vm.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, lib, ... }: - -let - nginxPorts = lib.concatLists - (lib.mapAttrsToList (_: cfg: (builtins.map (x: x.port) cfg.listen)) - config.services.nginx.virtualHosts); -in { - imports = [ ../configuration.nix ]; - - networking = lib.mkForce { - domain = "aristote.vm"; - - interfaces = { }; - defaultGateway = null; - nameservers = [ ]; - - firewall = { allowedTCPPorts = nginxPorts; }; - }; - - services.nginx.virtualHosts = { - quentin = { - listen = lib.mkForce [{ - addr = "0.0.0.0"; - port = 8080; - }]; - forceSSL = lib.mkForce false; - enableACME = lib.mkForce false; - }; - searx = { - listen = lib.mkForce [{ - addr = "0.0.0.0"; - port = 8081; - }]; - forceSSL = lib.mkForce false; - enableACME = lib.mkForce false; - }; - money = { - listen = lib.mkForce [{ - addr = "0.0.0.0"; - port = 8082; - }]; - forceSSL = lib.mkForce false; - enableACME = lib.mkForce false; - }; - }; - - environment.etc."searx/secrets".text = '' - SECRET_KEY=secret_key - ''; -} diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e2f5dd2 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +result \ No newline at end of file diff --git a/tests/vm.nix b/tests/vm.nix new file mode 100644 index 0000000..390d02b --- /dev/null +++ b/tests/vm.nix @@ -0,0 +1,50 @@ +{ config, lib, ... }: + +let + nginxPorts = lib.concatLists + (lib.mapAttrsToList (_: cfg: (builtins.map (x: x.port) cfg.listen)) + config.services.nginx.virtualHosts); +in { + imports = [ ../configuration.nix ]; + + networking = lib.mkForce { + domain = "aristote.vm"; + + interfaces = { }; + defaultGateway = null; + nameservers = [ ]; + + firewall = { allowedTCPPorts = nginxPorts; }; + }; + + services.nginx.virtualHosts = { + quentin = { + listen = lib.mkForce [{ + addr = "0.0.0.0"; + port = 8080; + }]; + forceSSL = lib.mkForce false; + enableACME = lib.mkForce false; + }; + searx = { + listen = lib.mkForce [{ + addr = "0.0.0.0"; + port = 8081; + }]; + forceSSL = lib.mkForce false; + enableACME = lib.mkForce false; + }; + money = { + listen = lib.mkForce [{ + addr = "0.0.0.0"; + port = 8082; + }]; + forceSSL = lib.mkForce false; + enableACME = lib.mkForce false; + }; + }; + + environment.etc."searx/secrets".text = '' + SECRET_KEY=secret_key + ''; +} -- cgit v1.2.3