From 2814a5918652de3d3c215737ff71d74da371a191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Dudr?= Date: Wed, 24 Aug 2022 16:35:34 +0200 Subject: [PATCH] sync --- dot_config/kitty/kitty.conf | 2 +- dot_config/kitty/open-actions.conf | 2 +- dot_config/nginx/nginx.conf.tmpl | 49 +++++++++++++++++++++++++++--- dot_config/nvim/init.lua | 14 ++++++--- dot_config/picom/picom.conf | 2 +- dot_config/zsh/aliases.zsh | 1 + 6 files changed, 58 insertions(+), 12 deletions(-) diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index 66b9b34..aaf811d 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -1939,4 +1939,4 @@ map opt+cmd+, debug_config #: }}} -#include Gruvbox Dark Hard.conf +# include Gruvbox Dark Hard.conf diff --git a/dot_config/kitty/open-actions.conf b/dot_config/kitty/open-actions.conf index 949e556..ee380a9 100644 --- a/dot_config/kitty/open-actions.conf +++ b/dot_config/kitty/open-actions.conf @@ -2,7 +2,7 @@ # by the hyperlink_grep kitten and nothing else so far. protocol file fragment_matches [0-9]+ -action launch --type=overlay vim +${FRAGMENT} ${FILE_PATH} +action launch --type=overlay nvim +${FRAGMENT} ${FILE_PATH} # Open text files without fragments in the editor protocol file diff --git a/dot_config/nginx/nginx.conf.tmpl b/dot_config/nginx/nginx.conf.tmpl index 6053b3d..4ce1e57 100644 --- a/dot_config/nginx/nginx.conf.tmpl +++ b/dot_config/nginx/nginx.conf.tmpl @@ -55,6 +55,7 @@ http { add_header "Access-Control-Allow-Origin" $http_origin; add_header "Access-Control-Allow-Credentials" true; + add_header "Vary" "Origin"; access_log off; client_body_temp_path /run/user/{{ .chezmoi.gid }}/nginx/body; @@ -347,25 +348,65 @@ http { server { #server_name _; - server_name local3000.localhost; + server_name recepce.vizit.localhost; listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; + if ($https != 'on') { + return 301 https://$host$request_uri; + } + ssl_certificate {{ .chezmoi.homeDir }}/.config/nginx/ssl/localhost.crt; ssl_certificate_key {{ .chezmoi.homeDir }}/.config/nginx/ssl/localhost.key; + add_header "Access-Control-Allow-Headers" "Content-Type"; + add_header "Access-Control-Allow-Origin" $http_origin; + add_header "Access-Control-Allow-Credentials" true; + + root {{ .chezmoi.homeDir }}/jopixel/vizit/www/www; location / { proxy_pass http://127.0.0.1:3000; } location /api { - proxy_hide_header "Access-Control-Allow-Origin"; - proxy_hide_header "Access-Control-Allow-Credentials"; - proxy_pass https://recepce.vizit-virtualni-recepce.localhost; + fastcgi_hide_header Access-Control-Allow-Origin; + fastcgi_pass $php_version; + + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + + fastcgi_param SCRIPT_NAME index.php; + fastcgi_param REQUEST_URI $request_uri; + fastcgi_param DOCUMENT_URI $document_uri; + fastcgi_param DOCUMENT_ROOT $document_root; + fastcgi_param SERVER_PROTOCOL $server_protocol; + fastcgi_param REQUEST_SCHEME $scheme; + fastcgi_param HTTPS $https if_not_empty; + + fastcgi_param GATEWAY_INTERFACE CGI/1.1; + fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; + + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; + + # PHP only, required if PHP was built with --enable-force-cgi-redirect + fastcgi_param REDIRECT_STATUS 200; + + fastcgi_buffers 16 16k; + fastcgi_buffer_size 32k; + fastcgi_keep_conn on; + fastcgi_read_timeout 300s; + fastcgi_index index.php; } } diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index 514c64f..da2f24f 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -24,7 +24,7 @@ require('packer').startup(function(use) use { 'onsails/lspkind.nvim' } use 'ray-x/lsp_signature.nvim' use { 'RishabhRD/nvim-lsputils', requires = { 'RishabhRD/popfix' } } - use { 'weilbith/nvim-code-action-menu', cmd='CodeActionMenu' } + use { 'weilbith/nvim-code-action-menu', cmd = 'CodeActionMenu' } -- use { 'simrat39/symbols-outline.nvim', cmd = 'SymbolsOutline' } use { 'jose-elias-alvarez/null-ls.nvim', requires = { "nvim-lua/plenary.nvim" } } @@ -282,7 +282,7 @@ require 'lualine'.setup { inactive_sections = { lualine_a = {}, lualine_b = {}, - lualine_c = { 'filename' }, + lualine_c = { { 'filename', path = 1 } }, lualine_x = { 'location' }, lualine_y = {}, lualine_z = {} @@ -297,6 +297,7 @@ require('nvim-tree').setup({ renderer = { add_trailing = true, special_files = {}, + highlight_git = true, indent_markers = { enable = true, }, @@ -307,7 +308,10 @@ require('nvim-tree').setup({ folder_arrow = false, git = false } - } + }, + }, + git = { + ignore = true } }) @@ -392,7 +396,7 @@ local ts_parsers = require 'nvim-treesitter.parsers'.get_parser_configs() ts_parsers.xml = { install_info = { url = "https://github.com/dorgnarg/tree-sitter-xml", -- local path or git repo - files = {"src/parser.c"}, + files = { "src/parser.c" }, -- optional entries: branch = "main", -- default branch in case of git repo if different from master generate_requires_npm = false, -- if stand-alone parser without npm dependencies @@ -504,7 +508,7 @@ nls.setup({ } }, "fully_qualified_strict_types":false - } ]] } + } ]] } }), nls.builtins.diagnostics.shellcheck, nls.builtins.formatting.eslint, diff --git a/dot_config/picom/picom.conf b/dot_config/picom/picom.conf index b3cfb67..7193a41 100644 --- a/dot_config/picom/picom.conf +++ b/dot_config/picom/picom.conf @@ -409,5 +409,5 @@ wintypes: dock = { shadow = false; clip-shadow-above = true; } dnd = { shadow = false; } # popup_menu = { opacity = 0.8; } - dropdown_menu = { opacity = 0.8; } + # dropdown_menu = { opacity = 0.8; } }; diff --git a/dot_config/zsh/aliases.zsh b/dot_config/zsh/aliases.zsh index c70d66c..36eabb2 100644 --- a/dot_config/zsh/aliases.zsh +++ b/dot_config/zsh/aliases.zsh @@ -25,4 +25,5 @@ alias scus='systemctl --user stop' alias scust='systemctl --user status' alias slog='journalctl --user -u' +alias ls='ls --color=tty --hyperlink=auto' # vim: ft=zsh