diff --git a/configurations/server.nix b/configurations/server.nix index 9599a36..7e3fc68 100644 --- a/configurations/server.nix +++ b/configurations/server.nix @@ -95,8 +95,7 @@ let throttled.enable = true; journald = { extraConfig = '' - - SystemMaxUse=512M + SystemMaxUse=512M ''; }; openssh = { diff --git a/configurations/vds.nix b/configurations/vds.nix index 51a16d5..a888030 100644 --- a/configurations/vds.nix +++ b/configurations/vds.nix @@ -43,8 +43,7 @@ let earlyoom.enable = true; journald = { extraConfig = '' - - SystemMaxUse=512M + SystemMaxUse=512M ''; }; samba = { diff --git a/configurations/wsl.nix b/configurations/wsl.nix index 1ac7a8f..cda090b 100644 --- a/configurations/wsl.nix +++ b/configurations/wsl.nix @@ -24,8 +24,7 @@ let services = { journald = { extraConfig = '' - - SystemMaxUse=512M + SystemMaxUse=512M ''; }; earlyoom.enable = true; diff --git a/home/primary.nix b/home/primary.nix index 8b80bf9..b37da73 100644 --- a/home/primary.nix +++ b/home/primary.nix @@ -64,8 +64,7 @@ in }; home.activation = { yaziSync = '' - - ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/" + ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.user-storage}/yazi/" ''; }; } diff --git a/home/server.nix b/home/server.nix index ffc0ad2..fa197d5 100644 --- a/home/server.nix +++ b/home/server.nix @@ -40,8 +40,7 @@ in }; home.activation = { yaziSync = '' - - ${pkgs.rsync}/bin/rsync -Lrv --no-A --no-X "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.storage}/yazi/" + ${pkgs.rsync}/bin/rsync -Lrv --no-A --no-X "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.storage}/yazi/" ''; }; } diff --git a/home/wsl.nix b/home/wsl.nix index 0d0ae39..4d0f686 100644 --- a/home/wsl.nix +++ b/home/wsl.nix @@ -43,8 +43,7 @@ in }; home.activation = { yaziSync = '' - - ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.wsl-storage}/yazi/" + ${pkgs.rsync}/bin/rsync -Lrv "${config.home.homeDirectory}/.config/yazi/" "${xlib.dirs.wsl-storage}/yazi/" ''; }; } diff --git a/modules/essentials/packages.nix b/modules/essentials/packages.nix index 24db46c..2b65393 100644 --- a/modules/essentials/packages.nix +++ b/modules/essentials/packages.nix @@ -93,10 +93,9 @@ in nano = { enable = true; nanorc = '' - - set nowrap - set tabstospaces - set tabsize 2 + set nowrap + set tabstospaces + set tabsize 2 ''; syntaxHighlight = true; }; diff --git a/modules/essentials/settings.nix b/modules/essentials/settings.nix index 07d8d0d..a7a7776 100644 --- a/modules/essentials/settings.nix +++ b/modules/essentials/settings.nix @@ -38,12 +38,11 @@ polkit = { enable = true; extraConfig = '' - - polkit.addRule(function(action, subject) { - if (subject.isInGroup("wheel")){ // for sudo - return polkit.Result.YES; - } - }); + polkit.addRule(function(action, subject) { + if (subject.isInGroup("wheel")){ // for sudo + return polkit.Result.YES; + } + }); ''; }; }; diff --git a/modules/essentials/shell.nix b/modules/essentials/shell.nix index 3d9cf40..a83b63c 100644 --- a/modules/essentials/shell.nix +++ b/modules/essentials/shell.nix @@ -19,16 +19,15 @@ theme = "robbyrussell"; }; shellInit = '' - - beet-n() { - echo "$*" | aichat -cer beets - } - beet-p() { - beet mod path:. playlist="$*" - } - beet-ims() { - beet im ./ -S $* - } + beet-n() { + echo "$*" | aichat -cer beets + } + beet-p() { + beet mod path:. playlist="$*" + } + beet-ims() { + beet im ./ -S $* + } ''; shellAliases = { # shell diff --git a/modules/server/nextcloud.nix b/modules/server/nextcloud.nix index 2517094..db86810 100644 --- a/modules/server/nextcloud.nix +++ b/modules/server/nextcloud.nix @@ -153,11 +153,10 @@ in ]; requires = [ "coolwsd.service" ]; 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_allowlist --value ${lib.escapeShellArg wopi_allowlist} - ${occ}/bin/nextcloud-occ richdocuments:setup + ${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_allowlist --value ${lib.escapeShellArg wopi_allowlist} + ${occ}/bin/nextcloud-occ richdocuments:setup ''; serviceConfig = { Type = "oneshot"; diff --git a/modules/server/systemd.nix b/modules/server/systemd.nix index 9e82e08..b640ae0 100644 --- a/modules/server/systemd.nix +++ b/modules/server/systemd.nix @@ -13,8 +13,7 @@ description = "Backup data using rsync"; requisite = [ "mnt-archive.mount" ]; # hard-code 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 = { Type = "oneshot"; @@ -29,9 +28,8 @@ description = "Backup data using rsync"; requisite = [ "mnt-mobile.mount" ]; # hard-code 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}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/" + ${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/" ''; serviceConfig = { Type = "oneshot"; diff --git a/modules/services/zapret.nix b/modules/services/zapret.nix index 2c8799c..e231f1e 100644 --- a/modules/services/zapret.nix +++ b/modules/services/zapret.nix @@ -36,19 +36,16 @@ WorkingDirectory = "${xlib.dirs.user-services}/zapret"; User = "root"; 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 = '' - - /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 = '' # /run/current-system/sw/bin/echo "Сервис завершён" # ''; PIDFile = '' - - /run/zapret_discord_youtube.pid + /run/zapret_discord_youtube.pid ''; # Restart = "on-failure"; # RestartSec = "5s"; diff --git a/modules/vds/3x-ui.nix b/modules/vds/3x-ui.nix index abc8e3b..3778fb7 100644 --- a/modules/vds/3x-ui.nix +++ b/modules/vds/3x-ui.nix @@ -64,9 +64,8 @@ TimeoutSec = 300; }; 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 . ''; }; diff --git a/modules/vds/nginx.nix b/modules/vds/nginx.nix index 667738a..1c7a449 100644 --- a/modules/vds/nginx.nix +++ b/modules/vds/nginx.nix @@ -24,12 +24,11 @@ in root = "${inputs.zeroq-credentials.services.xray.subs}"; locations."/" = { extraConfig = '' - - auth_basic "Restricted"; - auth_basic_user_file /etc/nginx/pubray; - - if ($subfile = "") { return 403; } - rewrite ^/$ $subfile break; + auth_basic "Restricted"; + auth_basic_user_file /etc/nginx/pubray; + + if ($subfile = "") { return 403; } + rewrite ^/$ $subfile break; ''; }; }; @@ -41,8 +40,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; # "node-red.zeroq.ru" = { @@ -75,8 +73,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; "office.zeroq.ru" = { @@ -89,11 +86,10 @@ in }; }; extraConfig = '' - - client_max_body_size 5G; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 5G; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; ''; # absolute_redirect off; }; "immich.zeroq.ru" = { @@ -104,8 +100,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; "nextcloud.zeroq.ru" = { @@ -122,8 +117,7 @@ in }; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; "calibre.zeroq.ru" = { @@ -134,8 +128,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; "pdf.zeroq.ru" = { @@ -146,8 +139,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; "ai.zeroq.ru" = { @@ -158,8 +150,7 @@ in proxyWebsockets = true; }; extraConfig = '' - - client_max_body_size 5G; + client_max_body_size 5G; ''; }; };