Files
nixos-template-base/configuration/network-ipv6.nix

31 lines
902 B
Nix
Raw Normal View History

2016-08-12 12:46:36 +02:00
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
2016-08-12 12:46:36 +02:00
in
mkIf true {
# Utilisation d'adresse IPv6 temporaire
## https://blog.linitx.com/control-privacy-addressing-ipv6-linux/
## http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/x1092.html
boot.kernel.sysctl = {
"net.ipv6.conf.all.temp_prefered_lft" = 1800; # 30 min
"net.ipv6.conf.all.temp_valid_lft" = 43200; # 12 heures
"net.ipv6.conf.all.use_tempaddr" = 2; # activé
"net.ipv6.conf.default.temp_prefered_lft" = 3600; # 1 heure
"net.ipv6.conf.default.temp_valid_lft" = 3600; # 1 heure
"net.ipv6.conf.default.use_tempaddr" = 2; # activé
2017-08-13 14:37:29 +02:00
# Activation du routage
"net.ipv6.conf.all.forwarding" = true;
"net.ipv6.conf.default.forwarding" = true;
};
}