mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 04:30:41 +03:00
123
This commit is contained in:
@@ -96,7 +96,7 @@ let
|
|||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
SystemMaxUse=512M
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
openssh = {
|
openssh = {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ let
|
|||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
SystemMaxUse=512M
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
samba = {
|
samba = {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ let
|
|||||||
journald = {
|
journald = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
SystemMaxUse=512M
|
SystemMaxUse=512M
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
earlyoom.enable = true;
|
earlyoom.enable = true;
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
nanorc = ''
|
nanorc = ''
|
||||||
|
|
||||||
set nowrap
|
set nowrap
|
||||||
set tabstospaces
|
set tabstospaces
|
||||||
set tabsize 2
|
set tabsize 2
|
||||||
'';
|
'';
|
||||||
syntaxHighlight = true;
|
syntaxHighlight = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,11 +39,11 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
polkit.addRule(function(action, subject) {
|
polkit.addRule(function(action, subject) {
|
||||||
if (subject.isInGroup("wheel")){ // for sudo
|
if (subject.isInGroup("wheel")){ // for sudo
|
||||||
return polkit.Result.YES;
|
return polkit.Result.YES;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
};
|
};
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
|
|
||||||
beet-n() {
|
beet-n() {
|
||||||
echo "$*" | aichat -cer beets
|
echo "$*" | aichat -cer beets
|
||||||
}
|
}
|
||||||
beet-p() {
|
beet-p() {
|
||||||
beet mod path:. playlist="$*"
|
beet mod path:. playlist="$*"
|
||||||
}
|
}
|
||||||
beet-ims() {
|
beet-ims() {
|
||||||
beet im ./ -S $*
|
beet im ./ -S $*
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# shell
|
# shell
|
||||||
|
|||||||
@@ -154,10 +154,10 @@ 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 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 public_wopi_url --value ${lib.escapeShellArg public_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 wopi_allowlist --value ${lib.escapeShellArg wopi_allowlist}
|
||||||
${occ}/bin/nextcloud-occ richdocuments:setup
|
${occ}/bin/nextcloud-occ richdocuments:setup
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
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";
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
requisite = [ "mnt-mobile.mount" ]; # hard-code
|
requisite = [ "mnt-mobile.mount" ]; # hard-code
|
||||||
script = ''
|
script = ''
|
||||||
|
|
||||||
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.server-home}/Music/ ${xlib.dirs.mobile-drive}/Music/
|
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.server-home}/Music/ ${xlib.dirs.mobile-drive}/Music/
|
||||||
${pkgs.rsync}/bin/rsync -rtv --delete "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/"
|
${pkgs.rsync}/bin/rsync -rtv --delete "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/"
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
@@ -37,18 +37,18 @@
|
|||||||
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";
|
||||||
|
|||||||
@@ -65,8 +65,8 @@
|
|||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
|
|
||||||
cd /mnt/containers/3x-ui
|
cd /mnt/containers/3x-ui
|
||||||
podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+15
-15
@@ -25,11 +25,11 @@ in
|
|||||||
locations."/" = {
|
locations."/" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
auth_basic "Restricted";
|
auth_basic "Restricted";
|
||||||
auth_basic_user_file /etc/nginx/pubray;
|
auth_basic_user_file /etc/nginx/pubray;
|
||||||
|
|
||||||
if ($subfile = "") { return 403; }
|
if ($subfile = "") { return 403; }
|
||||||
rewrite ^/$ $subfile break;
|
rewrite ^/$ $subfile break;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -42,7 +42,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# "node-red.zeroq.ru" = {
|
# "node-red.zeroq.ru" = {
|
||||||
@@ -76,7 +76,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"office.zeroq.ru" = {
|
"office.zeroq.ru" = {
|
||||||
@@ -90,10 +90,10 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
''; # absolute_redirect off;
|
''; # absolute_redirect off;
|
||||||
};
|
};
|
||||||
"immich.zeroq.ru" = {
|
"immich.zeroq.ru" = {
|
||||||
@@ -105,7 +105,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"nextcloud.zeroq.ru" = {
|
"nextcloud.zeroq.ru" = {
|
||||||
@@ -123,7 +123,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"calibre.zeroq.ru" = {
|
"calibre.zeroq.ru" = {
|
||||||
@@ -135,7 +135,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"pdf.zeroq.ru" = {
|
"pdf.zeroq.ru" = {
|
||||||
@@ -147,7 +147,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"ai.zeroq.ru" = {
|
"ai.zeroq.ru" = {
|
||||||
@@ -159,7 +159,7 @@ in
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
||||||
client_max_body_size 5G;
|
client_max_body_size 5G;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ let
|
|||||||
{ name, artifact }:
|
{ name, artifact }:
|
||||||
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
|
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
|
||||||
|
|
||||||
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
|
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
|
||||||
mv "$TMPDIR/p/$hash" "$out"
|
mv "$TMPDIR/p/$hash" "$out"
|
||||||
chmod 755 "$out"
|
chmod 755 "$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fetchZig =
|
fetchZig =
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
};
|
};
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
||||||
ln -s ${
|
ln -s ${
|
||||||
callPackage ./build.zig.zon.nix {
|
callPackage ./build.zig.zon.nix {
|
||||||
zig = zig_0_15;
|
zig = zig_0_15;
|
||||||
}
|
}
|
||||||
} $ZIG_GLOBAL_CACHE_DIR/p
|
} $ZIG_GLOBAL_CACHE_DIR/p
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ zig_0_15 ];
|
nativeBuildInputs = [ zig_0_15 ];
|
||||||
|
|||||||
Reference in New Issue
Block a user