This commit is contained in:
2025-11-07 19:21:31 +03:00
parent 300a519614
commit f9eb7e8bdc
10 changed files with 60 additions and 37 deletions
+2 -1
View File
@@ -82,7 +82,8 @@ let
throttled.enable = true; throttled.enable = true;
journald = { journald = {
extraConfig = '' extraConfig = ''
SystemMaxUse=512M
SystemMaxUse=512M
''; '';
}; };
openssh = { openssh = {
+8 -4
View File
@@ -44,7 +44,8 @@ let
preload.enable = true; preload.enable = true;
journald = { journald = {
extraConfig = '' extraConfig = ''
SystemMaxUse=512M
SystemMaxUse=512M
''; '';
}; };
samba = { samba = {
@@ -124,8 +125,8 @@ let
allowPing = true; allowPing = true;
}; };
enableIPv6 = true; enableIPv6 = true;
interfaces.ens3 = { interfaces.enp0s3 = {
useDHCP = true; useDHCP = false;
ipv6.addresses = [ ipv6.addresses = [
{ {
address = "2a13:7c00:10:6:f816:3eff:fe36:fe1b"; address = "2a13:7c00:10:6:f816:3eff:fe36:fe1b";
@@ -133,7 +134,10 @@ let
} }
]; ];
}; };
defaultGateway6 = "2a13:7c00:10:6::1"; defaultGateway6 = {
address = "2a13:7c00:10:6::1";
interface = "enp0s3";
};
}; };
system = { system = {
+2 -1
View File
@@ -24,7 +24,8 @@ let
services = { services = {
journald = { journald = {
extraConfig = '' extraConfig = ''
SystemMaxUse=512M
SystemMaxUse=512M
''; '';
}; };
earlyoom.enable = true; earlyoom.enable = true;
+6 -5
View File
@@ -36,11 +36,12 @@
polkit = { polkit = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")){ // for sudo polkit.addRule(function(action, subject) {
return polkit.Result.YES; if (subject.isInGroup("wheel")){ // for sudo
} return polkit.Result.YES;
}); }
});
''; '';
}; };
}; };
+4 -3
View File
@@ -19,9 +19,10 @@
theme = "robbyrussell"; theme = "robbyrussell";
}; };
shellInit = '' shellInit = ''
beetn() {
echo "$*" | aichat -cer beets beetn() {
} echo "$*" | aichat -cer beets
}
''; '';
shellAliases = { shellAliases = {
# shell # shell
+5 -4
View File
@@ -153,10 +153,11 @@ in
]; ];
requires = [ "coolwsd.service" ]; requires = [ "coolwsd.service" ];
script = '' script = ''
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url} ${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_url --value ${lib.escapeShellArg wopi_url}
${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist} ${occ}/bin/nextcloud-occ config:app:set richdocuments public_wopi_url --value ${lib.escapeShellArg public_wopi_url}
${occ}/bin/nextcloud-occ richdocuments:setup ${occ}/bin/nextcloud-occ config:app:set richdocuments wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
${occ}/bin/nextcloud-occ richdocuments:setup
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
+2 -1
View File
@@ -14,7 +14,8 @@
#after = [ ]; #after = [ ];
requisite = [ "mnt-archive.mount" ]; # hard-code requisite = [ "mnt-archive.mount" ]; # hard-code
script = '' script = ''
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
+6 -3
View File
@@ -36,16 +36,19 @@
WorkingDirectory = "${xlib.dirs.user-services}/zapret"; WorkingDirectory = "${xlib.dirs.user-services}/zapret";
User = "root"; User = "root";
ExecStart = '' ExecStart = ''
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
''; '';
ExecStop = '' ExecStop = ''
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
''; '';
# ExecStopPost = '' # ExecStopPost = ''
# /run/current-system/sw/bin/echo "Сервис завершён" # /run/current-system/sw/bin/echo "Сервис завершён"
# ''; # '';
PIDFile = '' PIDFile = ''
/run/zapret_discord_youtube.pid
/run/zapret_discord_youtube.pid
''; '';
# Restart = "on-failure"; # Restart = "on-failure";
# RestartSec = "5s"; # RestartSec = "5s";
+3 -2
View File
@@ -64,8 +64,9 @@
TimeoutSec = 300; TimeoutSec = 300;
}; };
script = '' script = ''
cd /mnt/containers/3x-ui
podman build -t compose2nix/3xui_app -f ./Dockerfile . cd /mnt/containers/3x-ui
podman build -t compose2nix/3xui_app -f ./Dockerfile .
''; '';
}; };
+22 -13
View File
@@ -25,7 +25,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
# "node-red.zeroq.ru" = { # "node-red.zeroq.ru" = {
@@ -46,8 +47,9 @@ in
# kTLS = true; # kTLS = true;
locations."/.well-known/discord" = { locations."/.well-known/discord" = {
extraConfig = '' extraConfig = ''
default_type text/plain;
return 200 "dh=c2d103553a4cfdaa1b7952a87a7d8120a1e167cc"; default_type text/plain;
return 200 "dh=c2d103553a4cfdaa1b7952a87a7d8120a1e167cc";
''; '';
}; };
}; };
@@ -60,7 +62,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
"office.zeroq.ru" = { "office.zeroq.ru" = {
@@ -74,10 +77,11 @@ in
}; };
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 5G;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
''; # absolute_redirect off; ''; # absolute_redirect off;
}; };
"immich.zeroq.ru" = { "immich.zeroq.ru" = {
@@ -89,7 +93,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
"nextcloud.zeroq.ru" = { "nextcloud.zeroq.ru" = {
@@ -111,7 +116,8 @@ in
# }; # };
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
"calibre.zeroq.ru" = { "calibre.zeroq.ru" = {
@@ -123,7 +129,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
"pdf.zeroq.ru" = { "pdf.zeroq.ru" = {
@@ -135,7 +142,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
"ai.zeroq.ru" = { "ai.zeroq.ru" = {
@@ -146,7 +154,8 @@ in
proxyWebsockets = true; proxyWebsockets = true;
}; };
extraConfig = '' extraConfig = ''
client_max_body_size 5G;
client_max_body_size 5G;
''; '';
}; };
}; };