diff --git a/flake.lock b/flake.lock index 9c9184f..188dc44 100644 --- a/flake.lock +++ b/flake.lock @@ -59,11 +59,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1639161226, - "narHash": "sha256-75Y08ynJDTq6HHGIF+8IADBJSVip0UyWQH7jqSFnRR8=", + "lastModified": 1639891440, + "narHash": "sha256-FJxa6ObwOQKZy3VhwN5bJRzX+MV/Yq9WLHK/4jlPKrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "573095944e7c1d58d30fc679c81af63668b54056", + "rev": "e6377ff35544226392b49fa2cf05590f9f0c4b43", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1639525045, - "narHash": "sha256-z4GXFNzO+5V4CAUm2DDMAryLOWUKEbQif2ifvv1Ypg4=", + "lastModified": 1639876010, + "narHash": "sha256-naGsoUfsY92NaIGiFI8XFXBnesw8BQGe694xcfaLMDI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a2e281f5770247855b85d70c43454ba5bff34613", + "rev": "395879c28386e1abf20c7ecacd45880759548391", "type": "github" }, "original": { diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index 5d42fee..62e1c55 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -46,19 +46,11 @@ hostName = "loutreos"; # Define your hostname. hostId = "7e66e347"; - dhcpcd = { - persistent = true; - extraConfig = '' - interface bouyges - metric 10 - noarp - interface enp0s21u2 - metric 999 - ''; - }; + useNetworkd = true; + useDHCP = false; vlans = { - bouyges = { + bouygues = { id = 100; interface = "eno1"; }; @@ -69,10 +61,10 @@ }; interfaces = { - eno1.useDHCP = false; - bouyges = { + bouygues = { # Adresse MAC BBox ? https://lafibre.info/remplacer-bbox/informations-de-connexion-ftth/msg598303/#msg598303 macAddress = "E8:AD:A6:21:73:68"; + useDHCP = true; }; eno2 = { ipv4.addresses = [ @@ -84,12 +76,13 @@ { address = "10.40.0.1"; prefixLength = 16; } ]; }; + enp0s21u2.useDHCP = true; }; - # NAT bouyges <-> eno2 + # NAT bouygues <-> eno2 nat = { enable = true; - externalInterface = "bouyges"; + externalInterface = "bouygues"; # Permet d'utiliser le SNAT plus rapide au lieu de MASQUERADE # externalIP = "0.0.0.0"; internalIPs = [ "10.30.0.0/16" "10.40.0.0/16" ]; @@ -118,15 +111,18 @@ }; }; + systemd.network.networks = { + "40-bouygues".dhcpV4Config.RouteMetric = 1; + "40-enp0s21u2".dhcpV4Config.RouteMetric = 1024; + }; + services.dhcpd4 = { enable = true; interfaces = [ "eno2" "chinoiseries" ]; machines = [ { ethernetAddress = "50:c7:bf:b6:b8:ef"; hostName = "HS110"; ipAddress = "10.30.50.7"; } { ethernetAddress = "ac:1f:6b:4b:01:15"; hostName = "IPMI"; ipAddress = "10.30.1.1"; } - { ethernetAddress = "00:1f:c6:6e:d1:f1"; hostName = "minecraftos"; ipAddress = "10.30.135.35"; } - { ethernetAddress = "b4:2e:99:ed:24:26"; hostName = "paul-fixe"; ipAddress = "10.30.135.71"; } - { ethernetAddress = "20:47:da:fc:19:98"; hostName = "telephone-nyan"; ipAddress = "10.30.50.2"; } + { ethernetAddress = "b4:2e:99:ed:24:26"; hostName = "paul-fixe"; ipAddress = "10.30.50.1"; } #ESPHome { ethernetAddress = "e0:98:06:85:e9:ce"; hostName = "salonled"; ipAddress = "10.30.40.1"; } @@ -143,11 +139,11 @@ option subnet-mask 255.255.0.0; subnet 10.30.0.0 netmask 255.255.0.0 { option routers 10.30.0.1; - range 10.30.50.0 10.30.250.0; + range 10.30.100.0 10.30.200.0; } subnet 10.40.0.0 netmask 255.255.0.0 { option routers 10.40.0.1; - range 10.40.50.0 10.40.250.0; + range 10.40.100.0 10.40.200.0; } ''; }; diff --git a/systems/LoutreOS/web.nix b/systems/LoutreOS/web.nix index 7828fea..a880437 100644 --- a/systems/LoutreOS/web.nix +++ b/systems/LoutreOS/web.nix @@ -229,7 +229,6 @@ in "sonarr.nyanlout.re" = authReverse 8989; "syncthing.nyanlout.re" = authReverse 8384; "jackett.nyanlout.re" = authReverse 9117; - "pgmanage.nyanlout.re" = authReverse config.services.pgmanage.port; "matrix.nyanlout.re" = simpleReverse 8008; "emby.nyanlout.re" = recursiveUpdate (simpleReverse 8096) { locations."/" = { @@ -306,14 +305,6 @@ in }; }; - pgmanage = { - enable = true; - port = 10006; - connections = { - localhost = "hostaddr=127.0.0.1 port=5432 dbname=postgres"; - }; - }; - gitea = { enable = true; cookieSecure = true;