diff --git a/home/dot_config/nvim/lua/config/options.lua b/home/dot_config/nvim/lua/config/options.lua index a1a180a..c2d1b9c 100644 --- a/home/dot_config/nvim/lua/config/options.lua +++ b/home/dot_config/nvim/lua/config/options.lua @@ -66,21 +66,10 @@ opt.conceallevel = 2 -- opt.laststatus = 0 -- 3: Global status line (always at the bottom) opt.laststatus = 3 +vim.go.laststatus = 3 vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" -- hover.nvim vim.o.mousemoveevent = true --- Hide zero-width space --- vim.api.nvim_create_autocmd("FileType", { --- pattern = "*", --- callback = function() --- vim.opt_local.conceallevel = 2 --- vim.cmd([[ --- syntax match ZeroWidthSpace /\%u200b/ conceal --- highlight link ZeroWidthSpace Conceal --- ]]) --- end, --- }) - vim.fn.matchadd("Conceal", [[\%u200b]], 10, -1, { conceal = "" }) diff --git a/home/dot_config/nvim/lua/plugins/fileutils.lua b/home/dot_config/nvim/lua/plugins/fileutils.lua index 40899fa..4a577b2 100644 --- a/home/dot_config/nvim/lua/plugins/fileutils.lua +++ b/home/dot_config/nvim/lua/plugins/fileutils.lua @@ -1,4 +1,8 @@ return { + -- Picker + { import = "plugins.mod.fzf" }, + -- Explorer + { import = "plugins.mod.neo-tree" }, { "rmagatti/auto-session", event = "BufReadPre", @@ -12,9 +16,6 @@ return { { "ps", "AutoSession search", desc = "List all sessions" }, }, }, - -- { import = "plugins.mod.nvim-tree" }, - -- { import = "plugins.mod.telescope" }, - { import = "plugins.mod.fzf" }, -- { -- "ahmedkhalf/project.nvim", -- event = "VeryLazy", @@ -37,5 +38,4 @@ return { "Neogit", }, }, - -- { import = "plugins.mod.neo-tree" }, } diff --git a/home/dot_config/nvim/lua/plugins/mod/lualine/init.lua b/home/dot_config/nvim/lua/plugins/mod/lualine/init.lua index 6253e08..bae074b 100644 --- a/home/dot_config/nvim/lua/plugins/mod/lualine/init.lua +++ b/home/dot_config/nvim/lua/plugins/mod/lualine/init.lua @@ -22,7 +22,7 @@ local config = { -- theme = "catppuccin", theme = "auto", -- IDE-like Global Status - globalstaus = true, + globalstaus = true, -- also set vim.go.laststatus = 3 }, sections = { -- these are to remove the defaults diff --git a/home/dot_config/nvim/lua/plugins/mod/neo-tree.lua b/home/dot_config/nvim/lua/plugins/mod/neo-tree.lua index 0502999..46fb2a4 100644 --- a/home/dot_config/nvim/lua/plugins/mod/neo-tree.lua +++ b/home/dot_config/nvim/lua/plugins/mod/neo-tree.lua @@ -12,78 +12,84 @@ return { ---@type neotree.Config? opts = { window = { -mappings = { - [""] = "noop", - ["e"] = "noop", - ["<2-LeftMouse>"] = "open", - [""] = "open", - ["i"] = "open", - [""] = "cancel", -- close preview or floating neo-tree window - ["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } }, - -- Read `# Preview Mode` for more information - -- ["i"] = "focus_preview", - ["S"] = "open_split", - ["s"] = "open_vsplit", - -- ["S"] = "split_with_window_picker", - -- ["s"] = "vsplit_with_window_picker", - ["t"] = "open_tabnew", - -- [""] = "open_drop", - -- ["t"] = "open_tab_drop", - ["w"] = "open_with_window_picker", - --["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing - ["C"] = "close_node", - -- ['C'] = 'close_all_subnodes', - ["z"] = "close_all_nodes", - --["Z"] = "expand_all_nodes", - ["a"] = { - "add", - -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details - -- some commands may take optional config options, see `:h neo-tree-mappings` for details - config = { - show_path = "none", -- "none", "relative", "absolute" + mappings = { + [""] = "noop", -- Pass it to leader + ["e"] = "noop", + ["<2-LeftMouse>"] = "open", + [""] = "open", + ["i"] = "open", + [""] = "cancel", -- close preview or floating neo-tree window + ["P"] = { "toggle_preview", config = { use_float = true, use_snacks_image = true } }, + -- Read `# Preview Mode` for more information + -- ["i"] = "focus_preview", + ["S"] = "open_split", + ["s"] = "open_vsplit", + [""] = "open_vsplit", + -- ["S"] = "split_with_window_picker", + -- ["s"] = "vsplit_with_window_picker", + ["t"] = "open_tabnew", + -- [""] = "open_drop", + -- ["t"] = "open_tab_drop", + ["w"] = "open_with_window_picker", + --["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing + ["C"] = "close_node", + -- ['C'] = 'close_all_subnodes', + ["z"] = "close_all_nodes", + --["Z"] = "expand_all_nodes", + ["a"] = { + "add", + -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details + -- some commands may take optional config options, see `:h neo-tree-mappings` for details + config = { + show_path = "none", -- "none", "relative", "absolute" + }, }, + ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. + ["d"] = "delete", + ["r"] = "rename", + ["b"] = "rename_basename", + ["y"] = "copy_to_clipboard", + ["x"] = "cut_to_clipboard", + ["p"] = "paste_from_clipboard", + ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": + -- ["c"] = { + -- "copy", + -- config = { + -- show_path = "none" -- "none", "relative", "absolute" + -- } + --} + ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". + ["q"] = "close_window", + ["R"] = "refresh", + ["?"] = "show_help", + ["<"] = "prev_source", + [">"] = "next_source", + ["l"] = "show_file_details", + -- ["i"] = { + -- "show_file_details", + -- -- format strings of the timestamps shown for date created and last modified (see `:h os.date()`) + -- -- both options accept a string or a function that takes in the date in seconds and returns a string to display + -- -- config = { + -- -- created_format = "%Y-%m-%d %I:%M %p", + -- -- modified_format = "relative", -- equivalent to the line below + -- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end + -- -- } + -- }, }, - ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. - ["d"] = "delete", - ["r"] = "rename", - ["b"] = "rename_basename", - ["y"] = "copy_to_clipboard", - ["x"] = "cut_to_clipboard", - ["p"] = "paste_from_clipboard", - ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": - -- ["c"] = { - -- "copy", - -- config = { - -- show_path = "none" -- "none", "relative", "absolute" - -- } - --} - ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". - ["q"] = "close_window", - ["R"] = "refresh", - ["?"] = "show_help", - ["<"] = "prev_source", - [">"] = "next_source", - ["l"] = "show_file_details", - -- ["i"] = { - -- "show_file_details", - -- -- format strings of the timestamps shown for date created and last modified (see `:h os.date()`) - -- -- both options accept a string or a function that takes in the date in seconds and returns a string to display - -- -- config = { - -- -- created_format = "%Y-%m-%d %I:%M %p", - -- -- modified_format = "relative", -- equivalent to the line below - -- -- modified_format = function(seconds) return require('neo-tree.utils').relative_date(seconds) end - -- -- } - -- }, - } - } - -- fill any relevant options here + }, + -- fill any relevant options here + filesystem = { + follow_current_file = { + enabled = true, + leave_dirs_open = true, + }, + }, }, keys = { { "ft", "Neotree toggle", desc = "Toggle File Explorer", - } - } - + }, + }, } diff --git a/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua index 7815266..a59bb56 100644 --- a/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua +++ b/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua @@ -88,13 +88,13 @@ return { img_dirs = { "90 - System/Assets" }, }, }, - keys = { - { - "ft", - function() - require("snacks").explorer() - end, - desc = "Toggle File Explorer", - }, - }, + -- keys = { + -- { + -- "ft", + -- function() + -- require("snacks").explorer() + -- end, + -- desc = "Toggle File Explorer", + -- }, + -- }, } diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index 036250b..f8cd53f 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -19,6 +19,10 @@ # udev rules ../../modules/nixos/hardware/udev/basys3.nix + # Services + ../../modules/nixos/desktop/wayvnc.nix + ../../modules/nixos/core/sshd.nix + # desktop environment and display manager ../../modules/nixos/desktop/dm/sddm.nix ../../modules/nixos/desktop/de/kde.nix diff --git a/nixcfgs/modules/nixos/core/sshd.nix b/nixcfgs/modules/nixos/core/sshd.nix new file mode 100644 index 0000000..40e3341 --- /dev/null +++ b/nixcfgs/modules/nixos/core/sshd.nix @@ -0,0 +1,11 @@ +{...}: { + services.openssh = { + enable = true; + settings = { + UseDns = true; + PermitRootLogin = "no"; + # PasswordAuthentication = true; + # This is default to true, make sure override it when needed. + }; + }; +} diff --git a/nixcfgs/modules/nixos/desktop/wayvnc.nix b/nixcfgs/modules/nixos/desktop/wayvnc.nix new file mode 100644 index 0000000..eafbb1c --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/wayvnc.nix @@ -0,0 +1,3 @@ +{...}: { + programs.wayvnc.enable = true; +}