You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/configuration/network.nix

25 lines
728 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
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
networking.extraHosts = ''
127.0.0.1 ${config.networking.fqdn} ${config.networking.hostName}
'';
8 years ago
# Activation du routage
boot.kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = true;
"net.ipv4.conf.default.forwarding" = true;
};
}