This commit is contained in:
2025-09-16 20:27:44 +03:00
parent cc874ab34f
commit 38e875d9b1
+41 -30
View File
@@ -5,37 +5,48 @@
... ...
}: }:
{ {
systemd.services.zapret = { services.zapret = {
enable = true; enable = true;
after = [ "network.target" ]; params = [
wantedBy = [ "multi-user.target" ]; "--dpi-desync=fake,disorder2"
description = "Custom Script Service"; "--dpi-desync-ttl=1"
path = with pkgs; [ "--dpi-desync-autottl=2"
sudo
git
nftables
iproute2
coreutils
]; ];
unitConfig = {
After = [ "network-online.target" ];
Wants = [ "network-online.target" ];
}; };
serviceConfig = { # systemd.services.zapret = {
Type = "simple"; # enable = true;
WorkingDirectory = "${xlib.dirs.user-services}/zapret"; # after = [ "network.target" ];
User = "root"; # wantedBy = [ "multi-user.target" ];
ExecStart = "${pkgs.bash}/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive"; # description = "Custom Script Service";
ExecStop = "${pkgs.bash}/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh"; # path = with pkgs; [
ExecStopPost = '' # sudo
${pkgs.coreutils}/bin/echo "Сервис завершён" # git
''; # nftables
PIDFile = '' # iproute2
/run/zapret_discord_youtube.pid # coreutils
''; # ];
Restart = "on-failure"; # unitConfig = {
RestartSec = "5s"; # After = [ "network-online.target" ];
}; # Wants = [ "network-online.target" ];
}; # };
# serviceConfig = {
# Type = "simple";
# WorkingDirectory = "${xlib.dirs.user-services}/zapret";
# User = "root";
# ExecStart = ''
# /run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
# '';
# ExecStop = ''
# /run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
# '';
# # ExecStopPost = ''
# # /run/current-system/sw/bin/echo "Сервис завершён"
# # '';
# PIDFile = ''
# /run/zapret_discord_youtube.pid
# '';
# # Restart = "on-failure";
# # RestartSec = "5s";
# };
# };
} }