diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f0bd4f3..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -secrets.nix filter=git-crypt diff=git-crypt diff --git a/configuration.nix b/configuration.nix index de51a54..1c89cbc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -65,7 +65,7 @@ in }; - system.stateVersion = "22.05"; + system.stateVersion = "19.03"; # TODO: put nixpkgs stuff inside their own file nixpkgs.config.allowUnfree = true; diff --git a/dotfiles/neovim/README.md b/dotfiles/neovim/README.md index 3d29e77..b602fe7 100644 --- a/dotfiles/neovim/README.md +++ b/dotfiles/neovim/README.md @@ -4,6 +4,7 @@ - [Textobjects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/) - [Registers](https://www.brianstorti.com/vim-registers/) +- [Markers](https://vim.fandom.com/wiki/Using_marks) ## Keybinds @@ -14,13 +15,15 @@ Table of my own keybinds. Here as documentation for myself. I am yet to include | Keybind | Description | Plugins | | ------------ | ----------------------------------- | ------------------ | -| vv | Create vertical split | | +| _vs_ | Create vertical split | | | _cp_ | Use system clipboard | | | _jl_ | Save | | | _jk_ | Exit insert mode | | | _\k_ | Insert digraph | | | _\a_ | Swap last 2 used buffers | | | C-n | Open tree | nvim-tree | +| _vc_ | Clear vimux window | vimux | +| _vl_ | Rerun last vimux command | vimux | | _vp_ | Run command in another tmux pane | vimux | | C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator | | J | Show line diagnostics | lspconfig | @@ -65,6 +68,13 @@ The default brackets I load in each buffer are (), [], "", '', {} and \`\`. Diff | _rh_ | Refine hole | | _ac_ | Add clause | +### Purescript + +| Keybind | Description | +| ------- | ------------------------------------------- | +| _vb_ | Make tmux run spago build in sepearate pane | +| _vt_ | Make tmux run spago test in separate pane | + ### Lean - Extra brackets: ⟨⟩ diff --git a/dotfiles/neovim/ftplugin/purescript.lua b/dotfiles/neovim/ftplugin/purescript.lua new file mode 100644 index 0000000..b83e13e --- /dev/null +++ b/dotfiles/neovim/ftplugin/purescript.lua @@ -0,0 +1,11 @@ +local arpeggio = require("my.plugins.arpeggio") + +-- Use vt to test +arpeggio.chordSilent("n", "vt", ":VimuxRunCommand \"clear && spago test\"", + {settings = "b"}) + +-- Use vb to build +arpeggio.chordSilent("n", "vb", ":VimuxRunCommand \"clear && spago build\"", + {settings = "b"}) + +vim.opt.expandtab = true -- Use spaces for the tab char diff --git a/dotfiles/neovim/lua/my/keymaps.lua b/dotfiles/neovim/lua/my/keymaps.lua index 1af6d52..c050c9b 100644 --- a/dotfiles/neovim/lua/my/keymaps.lua +++ b/dotfiles/neovim/lua/my/keymaps.lua @@ -22,11 +22,11 @@ function M.mapSilent(mode, lhs, rhs, opts) end function M.setup() - M.map("n", "vv", "v") -- Create vertical split M.map("n", "qq", ":wq") -- Create vertical split + -- Create chords if arpeggio ~= nil then - -- Create chords + arpeggio.chord("n", "vs", "v") -- Create vertical split arpeggio.chord("n", "ji", ":w") -- Saving arpeggio.chord("i", "jk", "") -- Remap Esc to jk arpeggio.chord("i", "k", "") -- Rebind digraph insertion to leader+k diff --git a/dotfiles/neovim/lua/my/options/files.lua b/dotfiles/neovim/lua/my/options/files.lua index 8b3f19f..42dc9eb 100644 --- a/dotfiles/neovim/lua/my/options/files.lua +++ b/dotfiles/neovim/lua/my/options/files.lua @@ -1,7 +1,7 @@ local au = require("my.helpers.augroup") local M = {} -local syntaxFiles = {bkf = "bkf"} +local syntaxFiles = {hkf = "hkf"} function M.setup() au.augroup("myfiledetection", function() diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 31cb091..ef3a3e4 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -36,7 +36,9 @@ function M.setup() "hrsh7th/nvim-cmp", -- completion engine "L3MON4D3/LuaSnip", -- snippeting engine "saadparwaiz1/cmp_luasnip", -- snippet support for cmp - "wakatime/vim-wakatime" -- track time usage + "wakatime/vim-wakatime", -- track time usage + "vmchale/dhall-vim", -- dhall syntax highlighting + "folke/which-key.nvim" } for _, v in ipairs(themePackages) do diff --git a/dotfiles/neovim/lua/my/plugins/cmp.lua b/dotfiles/neovim/lua/my/plugins/cmp.lua index cd7e1e5..c5c73eb 100644 --- a/dotfiles/neovim/lua/my/plugins/cmp.lua +++ b/dotfiles/neovim/lua/my/plugins/cmp.lua @@ -14,7 +14,7 @@ function M.setup() local luasnip = require("luasnip") local options = { - formatting = {format = lspkind.cmp_format()}, + formatting = {format = lspkind.cmp_format({mode = "symbol"})}, snippet = { -- REQUIRED - you must specify a snippet engine expand = function(args) diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index 14df11e..9e3f3d8 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -5,6 +5,7 @@ function M.setup() require('nvim-autopairs').setup() require("startup").setup() require("presence"):setup({}) -- wtf does the : do here? + -- require("which-key").setup() -- Plugins with their own configs: require("my.plugins.vim-tmux-navigator").setup() diff --git a/dotfiles/neovim/lua/my/plugins/lspconfig.lua b/dotfiles/neovim/lua/my/plugins/lspconfig.lua index b51453c..a8eeaab 100644 --- a/dotfiles/neovim/lua/my/plugins/lspconfig.lua +++ b/dotfiles/neovim/lua/my/plugins/lspconfig.lua @@ -71,6 +71,7 @@ end -- General server config local servers = { tsserver = {on_attach = on_attach_typescript}, + dhall_lsp_server = {}, sumneko_lua = { settings = { Lua = { diff --git a/dotfiles/neovim/lua/my/plugins/lualine.lua b/dotfiles/neovim/lua/my/plugins/lualine.lua index ea277fd..2a4c140 100644 --- a/dotfiles/neovim/lua/my/plugins/lualine.lua +++ b/dotfiles/neovim/lua/my/plugins/lualine.lua @@ -12,7 +12,8 @@ function M.setup() lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_c = {'filename'}, lualine_x = {}, - lualine_y = {'encoding', 'fileformat', 'filetype'}, + -- lualine_y = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'filetype'}, lualine_z = {'location'} }, -- Integration with other plugins diff --git a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua index 89f368e..e3cdd02 100644 --- a/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua +++ b/dotfiles/neovim/lua/my/plugins/vim-tmux-navigator.lua @@ -6,10 +6,10 @@ local M = {} function M.setup() vim.g.tmux_navigator_no_mappings = 1 - map("n", "C-h", ":TmuxNavigateLeft") - map("n", "C-j", ":TmuxNavigateDown") - map("n", "C-k", ":TmuxNavigateUp") - map("n", "C-l", ":TmuxNavigateRight") + map("n", "", ":TmuxNavigateLeft") + map("n", "", ":TmuxNavigateDown") + map("n", "", ":TmuxNavigateUp") + map("n", "", ":TmuxNavigateRight") end return M diff --git a/dotfiles/neovim/lua/my/plugins/vimux.lua b/dotfiles/neovim/lua/my/plugins/vimux.lua index 79942ce..d078e9b 100644 --- a/dotfiles/neovim/lua/my/plugins/vimux.lua +++ b/dotfiles/neovim/lua/my/plugins/vimux.lua @@ -4,6 +4,8 @@ local M = {} function M.setup() arpeggio.chordSilent("n", "vp", ":VimuxPromptCommand") + arpeggio.chordSilent("n", "vc", ":VimuxRunCommand \"clear\"") + arpeggio.chordSilent("n", "vl", ":VimuxRunLastCommand") end return M diff --git a/dotfiles/neovim/syntax/bkf.vim b/dotfiles/neovim/syntax/hkf.vim similarity index 100% rename from dotfiles/neovim/syntax/bkf.vim rename to dotfiles/neovim/syntax/hkf.vim diff --git a/modules/applications/misc.nix b/modules/applications/misc.nix index 0a2125a..2651ac5 100644 --- a/modules/applications/misc.nix +++ b/modules/applications/misc.nix @@ -34,7 +34,7 @@ # editors # vscodium - vscode + # vscode # vim # emacs vimclip # use neovim anywhere @@ -50,7 +50,7 @@ # browsers unstable.google-chrome # brave - firefox + # firefox # other stuff obsidian # knowedge base @@ -67,7 +67,7 @@ # blueman # bluetooth manager # freesweep # minesweeper I can play w the keyboard. # multimc - lmms # music software + # lmms # music software # Nes emulators and stuff # zsnes @@ -75,9 +75,9 @@ # fceux # games - # tetrio-desktop - vassal - # mindustry - # edopro + # tetrio-desktop # competitive tetris + # vassal # wargame engine + # mindustry # factory building game + # edopro # yugioh sim ]; } diff --git a/modules/applications/shells/common.nix b/modules/applications/shells/common.nix index fa418e5..919ac5b 100644 --- a/modules/applications/shells/common.nix +++ b/modules/applications/shells/common.nix @@ -1,4 +1,4 @@ { - shellInit = ""; + shellInit = "export GITHUB_TOKEN=$(cat ~/water/gh-token)"; # "neofetch --package_managers on --cpu_brand on --cpu_cores on --memory_percent on --memory_display infobar --os_arch on"; } diff --git a/modules/applications/shells/sessionVariables.nix b/modules/applications/shells/sessionVariables.nix index c3c3c2a..baad0d7 100644 --- a/modules/applications/shells/sessionVariables.nix +++ b/modules/applications/shells/sessionVariables.nix @@ -1,11 +1,9 @@ { pkgs, ... }: -with import ../../../secrets.nix; let theme = pkgs.myThemes.current; variables = { # Configure github cli GITHUB_USERNAME = "Mateiadrielrafael"; - inherit GITHUB_TOKEN; # Sets neovim as default editor EDITOR = "nvim"; diff --git a/modules/users.nix b/modules/users.nix index 3daac97..a6fbb85 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -1,5 +1,5 @@ { pkgs, ... }: -with import ../secrets.nix; { +{ # Disable asking for password for sudo security.sudo.extraRules = [ { @@ -14,8 +14,7 @@ with import ../secrets.nix; { users = { mutableUsers = false; users.adrielus = { - inherit hashedPassword; - + passwordFile = "~/water/pass"; extraGroups = [ "wheel" "networkmanager" "lp" "docker" ]; isNormalUser = true; shell = pkgs.fish; diff --git a/secrets.nix b/secrets.nix new file mode 100644 index 0000000..55e751b --- /dev/null +++ b/secrets.nix @@ -0,0 +1,5 @@ +{ + hashedPassword = + "$6$BRf2CtFq$xFyfiUjXpSLZSlbgmygv5JVxqiDy0U1Kn12lr3hTO07iHivu70kdASHm4Gg4EyVjNDMMJi8NlsEEH9HNtV9rA1"; + GITHUB_TOKEN = "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"; +}