X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=virtual%2Feldiron.nix;h=a1e69091decd65cc158d0fcadf7f22819a1b8691;hb=f8bde3d6d31da84b5e81bdfc4f96efdf6bec3df2;hp=efaa0686aa899e3b8800b77c8ce80c8ae4d7866e;hpb=42429ef0756d9ee41cf0ff0b38210edb3b1637e5;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/virtual/eldiron.nix b/virtual/eldiron.nix index efaa068..a1e6909 100644 --- a/virtual/eldiron.nix +++ b/virtual/eldiron.nix @@ -4,7 +4,7 @@ enableRollback = true; }; - eldiron = { config, pkgs, mylibs, ... }: + eldiron = { config, pkgs, mylibs, myconfig, ... }: with mylibs; let mypkgs = pkgs.callPackage ./packages.nix { @@ -14,6 +14,13 @@ { _module.args = { mylibs = import ../libs.nix; + myconfig = { + ips = { + main = "176.9.151.89"; + production = "176.9.151.154"; + integration = "176.9.151.155"; + }; + }; }; imports = [ @@ -47,6 +54,11 @@ enable = true; allowedTCPPorts = [ 22 80 443 9418 ]; }; + interfaces."eth0".ipv4.addresses = [ + # 176.9.151.89 declared in nixops -> infra / tools + { address = myconfig.ips.production; prefixLength = 32; } + { address = myconfig.ips.integration; prefixLength = 32; } + ]; }; deployment = { @@ -54,7 +66,7 @@ hetzner = { #robotUser = "defined in HETZNER_ROBOT_USER"; #robotPass = "defined in HETZNER_ROBOT_PASS"; - mainIPv4 = "176.9.151.89"; + mainIPv4 = myconfig.ips.main; partitions = '' clearpart --all --initlabel --drives=sda,sdb @@ -138,7 +150,6 @@ install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/adminer install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/mantisbt - install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/ttrss install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions/davical ''; # FIXME: initial sync @@ -187,7 +198,9 @@ sslServerKey = "/var/lib/acme/${domain}/key.pem"; sslServerChain = "/var/lib/acme/${domain}/fullchain.pem"; logFormat = "combinedVhost"; - listen = [ { ip = "*"; port = 443; } ]; + listen = [ + { ip = "176.9.151.89"; port = 443; } + ]; }; apacheConfig = config.services.myWebsites.apacheConfig; in rec { @@ -240,14 +253,6 @@ mypkgs.davical.apache.vhostConf ]; }) - (withConf "eldiron" // { - hostName = "connexionswing.immae.eu"; - serverAliases = [ "sandetludo.immae.eu" ]; - documentRoot = mypkgs.connexionswing_dev.webRoot; - extraConfig = builtins.concatStringsSep "\n" [ - mypkgs.connexionswing_dev.apache.vhostConf - ]; - }) (withConf "connexionswing" // { hostName = "connexionswing.com"; serverAliases = [ "sandetludo.com" "www.connexionswing.com" "www.sandetludo.com" ]; @@ -256,13 +261,6 @@ mypkgs.connexionswing_prod.apache.vhostConf ]; }) - (withConf "eldiron" // { - hostName = "ludivine.immae.eu"; - documentRoot = mypkgs.ludivinecassal_dev.webRoot; - extraConfig = builtins.concatStringsSep "\n" [ - mypkgs.ludivinecassal_dev.apache.vhostConf - ]; - }) (withConf "ludivinecassal" // { hostName = "ludivinecassal.com"; serverAliases = [ "www.ludivinecassal.com" ]; @@ -271,13 +269,6 @@ mypkgs.ludivinecassal_prod.apache.vhostConf ]; }) - (withConf "eldiron" // { - hostName = "piedsjaloux.immae.eu"; - documentRoot = mypkgs.piedsjaloux_dev.webRoot; - extraConfig = builtins.concatStringsSep "\n" [ - mypkgs.piedsjaloux_dev.apache.vhostConf - ]; - }) (withConf "piedsjaloux" // { hostName = "piedsjaloux.fr"; serverAliases = [ "www.piedsjaloux.fr" ]; @@ -286,13 +277,6 @@ mypkgs.piedsjaloux_prod.apache.vhostConf ]; }) - (withConf "eldiron" // { - hostName = "chloe.immae.eu"; - documentRoot = mypkgs.chloe_dev.webRoot; - extraConfig = builtins.concatStringsSep "\n" [ - mypkgs.chloe_dev.apache.vhostConf - ]; - }) (withConf "chloe" // { hostName = "osteopathe-cc.fr"; serverAliases = [ "www.osteopathe-cc.fr" ]; @@ -301,13 +285,6 @@ mypkgs.chloe_prod.apache.vhostConf ]; }) - (withConf "eldiron" // { - hostName = "dev.aten.pro"; - documentRoot = mypkgs.aten_dev.webRoot; - extraConfig = builtins.concatStringsSep "\n" [ - mypkgs.aten_dev.apache.vhostConf - ]; - }) (withConf "aten" // { hostName = "aten.pro"; serverAliases = [ "www.aten.pro" ];