mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-04 19:51:05 +01:00
thinkpad-nixos: Use roaming proxy
This commit is contained in:
parent
7ed486b21b
commit
f699226c1f
2 changed files with 25 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
7
hostconfig/thinkpad-nixos/roaming.toml
Normal file
7
hostconfig/thinkpad-nixos/roaming.toml
Normal 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]
|
||||
Loading…
Add table
Add a link
Reference in a new issue