socks.nix upd + hypr

This commit is contained in:
delta 2024-06-10 22:34:02 +03:00
parent d63a70e5f2
commit 1475a46e8e
2 changed files with 11 additions and 5 deletions

View file

@ -27,7 +27,7 @@ exec-once = ~/.config/hypr/xdg-portal-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = swww init exec-once = swww-daemon
exec-once = sh -c "sleep 2 && swww clear" exec-once = sh -c "sleep 2 && swww clear"
#exec-once = swww img Downloads/PC\ Wallpapers/gifpixel/rooftop.gif #exec-once = swww img Downloads/PC\ Wallpapers/gifpixel/rooftop.gif
#exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm #exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm
@ -361,6 +361,7 @@ bind = $mainMod, RETURN, exec, footclient
bind = $mainMod, Q, exec, footclient bind = $mainMod, Q, exec, footclient
# bind = ALT, RETURN, exec, sh -c "/home/delta/.config/hypr/hdrop -g '30' -h '98' -p t -f kitty --class kitty_drop" # bind = ALT, RETURN, exec, sh -c "/home/delta/.config/hypr/hdrop -g '30' -h '98' -p t -f kitty --class kitty_drop"
bind = ALT, RETURN, exec, hyprdrop kitty -i kitty_hyprdrop bind = ALT, RETURN, exec, hyprdrop kitty -i kitty_hyprdrop
bind = ALT, RETURN, exec, hyprctl dispatch centerwindow 1
bind = ALT, X, exec, sh -c "/home/delta/.config/hypr/hdrop -g '30' -h '60' -f 'keepassxc_lite' --class org.keepassxc.KeePassXC" bind = ALT, X, exec, sh -c "/home/delta/.config/hypr/hdrop -g '30' -h '60' -f 'keepassxc_lite' --class org.keepassxc.KeePassXC"
# bind = ALT, T, exec, sh -c "QT_QPA_PLATFORM=xcb /home/delta/.config/hypr/hdrop -h '60' -g '30' -f 'telegram-desktop' --class TelegramDesktop" # bind = ALT, T, exec, sh -c "QT_QPA_PLATFORM=xcb /home/delta/.config/hypr/hdrop -h '60' -g '30' -f 'telegram-desktop' --class TelegramDesktop"
#bind = $mainMod SHIFT, RETURN, exec, alacritty #open the terminal #bind = $mainMod SHIFT, RETURN, exec, alacritty #open the terminal
@ -400,7 +401,7 @@ bind = ALT, SPACE, exec, pypr shift_monitors +1 # K R A S I V O
bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
#bind = $mainMod, J, togglesplit, # dwindle #bind = $mainMod, J, togglesplit, # dwindle
#bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee >(swappy -f -) | wl-copy # take a screenshot #bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee >(swappy -f -) | wl-copy # take a screenshot
bind = $mainMod, S, exec, grimblast --freeze copy area # take a screenshot bind = $mainMod, S, exec,XCURSOR_SIZE=16 grimblast --freeze copy area # take a screenshot
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | qrtool decode | tee >(wl-copy) >(notify-send --icon=clipboard "QR Code Content" "$(cat)") bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | qrtool decode | tee >(wl-copy) >(notify-send --icon=clipboard "QR Code Content" "$(cat)")
bind = $mainMod, Print, exec, /home/delta/.config/hypr/grimblast.sh # take a screenshot bind = $mainMod, Print, exec, /home/delta/.config/hypr/grimblast.sh # take a screenshot
# bind = $mainMod, Print, exec, /home/delta/scripts/screenshoter.sh # take a screenshot # bind = $mainMod, Print, exec, /home/delta/scripts/screenshoter.sh # take a screenshot

View file

@ -18,6 +18,8 @@ let
NetworkNamespacePath = "/run/netns/novpn"; NetworkNamespacePath = "/run/netns/novpn";
User = "socks"; User = "socks";
Group = "socks"; Group = "socks";
StandardInput= if socketConfig != null then [ "socket" ] else [ ];
StandardOutput=if socketConfig != null then [ "socket" ] else [ ];
}; };
script = script; script = script;
@ -42,7 +44,6 @@ let
{ name = "opera-socks"; { name = "opera-socks";
script = "sing-box run -c ${opera-singboxcfg} & opera-proxy -bootstrap-dns https://1.1.1.1/dns-query -bind-address 192.168.150.2:18088"; script = "sing-box run -c ${opera-singboxcfg} & opera-proxy -bootstrap-dns https://1.1.1.1/dns-query -bind-address 192.168.150.2:18088";
autostart = false; autostart = false;
socketConfig = { port = "3335"; idleStopSec = "180s"; };
} # port 3335 } # port 3335
]; ];
@ -51,10 +52,16 @@ let
value = { value = {
description = "Socket activation for ${name}"; description = "Socket activation for ${name}";
wantedBy = [ "sockets.target" ]; wantedBy = [ "sockets.target" ];
bindsTo = [ "novpn.service" ];
after = [ "novpn.service" "network-online.target" ];
socketConfig = { socketConfig = {
ListenStream = "${port}"; ListenStream = "${port}";
IdleStopSec = idleStopSec; IdleStopSec = idleStopSec;
NetworkNamespacePath = "/run/netns/novpn";
User = "socks";
Group = "socks";
}; };
}; };
}; };
@ -70,8 +77,6 @@ let
"type": "socks", "type": "socks",
"listen": "192.168.150.2", "listen": "192.168.150.2",
"listen_port": 3335, "listen_port": 3335,
"sniff": true,
"sniff_override_destination": true
} }
], ],
"outbounds": [ "outbounds": [