summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-11-26 14:53:56 +0100
committerQuentin Aristote <quentin@aristote.fr>2021-11-26 14:53:56 +0100
commita468ef741c176342179650e39abb5f28131122ae (patch)
tree202c3bf495ebc861d5f7d8cb71b00af3df9d4f68
parent0b6558fbd828800621cd9e8918fb91f2602111ba (diff)
rename attrsets of virtualhosts for more concision
-rw-r--r--config/services/web/money/default.nix3
-rw-r--r--config/services/web/quentin/default.nix3
-rw-r--r--config/services/web/searx/default.nix3
-rw-r--r--config/services/web/searx/morty/default.nix2
-rw-r--r--test/vm.nix6
5 files changed, 10 insertions, 7 deletions
diff --git a/config/services/web/money/default.nix b/config/services/web/money/default.nix
index 1853aab..3a9f58b 100644
--- a/config/services/web/money/default.nix
+++ b/config/services/web/money/default.nix
@@ -2,7 +2,8 @@
let cfg = config.services.ihatemoney;
in {
- services.nginx.virtualHosts."money.${config.networking.domain}" = lib.mkIf cfg.enable {
+ services.nginx.virtualHosts.money = lib.mkIf cfg.enable {
+ serverName = "money.${config.networking.domain}";
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1${cfg.uwsgiConfig.http}/";
diff --git a/config/services/web/quentin/default.nix b/config/services/web/quentin/default.nix
index 468dec4..8456565 100644
--- a/config/services/web/quentin/default.nix
+++ b/config/services/web/quentin/default.nix
@@ -1,7 +1,8 @@
{ config, pkgs, ... }:
{
- services.nginx.virtualHosts."quentin.${config.networking.domain}" = {
+ services.nginx.virtualHosts.quentin = {
+ serverName = "quentin.${config.networking.domain}";
locations."/".root = "${pkgs.personal.academic-webpage}";
forceSSL = true;
enableACME = true;
diff --git a/config/services/web/searx/default.nix b/config/services/web/searx/default.nix
index 1953db7..c0a70be 100644
--- a/config/services/web/searx/default.nix
+++ b/config/services/web/searx/default.nix
@@ -8,8 +8,9 @@ let
in {
imports = [ ./searx ./filtron ./morty ];
- services.nginx.virtualHosts."searx.${config.networking.domain}" =
+ services.nginx.virtualHosts.searx =
lib.mkIf (cfg.searx.enable && cfg.filtron.enable) {
+ serverName = "searx.${config.networking.domain}";
locations = {
"/" = {
proxyPass = "http://${cfg.filtron.listen.address}:${
diff --git a/config/services/web/searx/morty/default.nix b/config/services/web/searx/morty/default.nix
index 1920701..af48fda 100644
--- a/config/services/web/searx/morty/default.nix
+++ b/config/services/web/searx/morty/default.nix
@@ -2,7 +2,7 @@
let cfg = config.services.morty;
in {
- services.nginx.virtualHosts."searx.${config.networking.domain}".locations =
+ services.nginx.virtualHosts.searx.locations =
lib.mkIf cfg.enable {
"/morty/" = {
proxyPass = "http://127.0.0.1:${toString cfg.port}";
diff --git a/test/vm.nix b/test/vm.nix
index ca4791a..390d02b 100644
--- a/test/vm.nix
+++ b/test/vm.nix
@@ -18,7 +18,7 @@ in {
};
services.nginx.virtualHosts = {
- "quentin.${config.networking.domain}" = {
+ quentin = {
listen = lib.mkForce [{
addr = "0.0.0.0";
port = 8080;
@@ -26,7 +26,7 @@ in {
forceSSL = lib.mkForce false;
enableACME = lib.mkForce false;
};
- "searx.${config.networking.domain}" = {
+ searx = {
listen = lib.mkForce [{
addr = "0.0.0.0";
port = 8081;
@@ -34,7 +34,7 @@ in {
forceSSL = lib.mkForce false;
enableACME = lib.mkForce false;
};
- "money.${config.networking.domain}" = {
+ money = {
listen = lib.mkForce [{
addr = "0.0.0.0";
port = 8082;