diff --git a/hostconfig/thinkpad-nixos/nixos.nix b/hostconfig/thinkpad-nixos/nixos.nix index aaaa89d..5bc396d 100644 --- a/hostconfig/thinkpad-nixos/nixos.nix +++ b/hostconfig/thinkpad-nixos/nixos.nix @@ -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. It‘s perfectly fine and recommended to leave diff --git a/hostconfig/thinkpad-nixos/roaming.toml b/hostconfig/thinkpad-nixos/roaming.toml new file mode 100644 index 0000000..e41afb3 --- /dev/null +++ b/hostconfig/thinkpad-nixos/roaming.toml @@ -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]