add VR stuff and mitmproxy
This commit is contained in:
parent
bdbe95c141
commit
1d4d55fd2c
3 changed files with 46 additions and 3 deletions
|
|
@ -47,6 +47,8 @@
|
|||
v4l-utils
|
||||
wf-recorder
|
||||
obs-studio
|
||||
mitmproxy # for checking what facebook collects
|
||||
linux-wifi-hotspot
|
||||
];
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
|
|
@ -57,22 +59,33 @@
|
|||
bundles.gaming = {
|
||||
enable = true;
|
||||
remotePlay = true;
|
||||
alvr = true;
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
ausweisapp.enable = true;
|
||||
|
||||
mitmproxy = {
|
||||
enable = true;
|
||||
routeAP = true;
|
||||
accessPoint = "wlp5s0f3u3";
|
||||
mitmPort = 8080;
|
||||
};
|
||||
|
||||
home-users = {
|
||||
"prunebutt" = {
|
||||
userConfig = ./home.nix;
|
||||
userSettings = {
|
||||
extraGroups = ["networkmanager" "wheel" "libvirtd" "docker"];
|
||||
extraGroups = ["networkmanager" "wheel" "libvirtd" "docker" "wireshark" "adbusers"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.adb.enable = true;
|
||||
|
||||
programs.wireshark.enable = true;
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
localCfg = config.myNixOS.bundles.gaming;
|
||||
in {
|
||||
options = {
|
||||
myNixOS.bundles.gaming.remotePlay = lib.mkEnableOption {
|
||||
default = true;
|
||||
myNixOS.bundles.gaming = {
|
||||
remotePlay = lib.mkEnableOption { default = true; };
|
||||
alvr = lib.mkEnableOption { default = false; };
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -22,4 +23,9 @@ in {
|
|||
environment.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${mainUser}/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
|
||||
programs.alvr = {
|
||||
enable = localCfg.alvr;
|
||||
openFirewall = localCfg.alvr;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
24
modules/nixOS/features/mitmproxy.nix
Normal file
24
modules/nixOS/features/mitmproxy.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{config, pkgs, lib, ...}: let
|
||||
localCfg = config.myNixOS.mitmproxy;
|
||||
in {
|
||||
options.myNixOS.mitmproxy = {
|
||||
routeAP = lib.mkEnableOption { default = true; };
|
||||
accessPoint = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
mitmPort = lib.mkOption { default = 8080; };
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.mitmproxy ];
|
||||
|
||||
networking.firewall = lib.mkIf localCfg.routeAP {
|
||||
extraCommands = let
|
||||
accessPoint = localCfg.accessPoint;
|
||||
port = localCfg.mitmPort;
|
||||
in /*bash*/ ''
|
||||
iptables -t nat -A PREROUTING -i ${accessPoint} -p tcp --dport 80 -j REDIRECT --to-port ${builtins.toString port}
|
||||
iptables -t nat -A PREROUTING -i ${accessPoint} -p tcp --dport 443 -j REDIRECT --to-port ${builtins.toString port}
|
||||
'';
|
||||
allowedTCPPorts = [ localCfg.mitmPort ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue