thinkpad-nixos: Use roaming proxy

This commit is contained in:
traxys 2023-03-27 12:19:49 +02:00
parent 7ed486b21b
commit f699226c1f
2 changed files with 25 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{
{pkgs, ...}: {
boot.initrd = {
luks.devices = {
root = {
@ -34,6 +34,23 @@
nixpkgs.config.allowUnfree = true;
systemd.services.roaming_proxy = {
description = "Roaming Http Proxy";
serviceConfig = {
ExecStart = "${pkgs.roaming_proxy}/bin/roaming_proxy --config ${./roaming.toml}";
Restart = "on-failure";
};
wantedBy = ["default.target"];
};
systemd.services.roaming_proxy.enable = true;
security.sudo.extraConfig = ''Defaults env_keep += "*_proxy *_PROXY"'';
networking.proxy = {
httpProxy = "http://localhost:8100";
httpsProxy = "http://localhost:8100";
noProxy = "127.0.0.1,localhost,10.197.128.229,20.79.200.10,integration.frec.bull.fr,172.16.118.8";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -0,0 +1,7 @@
[v4]
#"172.0.0.0/8" = "165.225.77.222:80"
#"172.0.0.0/8" = "127.0.0.1:8118"
"172.0.0.0/8" = "193.56.47.8:8080"
#"172.0.0.0/8" = "165.225.77.222:80"
"10.89.0.0/16" = "193.56.47.8:8080"
[v6]