diff --git a/base.nix b/base.nix index 2a380fe..b151a70 100644 --- a/base.nix +++ b/base.nix @@ -4,5 +4,6 @@ imports = [ ./tools.nix ./localisation.nix + ./networking.nix ]; } diff --git a/networking.nix b/networking.nix new file mode 100644 index 0000000..f8ebd8b --- /dev/null +++ b/networking.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + + # Utilisation d'adresse IPv6 temporaire + # https://blog.linitx.com/control-privacy-addressing-ipv6-linux/ + + boot.kernel.sysctl = { + "net.ipv6.conf.all.temp_prefered_lft" = 3600; # 1 heure + "net.ipv6.conf.all.temp_valid_lft" = 86400; # 1 jour + "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" = 86400; # 1 jour + "net.ipv6.conf.default.use_tempaddr" = 2; # activé + }; +}