mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 12:40:44 +03:00
123
This commit is contained in:
@@ -5,6 +5,5 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../desktop
|
../desktop
|
||||||
../services/zapret.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,48 +5,50 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services.zapret = {
|
# services.zapret = {
|
||||||
enable = true;
|
|
||||||
params = [
|
|
||||||
"--dpi-desync=fake,disorder2"
|
|
||||||
"--dpi-desync-ttl=1"
|
|
||||||
"--dpi-desync-autottl=2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# systemd.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 = {
|
|
||||||
# Type = "simple";
|
systemd.services.zapret = {
|
||||||
# WorkingDirectory = "${xlib.dirs.user-services}/zapret";
|
enable = true;
|
||||||
# User = "root";
|
after = [ "network.target" ];
|
||||||
# ExecStart = ''
|
wantedBy = [ "multi-user.target" ];
|
||||||
# /run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
|
description = "Custom Script Service";
|
||||||
|
path = with pkgs; [
|
||||||
|
sudo
|
||||||
|
git
|
||||||
|
nftables
|
||||||
|
iproute2
|
||||||
|
zapret
|
||||||
|
coreutils
|
||||||
|
];
|
||||||
|
unitConfig = {
|
||||||
|
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 "Сервис завершён"
|
||||||
# '';
|
# '';
|
||||||
# ExecStop = ''
|
PIDFile = ''
|
||||||
# /run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
|
/run/zapret_discord_youtube.pid
|
||||||
# '';
|
'';
|
||||||
# # ExecStopPost = ''
|
# Restart = "on-failure";
|
||||||
# # /run/current-system/sw/bin/echo "Сервис завершён"
|
# RestartSec = "5s";
|
||||||
# # '';
|
};
|
||||||
# PIDFile = ''
|
};
|
||||||
# /run/zapret_discord_youtube.pid
|
|
||||||
# '';
|
|
||||||
# # Restart = "on-failure";
|
|
||||||
# # RestartSec = "5s";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user