Adding nixvim

This commit is contained in:
2025-09-17 11:31:58 -04:00
parent e75178c276
commit 8c1552cdde
8 changed files with 484 additions and 227 deletions

144
flake.lock generated
View File

@@ -141,6 +141,45 @@
"type": "indirect" "type": "indirect"
} }
}, },
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
@@ -539,6 +578,34 @@
"type": "github" "type": "github"
} }
}, },
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
},
"neovim-config": { "neovim-config": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -696,6 +763,52 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
},
"locked": {
"lastModified": 1758061611,
"narHash": "sha256-WJJDjNu80dWMSlpexhgRybPsvwl8C2tPwT6yM918Tsg=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "7f45eae65baa38d77d09e0fcf5bfeab6c0f733c0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1757885130,
"narHash": "sha256-56CMb5W/pgjKLh0bx2ekhn5rde/YmgR63HAqrY9/BCw=",
"owner": "NuschtOS",
"repo": "search",
"rev": "fae3c59a646e00c4b1d359c50b27458a0713d2fd",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -730,6 +843,7 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
@@ -768,6 +882,36 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View File

@@ -22,13 +22,16 @@
neovim-config = { neovim-config = {
url = "git+https://git.th3r00t.net/th3r00t/nvim-config.git?ref=New-Master"; url = "git+https://git.th3r00t.net/th3r00t/nvim-config.git?ref=New-Master";
# url = "git+ssh://git@git.th3r00t.net/th3r00t/nvim-config.git?ref=main"; # url = "git+ssh://git@git.th3r00t.net/th3r00t/nvim-config.git?ref=main";
flake = false; flake = false;
}; };
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
self, nixpkgs, home-manager, nix-index-database, sops-nix, disko, self, nixpkgs, home-manager, nix-index-database, sops-nix, disko,
nixos-hardware, ... nixos-hardware, nixvim, ...
}@inputs: }@inputs:
let let
overlays = [ overlays = [
@@ -64,11 +67,11 @@
./home/xps13.nix ./home/xps13.nix
nix-index-database.homeModules.nix-index nix-index-database.homeModules.nix-index
]; ];
home.file.".config/nvim" = { # home.file.".config/nvim" = {
source = inputs.neovim-config; # source = inputs.neovim-config;
recursive = true; # recursive = true;
# executable = true; # # executable = true;
}; # };
}; };
} }
]; ];
@@ -92,11 +95,11 @@
./home/server.nix ./home/server.nix
nix-index-database.homeModules.nix-index nix-index-database.homeModules.nix-index
]; ];
home.file.".config/nvim" = { # home.file.".config/nvim" = {
source = inputs.neovim-config; # source = inputs.neovim-config;
recursive = true; # recursive = true;
# executable = true; # # executable = true;
}; # };
}; };
# home-manager.users.th3r00t = import ./home.nix; # home-manager.users.th3r00t = import ./home.nix;
} }
@@ -121,11 +124,11 @@
./home/server.nix ./home/server.nix
nix-index-database.homeModules.nix-index nix-index-database.homeModules.nix-index
]; ];
home.file.".config/nvim" = { # home.file.".config/nvim" = {
source = inputs.neovim-config; # source = inputs.neovim-config;
recursive = true; # recursive = true;
# executable = true; # # executable = true;
}; # };
}; };
# home-manager.users.th3r00t = import ./home.nix; # home-manager.users.th3r00t = import ./home.nix;
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, inputs, ... }:
{ {
home.file.".local/usr/bin" = { home.file.".local/usr/bin" = {
@@ -27,7 +27,10 @@
../modules/shells.nix ../modules/shells.nix
../modules/tmux.nix ../modules/tmux.nix
../modules/ranger.nix ../modules/ranger.nix
inputs.nixvim.homeModules.nixvim
../modules/nixvim/nixvim.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
autossh autossh
elinks elinks
@@ -85,7 +88,7 @@
) )
) )
pyenv pyenv
neovim # neovim provided by nixvim
zig zig
syncthing syncthing
lazygit lazygit
@@ -103,18 +106,19 @@
httpie httpie
]; ];
programs.neovim.plugins = [ programs = {
neovim.plugins = [
pkgs.vimPlugins.nvim-treesitter.withAllGrammars pkgs.vimPlugins.nvim-treesitter.withAllGrammars
pkgs.VimPlugins.coc-nvim pkgs.VimPlugins.coc-nvim
]; ];
programs.taskwarrior = {
taskwarrior = {
enable = true; enable = true;
}; };
services.syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384"; fzf = {
};
programs.fzf = {
enable = true; enable = true;
tmux.enableShellIntegration = true; tmux.enableShellIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
@@ -133,7 +137,8 @@
header = "#87afaf"; header = "#87afaf";
}; };
}; };
programs.git = {
git = {
enable = true; enable = true;
userName = "th3r00t"; userName = "th3r00t";
userEmail = "tty303@proton.me"; userEmail = "tty303@proton.me";
@@ -144,18 +149,19 @@
user.signingkey = "~/.ssh/id_ed25519.pub"; user.signingkey = "~/.ssh/id_ed25519.pub";
}; };
}; };
programs.direnv = {
direnv = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.eza = { eza = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
programs.ssh = { ssh = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
Host * Host *
@@ -177,4 +183,9 @@
}; };
}; };
}; };
};
services.syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384";
};
} }

View File

@@ -1,27 +1,18 @@
* Emacs litterate config file * Emacs litterate config file
I am using straight as the backend for use package and have thusly set it in I am using straight as the backend for use package and have thusly set it in
[./early-init.el] [./early-init.el]
** Use-Package
Install use-package and enable ':ensure t' globally.
#+begin_src emacs-lisp
(straight-use-package 'use-package)
(setq use-package-always-ensure t)
(use-package straight
:custom
(straight-use-package-by-default t))
#+end_src
As a lifetime vim user I need to evil keys set up early
** Overrides ** Overrides
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(setq custom-file (locate-user-emacs-file "custom-vars.el")) (setq custom-file (locate-user-emacs-file "custom-vars.el"))
(load custom-file 'noerror 'nomessage) (load custom-file 'noerror 'nomessage)
(setq global-auto-revert-non-file-buffers 't) (setq global-auto-revert-non-file-buffers 't)
(setq evil-want-keybinding nil)
#+end_src #+end_src
** Evil Mode ** Evil Mode
*** Undo-Tree *** Undo-Tree
evil mode requires undo-tree so I have it set to compress the undo files evil mode requires undo-tree so I have it set to compress the undo files
and enable undo-tree mode globally and enable undo-tree mode globally
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package undo-tree :config (use-package undo-tree :config
(global-undo-tree-mode) (global-undo-tree-mode)
(setq undo-tree-auto-save-history t) (setq undo-tree-auto-save-history t)
@@ -32,12 +23,12 @@ and enable undo-tree mode globally
*** goto-chg *** goto-chg
It also requires goto-chg It also requires goto-chg
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package goto-chg) (use-package goto-chg)
#+end_src #+end_src
*** Evil Mode *** Evil Mode
Now I hook in Evil mode Now I hook in Evil mode
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package evil :config (use-package evil :config
(evil-mode 1) (evil-mode 1)
(setq evil-search-module 'evil-search) (setq evil-search-module 'evil-search)
@@ -54,7 +45,7 @@ Now I hook in Evil mode
(kbd "<leader>e e") 'eval-buffer) (kbd "<leader>e e") 'eval-buffer)
#+end_src #+end_src
*** Evil Collection *** Evil Collection
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package evil-collection :after evil (use-package evil-collection :after evil
:ensure t :ensure t
:config :config
@@ -70,39 +61,41 @@ Now I hook in Evil mode
#+end_src #+end_src
** UI ** UI
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package treemacs :config (use-package treemacs :config
(evil-define-key 'normal 'global (kbd "<leader> f e") 'treemacs)) (evil-define-key 'normal 'global (kbd "<leader> f e") 'treemacs))
#+end_src #+end_src
Enable which key mode Enable which key mode
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(which-key-mode) (which-key-mode)
#+end_src #+end_src
** Theming ** Theming
*** Fonts / icons *** Fonts / icons
Icons must be installed 'all-the-icons-install Icons must be installed 'all-the-icons-install
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package all-the-icons (use-package all-the-icons
:if (display-graphic-p)) :if (display-graphic-p))
(use-package nerd-icons
:if (display-graphic-p))
(use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode))
#+end_src #+end_src
*** UI System *** UI System
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(require 'recentf) (require 'recentf)
(recentf-mode 1) (recentf-mode 1)
(setq history-length 50) (setq history-length 50)
(savehist-mode 1) (savehist-mode 1)
(setq recentf-max-menu-items 25) (setq recentf-max-menu-items 25)
(save-place-mode 1) (save-place-mode 1)
(menu-bar-mode -1) (menu-bar-mode 1)
(tool-bar-mode -1) (tool-bar-mode 1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(global-display-line-numbers-mode 1) (global-display-line-numbers-mode 1)
(hl-line-mode 1) (hl-line-mode 1)
(blink-cursor-mode 1) (blink-cursor-mode 1)
#+end_src #+end_src
*** Color Scheme -> load-theme here *** Color Scheme -> load-theme here
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package doom-themes (use-package doom-themes
:ensure t :ensure t
:config :config
@@ -118,9 +111,27 @@ Icons must be installed 'all-the-icons-install
(doom-themes-org-config)) (doom-themes-org-config))
#+end_src #+end_src
** Utilities ** Utilities
*** Lsp's
#+begin_src emacs-lisp :tangle yes
(use-package lsp-mode
:init
(setq lsp-keymap-prefix "C-c l")
:hook(
(python-mode . lsp)
(js-mode . lsp)
(typescript . lsp)
(rust-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration)
(zig-mode . lsp)
(nim-mode . lsp)
)
:commands lsp)
;; Tree-sitter grammars are provided by NixOS packages instead of runtime compilation
#+end_src
*** Completion *** Completion
**** counsel **** counsel
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package counsel :config (counsel-mode)) (use-package counsel :config (counsel-mode))
(use-package swiper) (use-package swiper)
(use-package ivy :config (use-package ivy :config
@@ -152,7 +163,7 @@ Icons must be installed 'all-the-icons-install
:init (ivy-rich-mode 1)) :init (ivy-rich-mode 1))
#+end_src #+end_src
**** helpful **** helpful
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package helpful (use-package helpful
:config :config
(global-set-key (kbd "C-h f") #'helpful-callable) (global-set-key (kbd "C-h f") #'helpful-callable)
@@ -164,7 +175,7 @@ Icons must be installed 'all-the-icons-install
** Org Mode ** Org Mode
*** Org Roam *** Org Roam
Presents a good example of use-package's capabilities. Presents a good example of use-package's capabilities.
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(use-package org-roam :ensure t :after org :custom (org-roam-directory "~/org/roam") :bind (use-package org-roam :ensure t :after org :custom (org-roam-directory "~/org/roam") :bind
(("C-c n l" . org-roam-buffer-toggle) (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find) ("C-c n f" . org-roam-node-find)
@@ -178,13 +189,9 @@ Presents a good example of use-package's capabilities.
(concat "${title:*} " (concat "${title:*} "
(propertize "${tags:10}" 'face 'org-tag))) (propertize "${tags:10}" 'face 'org-tag)))
(setq org-roam-database-connector 'sqlite-builtin) (setq org-roam-database-connector 'sqlite-builtin)
(setq org-roam-capture-templates '(("d" "default" plain "%?"
:target (file+head "${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)))
#+end_src #+end_src
#+begin_src #+begin_src emacs-lisp :tangle yes
(org-roam-capture-templates (setq org-roam-capture-templates
'(("d" "default" plain '(("d" "default" plain
"%?" "%?"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
@@ -199,13 +206,13 @@ Presents a good example of use-package's capabilities.
:unnarrowed t) :unnarrowed t)
("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n" ("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project") :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: Project")
:unnarrowed t)) :unnarrowed t)))
#+end_src #+end_src
**** Capture Templates **** Capture Templates
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
#+end_src #+end_src
*** Org Agenda *** Org Agenda
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA") (setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA")
#+end_src #+end_src
*** Capture Templates *** Capture Templates
@@ -214,7 +221,7 @@ Presents a good example of use-package's capabilities.
:ID: e81c993e-995d-492f-af46-73928c0a4fbd :ID: e81c993e-995d-492f-af46-73928c0a4fbd
:END: :END:
[https://d12frosted.io/posts/2020-06-23-task-management-with-roam-vol1.html] [https://d12frosted.io/posts/2020-06-23-task-management-with-roam-vol1.html]
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(setq org-capture-templates (setq org-capture-templates
'(("t" "todo" entry (file org-default-notes-file) '(("t" "todo" entry (file org-default-notes-file)
"* TODO %?\n%u\n%a\n" :clock-in t :clock-resume t) "* TODO %?\n%u\n%a\n" :clock-in t :clock-resume t)
@@ -227,7 +234,7 @@ Presents a good example of use-package's capabilities.
("n" "Next Task" entry (file+headline org-default-notes-file "Tasks") ("n" "Next Task" entry (file+headline org-default-notes-file "Tasks")
"** NEXT %? \nDEADLINE: %t") )) "** NEXT %? \nDEADLINE: %t") ))
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp :tangle yes
(setq org-agenda-prefix-format (setq org-agenda-prefix-format
'((agenda . " %i %-12(vulpea-agenda-category)%?-12t% s") '((agenda . " %i %-12(vulpea-agenda-category)%?-12t% s")
(todo . " %i %-12(vulpea-agenda-category) ") (todo . " %i %-12(vulpea-agenda-category) ")
@@ -385,49 +392,3 @@ Presents a good example of use-package's capabilities.
(add-hook 'vulpea-insert-handle-functions (add-hook 'vulpea-insert-handle-functions
#'my-vulpea-insert-handle) #'my-vulpea-insert-handle)
#+end_src #+end_src
* EXWM
#+begin_src emacs-lisp
(require 'exwm)
;; Set the initial workspace number.
(setq exwm-workspace-number 4)
;; Make class name the buffer name.
(add-hook 'exwm-update-class-hook
(lambda () (exwm-workspace-rename-buffer exwm-class-name)))
;; Global keybindings.
(setq exwm-input-global-keys
`(([?\s-r] . exwm-reset) ;; s-r: Reset (to line-mode).
([?\s-w] . exwm-workspace-switch) ;; s-w: Switch workspace.
([?\s-&] . (lambda (cmd) ;; s-&: Launch application.
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command cmd nil cmd)))
;; s-N: Switch to certain workspace.
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
;; Enable EXWM
;; let's get encryption established
(setenv "GPG_AGENT_INFO" nil) ;; use emacs pinentry
(setq auth-source-debug t)
(setq epg-gpg-program "gpg2") ;; not necessary
(require 'epa-file)
(epa-file-enable)
(setq epa-pinentry-mode 'loopback)
(setq epg-pinentry-mode 'loopback)
(pinentry-start)
(require 'org-crypt)
(org-crypt-use-before-save-magic)
(require 'exwm-randr)
(require 'exwm-systemtray)
(setq exwm-randr-workspace-output-plist '(o "eDP-1"))
(add-hook 'exwm-randr-screen-change-hook
(lambda ()
(start-process-shell-command
"xrandr" nil "xrandr --output eDP-1 --scale .5 --filter nearest")))
(exwm-randr-enable)
(exwm-systemtray-enable)

View File

@@ -39,6 +39,37 @@
enableDefaultPackages = true; enableDefaultPackages = true;
fontDir.enable = true; fontDir.enable = true;
packages = with pkgs; [ packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
font-awesome
material-design-icons
noto-fonts-emoji
]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable=true;
};
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
curl
age
(pkgs.emacsWithPackagesFromUsePackage { (pkgs.emacsWithPackagesFromUsePackage {
# Your Emacs config file. Org mode babel files are also # Your Emacs config file. Org mode babel files are also
# supported. # supported.
@@ -87,6 +118,14 @@
extraEmacsPackages = epkgs: [ extraEmacsPackages = epkgs: [
epkgs.cask epkgs.cask
pkgs.shellcheck pkgs.shellcheck
# Additional packages needed by emacs.org config
epkgs.s # string manipulation library used by vulpea functions
# Language servers for lsp-mode
# pkgs.basedpyright # Python LSP
pkgs.typescript-language-server # TypeScript/JavaScript LSP
pkgs.rust-analyzer # Rust LSP
pkgs.zls # Zig LSP
pkgs.nimlsp # Nim LSP
]; ];
# Optionally override derivations. # Optionally override derivations.
@@ -96,37 +135,6 @@
}); });
}; };
}) })
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
font-awesome
material-design-icons
noto-fonts-emoji
]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable=true;
};
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
curl
age
]; ];
#media-session.enable = true; #media-session.enable = true;

46
modules/nixvim/nixvim.nix Normal file
View File

@@ -0,0 +1,46 @@
{ config, pkgs, lib, inputs, ... }:
{
imports = [
../which-key.nix
];
programs.nixvim = {
enable = true;
colorschemes = {
cyberdream = {
enable = true;
settings = {
borderless_telescope = true;
hide_fillchars = true;
italic_comments = true;
transparent = true;
};
};
};
plugins = {
alpha = {
enable = true;
theme = "dashboard";
};
fzf-lua = {
lazyLoad.enable = true;
settings = {
files = {
color_icons = true;
file_icons = true;
find_opts = {
__raw = "[[-type f -not -path '*.git/objects*' -not -path '*.env*']]";
};
multiprocess = true;
prompt = "󰆤 ";"
};
winopts = {
col = 0.3;
height = 0.4;
row = 0.99;
width = 0.93;
};
};
};
};
};
}

View File

@@ -0,0 +1,45 @@
{ config, pkgs, lib, inputs, ... }:
{
programs.nixvim.plugins.which-key = {
lazyLoad.enable = true;
settings = {
delay = 200;
expand = 1;
notify = false;
replace = {
desc = [
["<space>" "SPACE"]
["<leader>" "LEADER"]
["<[cC][rR]>" "ENTER"]
["<[tT][aA][bB]>" "TAB"]
["<s-tab>" "S-TAB"]
["<[bB][sS]>" "BACKSPACE"]
];
};
spec = [
{ __unkeyed-1 = "<leader>b"; group = "Buffers"; icon = "󰓩 "; }
{ __unkeyed = "<leader>c"; group = "Codesnap"; icon = "󰄄 "; mode = "v"; }
{ __unkeyed-1 = "<leader>bs"; group = "Sort"; icon = "󰒺 "; }
{ __unkeyed-1 =
[
{ __unkeyed-1 = "<leader>f"; group = "Normal Visual Group"; }
{ __unkeyed-1 = "<leader>f<tab>"; group = "Normal Visual Group in Group"; }
];
mode = ["n" "v"];
}
{ __unkeyed-1 = "<leader>w"; group = "windows"; proxy = "<C-w>"; }
{ __unkeyed-1 = "<leader>cS"; __unkeyed-2 = "<cmd>CodeSnapSave<CR>"; desc = "Save"; mode = "v"; }
{ __unkeyed-1 = "<leader>db"; __unkeyed-2 = {
__raw = ''function() require("dap").toggle_breakpoint() end'';
};
desc = "Breakpoint toggle";
mode = "n";
silent = true;
}
];
win = {
border = "rounded";
};
};
};
}