feat: add custom neovim
This commit is contained in:
parent
fb1f1e58cc
commit
b82303c2d6
4 changed files with 139 additions and 110 deletions
85
flake.lock
generated
85
flake.lock
generated
|
@ -3,6 +3,7 @@
|
|||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -52,8 +53,27 @@
|
|||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -93,15 +113,18 @@
|
|||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -123,6 +146,7 @@
|
|||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
|
@ -165,6 +189,7 @@
|
|||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -186,6 +211,7 @@
|
|||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -216,26 +242,75 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1724567192,
|
||||
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1725103162,
|
||||
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixvim": "nixvim_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725326933,
|
||||
"narHash": "sha256-Nb4p08qt7bgga8eI4aucNSsUz9VlftjpzK+I3GsWoeU=",
|
||||
"owner": "youwen5",
|
||||
"repo": "neovim-flake",
|
||||
"rev": "59189d88dbebc19cde3d1472f4e83b572107a1ed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "youwen5",
|
||||
"repo": "neovim-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim_2": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1725223906,
|
||||
"narHash": "sha256-f6wliEr+oLzKxgJxgkf1bCebmDosq2l8RujIueQK3Qk=",
|
||||
"lastModified": 1725408484,
|
||||
"narHash": "sha256-Q8OPrs2IVpo+9jpCtdbd8yF6EhC3AYscCkCAalpyvHg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "2b30ee87031fb40f0f894de00c23ea41714d940e",
|
||||
"rev": "d928d6deb18274b12edfc10681e52e50b51c3e35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -248,6 +323,7 @@
|
|||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -313,6 +389,7 @@
|
|||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
|
|
19
flake.nix
19
flake.nix
|
@ -10,21 +10,22 @@
|
|||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim.url = "github:youwen5/neovim-flake";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: {
|
||||
}@inputs:
|
||||
{
|
||||
formatter."x86_64-linux" = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
@ -34,7 +35,9 @@
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
users.kaitotlex = {
|
||||
imports = [
|
||||
./home.nix
|
||||
|
|
44
home.nix
44
home.nix
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
|
@ -118,7 +117,6 @@
|
|||
kanagawa-gtk-theme
|
||||
kanagawa-icon-theme
|
||||
|
||||
|
||||
# system tools
|
||||
sysstat
|
||||
lm_sensors # for `sensors` command
|
||||
|
@ -131,9 +129,9 @@
|
|||
signal-desktop
|
||||
gh
|
||||
|
||||
inputs.nixvim.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
|
||||
services.dunst.enable = true;
|
||||
|
||||
# basic configuration of git, please change to your own
|
||||
|
@ -178,9 +176,20 @@
|
|||
"DP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
modules-left = ["hyprland/workspaces" "sway/submap" "wlr/taskbar"];
|
||||
modules-center = ["hyprland/window" "custom/hello-from-waybar"];
|
||||
modules-right = ["mpd" "custom/mymodule#with-css-id" "temperature"];
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"sway/submap"
|
||||
"wlr/taskbar"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/window"
|
||||
"custom/hello-from-waybar"
|
||||
];
|
||||
modules-right = [
|
||||
"mpd"
|
||||
"custom/mymodule#with-css-id"
|
||||
"temperature"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
|
@ -289,29 +298,6 @@
|
|||
|
||||
programs.fzf.enable = true;
|
||||
|
||||
programs.neovim ={
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
#viAlias = true;
|
||||
#vimAlias = true;
|
||||
#extraPackages= [
|
||||
#];
|
||||
#plugins = [
|
||||
#pkgs.vimPlugins.vim-latex-live-preview
|
||||
#pkgs.vimPlugins.vimsence
|
||||
#pkgs.vimPlugins.telescope-zoxide
|
||||
#{
|
||||
#plugin = pkgs.vimPlugins.vimtex;
|
||||
#config = "let g:vimtex_enabled =1";
|
||||
#}
|
||||
#pkgs.vimPlugins.mason-tool-installer-nvim
|
||||
#pkgs.vimPlugins.mason-lspconfig-nvim
|
||||
#pkgs.vimPlugins.kanagawa-nvim
|
||||
#];
|
||||
|
||||
|
||||
|
||||
# This value determines the home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new home Manager release introduces backwards
|
||||
|
|
37
nixvim.nix
37
nixvim.nix
|
@ -1,37 +0,0 @@
|
|||
{pkgs, lib, ...}:
|
||||
{
|
||||
|
||||
options.enable = lib.mkEnableOpton "nixvim";
|
||||
|
||||
Plugins = with pkgs.vimPlugins; [
|
||||
fzf-lua
|
||||
rose-pine
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>ss";
|
||||
mode = "n";
|
||||
action = ":lua require('nvim-possession').list()<CR>";
|
||||
options = {desc = "[s]ession: [s]elect";};
|
||||
}
|
||||
{
|
||||
key = "<leader>sn";
|
||||
mode = "n";
|
||||
action = ":lua require('nvim-possession').new()<CR>";
|
||||
options = {desc = "[s]ession: [n]ew";};
|
||||
}
|
||||
{
|
||||
key = "<leader>su";
|
||||
mode = "n";
|
||||
action = ":lua require('nvim-possession').update()<CR>";
|
||||
options = {desc = "[s]ession: [u]pdate";};
|
||||
}
|
||||
{
|
||||
key = "<leader>sd";
|
||||
mode = "n";
|
||||
action = ":lua require('nvim-possession').delete()<CR>";
|
||||
options = {desc = "[s]ession: [d]elete";};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue