2016-10-17 10:06:24 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
inherit (lib) mkIf mkMerge mkThenElse;
|
2017-04-24 23:22:11 +02:00
|
|
|
annuaire = config.r6d.machines;
|
2021-05-06 23:50:07 +02:00
|
|
|
currentMachine = annuaire."${config.networking.fqdn}";
|
2017-05-31 00:23:10 +02:00
|
|
|
flags = currentMachine.configurationFlags;
|
2016-10-17 10:06:24 +02:00
|
|
|
in
|
|
|
|
|
|
|
|
|
|
mkIf true {
|
|
|
|
|
|
|
|
|
|
# fix: Hostname -s renvoie "Unknown host" alors que hostname renvoie la bonne valeur
|
|
|
|
|
# Il s'avère que hostname vérifie la validité du FQDN et du reverse.
|
|
|
|
|
# Fixer ces paramètres dans les hosts permet de faire tomber en marche
|
2017-04-27 22:06:12 +02:00
|
|
|
networking.extraHosts = ''
|
2021-05-06 23:50:07 +02:00
|
|
|
127.0.0.1 ${config.networking.fqdn} ${config.networking.hostName}
|
2016-10-17 10:06:24 +02:00
|
|
|
'';
|
2016-11-28 19:43:51 +01:00
|
|
|
|
2017-08-13 14:37:29 +02:00
|
|
|
# Activation du routage
|
2016-11-28 19:43:51 +01:00
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
"net.ipv4.conf.all.forwarding" = true;
|
|
|
|
|
"net.ipv4.conf.default.forwarding" = true;
|
|
|
|
|
};
|
2016-10-17 10:06:24 +02:00
|
|
|
}
|