Changed nixvim to nvf
This commit is contained in:
parent
9f55457ddf
commit
b66cb9f49d
10 changed files with 4988 additions and 410 deletions
2492
flake.lock
generated
2492
flake.lock
generated
File diff suppressed because it is too large
Load diff
26
flake.nix
26
flake.nix
|
|
@ -5,8 +5,8 @@
|
|||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
neovim = {
|
||||
url = "path:nixos/modules/neovim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
|
|
@ -43,8 +43,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
#systems = ["aarch64-linux" "x86_64-linux" ];
|
||||
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
#pkgs = import nixpkgs {
|
||||
|
|
@ -57,10 +60,12 @@
|
|||
x86 = "x86_64-linux";
|
||||
|
||||
first-nixos-install = "1729112485"; #stat -c %W /
|
||||
in
|
||||
{
|
||||
in {
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs { system = "aarch64-linux"; overlays = [ inputs.nix-on-droid.overlays.default ]; };
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [inputs.nix-on-droid.overlays.default];
|
||||
};
|
||||
modules = [./nixos/hosts/android];
|
||||
home-manager-path = inputs.home-manager.outPath;
|
||||
extraSpecialArgs = {
|
||||
|
|
@ -77,7 +82,6 @@
|
|||
nixosConfigurations = {
|
||||
"kylekrein-homepc" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
|
||||
hwconfig = {
|
||||
hostname = "kylekrein-homepc";
|
||||
isLaptop = false;
|
||||
|
|
@ -85,7 +89,8 @@
|
|||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs; };
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
system = x86;
|
||||
pkgs = import nixpkgs {
|
||||
|
|
@ -113,7 +118,8 @@ pkgs = import nixpkgs {
|
|||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs; };
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
system = arm;
|
||||
pkgs = import nixpkgs {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
inputs.disko.nixosModules.default
|
||||
|
||||
./modules/firefox
|
||||
|
|
@ -196,26 +195,11 @@
|
|||
obs-studio
|
||||
vesktop
|
||||
vscode-fhs
|
||||
inputs.neovim.packages.${hwconfig.system}.default
|
||||
];
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde;
|
||||
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
colorschemes.catppuccin.enable = true;
|
||||
plugins = {
|
||||
lualine.enable = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
shiftwidth = 4;
|
||||
};
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
./modules/nixvim
|
||||
./modules/fastfetch
|
||||
./modules/tmux/home.nix
|
||||
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
];
|
||||
environment.packages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
inputs.neovim.packages.aarch64-linux.default
|
||||
|
||||
(pkgs.writeShellScriptBin "droid-switch" ''
|
||||
nix-on-droid switch --flake /data/data/com.termux.nix/files/home/nixos-config
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixvim
|
||||
#../../modules/nixvim
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
|
|
|
|||
2341
nixos/modules/neovim/flake.lock
generated
Normal file
2341
nixos/modules/neovim/flake.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
34
nixos/modules/neovim/flake.nix
Normal file
34
nixos/modules/neovim/flake.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "A neovim configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nvf,
|
||||
...
|
||||
}: {
|
||||
packages.x86_64-linux.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
packages.aarch64-linux.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-linux;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
packages.aarch64-darwin.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
};
|
||||
}
|
||||
205
nixos/modules/neovim/nvf-configuration.nix
Normal file
205
nixos/modules/neovim/nvf-configuration.nix
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
vim = {
|
||||
spellcheck.enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
shiftwidth = 4;
|
||||
tabstop = 4;
|
||||
useSystemClipboard = true;
|
||||
lineNumberMode = "number";
|
||||
|
||||
languages = {
|
||||
enableFormat = true;
|
||||
enableLSP = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
clang.enable = true;
|
||||
rust.crates.enable = true;
|
||||
csharp.enable = true;
|
||||
# Nim LSP is broken on Darwin and therefore
|
||||
# should be disabled by default. Users may still enable
|
||||
# `vim.languages.vim` to enable it, this does not restrict
|
||||
# that.
|
||||
# See: <https://github.com/PMunch/nimlsp/issues/178#issue-2128106096>
|
||||
nim.enable = false;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = true;
|
||||
lsplines.enable = true;
|
||||
nvim-docs-view.enable = true;
|
||||
};
|
||||
|
||||
debugger = {
|
||||
nvim-dap = {
|
||||
enable = true;
|
||||
ui.enable = true;
|
||||
};
|
||||
};
|
||||
visuals = {
|
||||
nvim-scrollbar.enable = true;
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
|
||||
# Fun
|
||||
cellular-automaton.enable = false;
|
||||
};
|
||||
statusline = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "catppuccin";
|
||||
style = "mocha";
|
||||
transparent = false;
|
||||
};
|
||||
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
snippets.luasnip.enable = true;
|
||||
|
||||
filetree = {
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
tabline = {
|
||||
nvimBufferline.enable = true;
|
||||
};
|
||||
|
||||
treesitter.context.enable = true;
|
||||
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
|
||||
telescope.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false; # throws an annoying debug message
|
||||
};
|
||||
|
||||
minimap = {
|
||||
minimap-vim.enable = false;
|
||||
codewindow.enable = true; # lighter, faster, and uses lua for configuration
|
||||
};
|
||||
|
||||
dashboard = {
|
||||
dashboard-nvim.enable = false;
|
||||
alpha.enable = true;
|
||||
};
|
||||
|
||||
notify = {
|
||||
nvim-notify.enable = true;
|
||||
};
|
||||
|
||||
projects = {
|
||||
project-nvim.enable = true;
|
||||
};
|
||||
|
||||
utility = {
|
||||
ccc.enable = false;
|
||||
vim-wakatime.enable = false;
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = true;
|
||||
};
|
||||
|
||||
images = {
|
||||
image-nvim.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
notes = {
|
||||
obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled
|
||||
neorg.enable = false;
|
||||
orgmode.enable = false;
|
||||
mind-nvim.enable = true;
|
||||
todo-comments.enable = true;
|
||||
};
|
||||
|
||||
terminal = {
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
lazygit.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
modes-nvim.enable = false; # the theme looks terrible with catppuccin
|
||||
illuminate.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
navbuddy.enable = true;
|
||||
};
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts.custom_colorcolumn = {
|
||||
# this is a freeform module, it's `buftype = int;` for configuring column position
|
||||
nix = "110";
|
||||
ruby = "120";
|
||||
java = "130";
|
||||
go = ["90" "130"];
|
||||
};
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
assistant = {
|
||||
chatgpt.enable = false;
|
||||
copilot = {
|
||||
enable = false;
|
||||
cmp.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
session = {
|
||||
nvim-session-manager.enable = false;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
gesture-nvim.enable = false;
|
||||
};
|
||||
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
presence = {
|
||||
neocord.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
plugins = {
|
||||
markview.enable = true;
|
||||
tmux-navigator = {
|
||||
enable = true;
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
};
|
||||
lsp-format = {
|
||||
enable = false;
|
||||
};
|
||||
lsp = {
|
||||
enable = false;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
nixd = {
|
||||
enable = true;
|
||||
#extraOptions = {
|
||||
# nixos = {
|
||||
# expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options";
|
||||
#};
|
||||
#home_manager = {
|
||||
# expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options";
|
||||
#};
|
||||
#};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
opts = {
|
||||
number = true;
|
||||
shiftwidth = 4;
|
||||
relativenumber = false;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue