diff --git a/README.md b/README.md index a9a5448..dcd773f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme) - **Shell:** [Zsh](https://www.zsh.org/) - **Terminal:** [Foot](https://codeberg.org/dnkl/foot) -- **Editor:** [Neovim](https://neovim.io/) +- **Editor:** [Helix](https://helix-editor.com) - **Notifications:** [Mako](https://github.com/emersion/mako) - **Panel:** [Waybar](https://github.com/Alexays/Waybar) - **File Manager:** [Vifm](https://vifm.info/) diff --git a/flake.lock b/flake.lock index 22b210b..d1023a4 100644 --- a/flake.lock +++ b/flake.lock @@ -16,100 +16,6 @@ "type": "github" } }, - "beautysh": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "poetry2nix": "poetry2nix", - "utils": "utils" - }, - "locked": { - "lastModified": 1680308980, - "narHash": "sha256-aUEHV0jk2qIFP3jlsWYWhBbm+w/N9gzH3e4I5DcdB5s=", - "owner": "lovesegfault", - "repo": "beautysh", - "rev": "9845efc3ea3e86cc0d41465d720a47f521b2799c", - "type": "github" - }, - "original": { - "owner": "lovesegfault", - "repo": "beautysh", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -222,11 +128,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1682090414, - "narHash": "sha256-ZU0NVk068KndcG2o+JvgJPOfnjrCb36LP5wW/r1piXc=", + "lastModified": 1682108218, + "narHash": "sha256-tMr7BbxualFQlN+XopS8rMMgf2XR9ZfRuwIZtjsWmfI=", "owner": "Misterio77", "repo": "nix-colors", - "rev": "4ccd57b4d4f900567455542f114e062a4fab6a98", + "rev": "b92df8f5eb1fa20d8e09810c03c9dc0d94ef2820", "type": "github" }, "original": { @@ -302,22 +208,6 @@ } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1681613598, "narHash": "sha256-Ogkoma0ytYcDoMR2N7CZFABPo+i0NNo26dPngru9tPc=", @@ -365,81 +255,6 @@ "type": "github" } }, - "nixvim": { - "inputs": { - "beautysh": "beautysh", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks" - }, - "locked": { - "lastModified": 1682064961, - "narHash": "sha256-aWu6ajA4oSMjZrphzcUrXw0hGNDB3KsOFHcb31oTAdQ=", - "owner": "pta2002", - "repo": "nixvim", - "rev": "52120a891d9a49c6aedde12b5cc9bc3f899db1e7", - "type": "github" - }, - "original": { - "owner": "pta2002", - "repo": "nixvim", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": [ - "nixvim", - "beautysh", - "utils" - ], - "nixpkgs": [ - "nixvim", - "beautysh", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1658665240, - "narHash": "sha256-/wkx7D7enyBPRjIkK0w7QxLQhzEkb3UxNQnjyc3FTUI=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "8b8edc85d24661d5a6d0d71d6a7011f3e699780f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1681413034, - "narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=", - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "type": "github" - } - }, "purge": { "inputs": { "nixpkgs": [ @@ -447,11 +262,11 @@ ] }, "locked": { - "lastModified": 1681723877, - "narHash": "sha256-eC3IbyoXpVeBcknU1UHe8WAFBNWbFsnqmiz/uNQLPBc=", + "lastModified": 1682161980, + "narHash": "sha256-ZHIndiiiZ6gF9XpVNJ3wM/p5XOaWD52I6VO63xW0bhg=", "owner": "therealr5", "repo": "purge", - "rev": "51f25de6c189c5f3f2ff265acd77f98edcc72da5", + "rev": "b931b85fa361958fae274ca5e633026e32c4c6a1", "type": "github" }, "original": { @@ -469,7 +284,6 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim", "purge": "purge", "sops-nix": "sops-nix", "trucksimulatorbot-images": "trucksimulatorbot-images", @@ -481,7 +295,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { "lastModified": 1681821695, @@ -497,21 +311,6 @@ "type": "github" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "trucksimulatorbot-images": { "inputs": { "nixpkgs": [ @@ -532,21 +331,6 @@ "type": "github" } }, - "utils": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "wlroots": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 0b0bcee..1789303 100644 --- a/flake.nix +++ b/flake.nix @@ -2,78 +2,69 @@ description = "My nix setup"; inputs = { nixpkgs = { - url = github:nixos/nixpkgs/nixos-unstable; + url = "github:nixos/nixpkgs/nixos-unstable"; }; nixos-hardware = { - url = github:nixos/nixos-hardware; + url = "github:nixos/nixos-hardware"; }; home-manager = { - url = github:nix-community/home-manager; + url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; nix-index-database = { - url = github:Mic92/nix-index-database; + url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-colors = { - url = github:Misterio77/nix-colors; + url = "github:Misterio77/nix-colors"; }; sops-nix = { - url = github:Mic92/sops-nix; + url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; xdph = { - url = github:hyprwm/xdg-desktop-portal-hyprland; + url = "github:hyprwm/xdg-desktop-portal-hyprland"; }; hyprland = { # temp pin hyprland until wayland is updated in nixpkgs - url = github:hyprwm/Hyprland/2df0d034bc4a18fafb3524401eeeceaa6b23e753; + url = "github:hyprwm/Hyprland/2df0d034bc4a18fafb3524401eeeceaa6b23e753"; inputs = { xdph.follows = "xdph"; }; }; hyprpaper = { - url = github:hyprwm/hyprpaper; + url = "github:hyprwm/hyprpaper"; inputs.nixpkgs.follows = "nixpkgs"; }; - nixvim = { - url = github:pta2002/nixvim; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - purge = { - url = github:therealr5/purge; + url = "github:therealr5/purge"; inputs.nixpkgs.follows = "nixpkgs"; }; trucksimulatorbot-images = { - url = github:therealr5/trucksimulatorbot-images; + url = "github:therealr5/trucksimulatorbot-images"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = - { self - , nixpkgs + { nixpkgs , home-manager , nix-index-database , hyprland , sops-nix , nix-colors , nixos-hardware - , nixvim , purge , trucksimulatorbot-images , ... @@ -97,7 +88,6 @@ imports = [ nix-colors.homeManagerModules.default hyprland.homeManagerModules.default - nixvim.homeManagerModules.nixvim sops-nix.homeManagerModules.sops nix-index-database.hmModules.nix-index ]; diff --git a/shared/vim.nix b/shared/vim.nix index 8abec0f..e0b2aaf 100644 --- a/shared/vim.nix +++ b/shared/vim.nix @@ -25,10 +25,6 @@ syntax on highlight ColorColumn ctermbg=darkgray - nnoremap ; : - nnoremap : ; - vnoremap ; : - vnoremap : ; " set space as leader nnoremap diff --git a/shared/zsh.nix b/shared/zsh.nix index af366a5..39d6c6b 100644 --- a/shared/zsh.nix +++ b/shared/zsh.nix @@ -19,7 +19,6 @@ switch = "sudo nixos-rebuild switch && cat ${../images/another-cat-2.sixel}"; update = "cd /etc/nixos && nix flake update && cat ${../images/another-cat.sixel}"; garbage = "sudo nix-collect-garbage -d && cat ${../images/cat-garbage.sixel}"; - q = "exit"; }; histSize = 100000; histFile = "~/.local/share/zsh/history"; diff --git a/users/rouven/modules/default.nix b/users/rouven/modules/default.nix index bc5eb4e..c3769fa 100644 --- a/users/rouven/modules/default.nix +++ b/users/rouven/modules/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ ./accounts @@ -6,8 +6,8 @@ ./fzf ./git ./gpg + ./helix ./hyprland - ./neovim ./qutebrowser ./sops ./spotify diff --git a/users/rouven/modules/helix/default.nix b/users/rouven/modules/helix/default.nix new file mode 100644 index 0000000..c91e727 --- /dev/null +++ b/users/rouven/modules/helix/default.nix @@ -0,0 +1,44 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + lldb + rust-analyzer + nil + (python3.withPackages (ps: with ps; [ + pyls-isort + pylsp-mypy + python-lsp-black + python-lsp-server + + # pylsp optional dependencies + types-requests + flake8 + mccabe + pycodestyle + pydocstyle + pyflakes + pylint + ])) + clang-tools + ]; + programs.helix = { + enable = true; + themes.dracula-transparent = { + inherits = "dracula"; + # hacky way to get the background transparent + "ui.background" = "{}"; + }; + settings = { + theme = "dracula-transparent"; + editor = { + line-number = "relative"; + cursor-shape.insert = "bar"; + lsp = { + display-messages = true; + display-inlay-hints = true; + }; + }; + + }; + }; +} diff --git a/users/rouven/modules/neovim/default.nix b/users/rouven/modules/neovim/default.nix deleted file mode 100644 index eb32a76..0000000 --- a/users/rouven/modules/neovim/default.nix +++ /dev/null @@ -1,175 +0,0 @@ -{ config, pkgs, ... }: -{ - programs.nixvim = { - enable = true; - vimAlias = true; - colorscheme = "dracula"; - options = - { - shiftwidth = 4; - expandtab = true; - preserveindent = true; - number = true; - relativenumber = true; - tabstop = 4; - smartcase = true; - colorcolumn = "120"; - wrap = false; - }; - globals = { - mapleader = " "; - dracula_colorterm = 0; - }; - maps = { - normalVisualOp = { - ";" = ":"; - ":" = ";"; - }; - normal = { - # remove ex mode shortcut - "Q" = ""; - # Open the tree - "n" = ":NvimTreeFocus"; - #trigger the fuzzy finder (telescope) - "f" = ":Telescope find_files"; - "g" = ":Telescope git_files"; - "r" = ":Telescope live_grep"; - # diacnostics - "d" = ":Telescope diagnostics"; - - #quickfixlist binds - "" = ":cnext"; - "" = ":cprev"; - - #locallist binds - "" = ":lnext"; - "" = ":lprev"; - - #split keybinds - "s" = ":sp"; - "v" = ":vs"; - "h" = "h"; - "j" = "j"; - "k" = "k"; - "l" = "l"; - - }; - }; - plugins = { - airline = { - enable = true; - powerline = true; - }; - nvim-tree = { - enable = true; - autoClose = true; - openOnSetup = true; - openOnSetupFile = true; - }; - telescope = { - enable = true; - }; - fugitive = { - enable = true; - }; - lsp = { - enable = true; - onAttach = '' - -- Enable completion triggered by - vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local bufopts = { noremap=true, silent=true, buffer=bufnr } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, bufopts) - vim.keymap.set('n', 'gn', vim.lsp.buf.rename, bufopts) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) - vim.keymap.set('n', 'b', function() vim.lsp.buf.format { async = true } end, bufopts) - - ''; - servers = { - # pylsp is broken - pyright = { - enable = true; - }; - texlab = { - enable = true; - }; - rnix-lsp = { - enable = true; - }; - clangd = { - enable = true; - }; - rust-analyzer = { - enable = true; - }; - }; - }; - null-ls = { - enable = true; - sources.formatting.black = { - enable = true; - withArgs = '' - ({ - extra_args = { "-l", "120" } - }) - ''; - }; - }; - nvim-cmp = { - enable = true; - mappingPresets = [ "insert" ]; - sources = [ - { - name = "nvim_lsp"; - } - { name = "path"; } - { name = "buffer"; } - ]; - }; - treesitter = { - enable = true; - indent = true; - #folding = true; # somewhat broken at the moment - grammarPackages = with pkgs.tree-sitter-grammars; [ - tree-sitter-bash - tree-sitter-c - tree-sitter-cpp - tree-sitter-css - tree-sitter-go - tree-sitter-haskell - tree-sitter-html - #tree-sitter-java - tree-sitter-javascript - tree-sitter-json - tree-sitter-latex - tree-sitter-lua - tree-sitter-markdown - tree-sitter-nix - tree-sitter-perl - tree-sitter-python - tree-sitter-regex - tree-sitter-rst - tree-sitter-rust - tree-sitter-sql - tree-sitter-toml - tree-sitter-typescript - tree-sitter-yaml - ]; - }; - }; - extraPlugins = with pkgs.vimPlugins; - [ - vim-nix - dracula-vim - nerdcommenter - ]; - highlight.ColorColumn.ctermbg = "darkgray"; - }; -} diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 3ac08b4..8c14aad 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -61,6 +61,7 @@ gdb powerline-fonts + vscode # libs libyubikey diff --git a/users/rouven/modules/vifm/vifmrc b/users/rouven/modules/vifm/vifmrc index ef7f9ad..afc7a53 100644 --- a/users/rouven/modules/vifm/vifmrc +++ b/users/rouven/modules/vifm/vifmrc @@ -203,8 +203,6 @@ fileviewer *.docx docx2txt.pl %f - filetype * xdg-open -nnoremap : ; -nnoremap ; : " Start shell in current directory nnoremap S :shell