moved the editor to helix

This commit is contained in:
Rouven Seifert 2023-04-22 14:15:53 +02:00
parent 84c821c66a
commit 73d5ac0435
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
10 changed files with 67 additions and 430 deletions

View file

@ -8,7 +8,7 @@
- **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme) - **Overall Theme:** [Base16 Dracula](https://github.com/dracula/base16-dracula-scheme)
- **Shell:** [Zsh](https://www.zsh.org/) - **Shell:** [Zsh](https://www.zsh.org/)
- **Terminal:** [Foot](https://codeberg.org/dnkl/foot) - **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) - **Notifications:** [Mako](https://github.com/emersion/mako)
- **Panel:** [Waybar](https://github.com/Alexays/Waybar) - **Panel:** [Waybar](https://github.com/Alexays/Waybar)
- **File Manager:** [Vifm](https://vifm.info/) - **File Manager:** [Vifm](https://vifm.info/)

View file

@ -16,100 +16,6 @@
"type": "github" "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -222,11 +128,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1682090414, "lastModified": 1682108218,
"narHash": "sha256-ZU0NVk068KndcG2o+JvgJPOfnjrCb36LP5wW/r1piXc=", "narHash": "sha256-tMr7BbxualFQlN+XopS8rMMgf2XR9ZfRuwIZtjsWmfI=",
"owner": "Misterio77", "owner": "Misterio77",
"repo": "nix-colors", "repo": "nix-colors",
"rev": "4ccd57b4d4f900567455542f114e062a4fab6a98", "rev": "b92df8f5eb1fa20d8e09810c03c9dc0d94ef2820",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -302,22 +208,6 @@
} }
}, },
"nixpkgs-stable": { "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": { "locked": {
"lastModified": 1681613598, "lastModified": 1681613598,
"narHash": "sha256-Ogkoma0ytYcDoMR2N7CZFABPo+i0NNo26dPngru9tPc=", "narHash": "sha256-Ogkoma0ytYcDoMR2N7CZFABPo+i0NNo26dPngru9tPc=",
@ -365,81 +255,6 @@
"type": "github" "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": { "purge": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -447,11 +262,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1681723877, "lastModified": 1682161980,
"narHash": "sha256-eC3IbyoXpVeBcknU1UHe8WAFBNWbFsnqmiz/uNQLPBc=", "narHash": "sha256-ZHIndiiiZ6gF9XpVNJ3wM/p5XOaWD52I6VO63xW0bhg=",
"owner": "therealr5", "owner": "therealr5",
"repo": "purge", "repo": "purge",
"rev": "51f25de6c189c5f3f2ff265acd77f98edcc72da5", "rev": "b931b85fa361958fae274ca5e633026e32c4c6a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -469,7 +284,6 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"purge": "purge", "purge": "purge",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"trucksimulatorbot-images": "trucksimulatorbot-images", "trucksimulatorbot-images": "trucksimulatorbot-images",
@ -481,7 +295,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1681821695, "lastModified": 1681821695,
@ -497,21 +311,6 @@
"type": "github" "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": { "trucksimulatorbot-images": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -532,21 +331,6 @@
"type": "github" "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": { "wlroots": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -2,78 +2,69 @@
description = "My nix setup"; description = "My nix setup";
inputs = { inputs = {
nixpkgs = { nixpkgs = {
url = github:nixos/nixpkgs/nixos-unstable; url = "github:nixos/nixpkgs/nixos-unstable";
}; };
nixos-hardware = { nixos-hardware = {
url = github:nixos/nixos-hardware; url = "github:nixos/nixos-hardware";
}; };
home-manager = { home-manager = {
url = github:nix-community/home-manager; url = "github:nix-community/home-manager";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };
}; };
nix-index-database = { nix-index-database = {
url = github:Mic92/nix-index-database; url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-colors = { nix-colors = {
url = github:Misterio77/nix-colors; url = "github:Misterio77/nix-colors";
}; };
sops-nix = { sops-nix = {
url = github:Mic92/sops-nix; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
xdph = { xdph = {
url = github:hyprwm/xdg-desktop-portal-hyprland; url = "github:hyprwm/xdg-desktop-portal-hyprland";
}; };
hyprland = { hyprland = {
# temp pin hyprland until wayland is updated in nixpkgs # temp pin hyprland until wayland is updated in nixpkgs
url = github:hyprwm/Hyprland/2df0d034bc4a18fafb3524401eeeceaa6b23e753; url = "github:hyprwm/Hyprland/2df0d034bc4a18fafb3524401eeeceaa6b23e753";
inputs = { inputs = {
xdph.follows = "xdph"; xdph.follows = "xdph";
}; };
}; };
hyprpaper = { hyprpaper = {
url = github:hyprwm/hyprpaper; url = "github:hyprwm/hyprpaper";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = {
url = github:pta2002/nixvim;
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
purge = { purge = {
url = github:therealr5/purge; url = "github:therealr5/purge";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
trucksimulatorbot-images = { trucksimulatorbot-images = {
url = github:therealr5/trucksimulatorbot-images; url = "github:therealr5/trucksimulatorbot-images";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = outputs =
{ self { nixpkgs
, nixpkgs
, home-manager , home-manager
, nix-index-database , nix-index-database
, hyprland , hyprland
, sops-nix , sops-nix
, nix-colors , nix-colors
, nixos-hardware , nixos-hardware
, nixvim
, purge , purge
, trucksimulatorbot-images , trucksimulatorbot-images
, ... , ...
@ -97,7 +88,6 @@
imports = [ imports = [
nix-colors.homeManagerModules.default nix-colors.homeManagerModules.default
hyprland.homeManagerModules.default hyprland.homeManagerModules.default
nixvim.homeManagerModules.nixvim
sops-nix.homeManagerModules.sops sops-nix.homeManagerModules.sops
nix-index-database.hmModules.nix-index nix-index-database.hmModules.nix-index
]; ];

View file

@ -25,10 +25,6 @@
syntax on syntax on
highlight ColorColumn ctermbg=darkgray highlight ColorColumn ctermbg=darkgray
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
" set space as leader " set space as leader
nnoremap <SPACE> <Nop> nnoremap <SPACE> <Nop>

View file

@ -19,7 +19,6 @@
switch = "sudo nixos-rebuild switch && cat ${../images/another-cat-2.sixel}"; switch = "sudo nixos-rebuild switch && cat ${../images/another-cat-2.sixel}";
update = "cd /etc/nixos && nix flake update && cat ${../images/another-cat.sixel}"; update = "cd /etc/nixos && nix flake update && cat ${../images/another-cat.sixel}";
garbage = "sudo nix-collect-garbage -d && cat ${../images/cat-garbage.sixel}"; garbage = "sudo nix-collect-garbage -d && cat ${../images/cat-garbage.sixel}";
q = "exit";
}; };
histSize = 100000; histSize = 100000;
histFile = "~/.local/share/zsh/history"; histFile = "~/.local/share/zsh/history";

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { ... }:
{ {
imports = [ imports = [
./accounts ./accounts
@ -6,8 +6,8 @@
./fzf ./fzf
./git ./git
./gpg ./gpg
./helix
./hyprland ./hyprland
./neovim
./qutebrowser ./qutebrowser
./sops ./sops
./spotify ./spotify

View file

@ -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;
};
};
};
};
}

View file

@ -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" = "<Nop>";
# Open the tree
"<leader>n" = ":NvimTreeFocus<CR>";
#trigger the fuzzy finder (telescope)
"<leader>f" = ":Telescope find_files<CR>";
"<leader>g" = ":Telescope git_files<CR>";
"<leader>r" = ":Telescope live_grep<CR>";
# diacnostics
"<leader>d" = ":Telescope diagnostics<CR>";
#quickfixlist binds
"<C-j>" = ":cnext<CR>";
"<C-k>" = ":cprev<CR>";
#locallist binds
"<C-l>" = ":lnext<CR>";
"<C-h>" = ":lprev<CR>";
#split keybinds
"<leader>s" = ":sp<CR>";
"<leader>v" = ":vs<CR>";
"<leader>h" = "<C-w>h";
"<leader>j" = "<C-w>j";
"<leader>k" = "<C-w>k";
"<leader>l" = "<C-w>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 <c-x><c-o>
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', '<leader>D', vim.lsp.buf.type_definition, bufopts)
vim.keymap.set('n', 'gn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>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";
};
}

View file

@ -61,6 +61,7 @@
gdb gdb
powerline-fonts powerline-fonts
vscode
# libs # libs
libyubikey libyubikey

View file

@ -203,8 +203,6 @@ fileviewer *.docx docx2txt.pl %f -
filetype * xdg-open filetype * xdg-open
nnoremap : ;
nnoremap ; :
" Start shell in current directory " Start shell in current directory
nnoremap S :shell<cr> nnoremap S :shell<cr>