feat: add custom neovim

This commit is contained in:
Youwen Wu 2024-09-03 18:24:51 -07:00
parent fb1f1e58cc
commit b82303c2d6
Signed by untrusted user: youwen
GPG key ID: 865658ED1FE61EC3
4 changed files with 139 additions and 110 deletions

85
flake.lock generated
View file

@ -3,6 +3,7 @@
"devshell": { "devshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -52,8 +53,27 @@
} }
}, },
"flake-parts": { "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": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -93,15 +113,18 @@
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"nixvim",
"nixvim", "nixvim",
"flake-compat" "flake-compat"
], ],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": [ "nixpkgs-stable": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -123,6 +146,7 @@
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"git-hooks", "git-hooks",
"nixpkgs" "nixpkgs"
@ -165,6 +189,7 @@
"home-manager_2": { "home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -186,6 +211,7 @@
"nix-darwin": { "nix-darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -216,26 +242,75 @@
"type": "indirect" "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": { "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": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixpkgs" "nixpkgs"
], ],
"nuschtosSearch": "nuschtosSearch", "nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1725223906, "lastModified": 1725408484,
"narHash": "sha256-f6wliEr+oLzKxgJxgkf1bCebmDosq2l8RujIueQK3Qk=", "narHash": "sha256-Q8OPrs2IVpo+9jpCtdbd8yF6EhC3AYscCkCAalpyvHg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "2b30ee87031fb40f0f894de00c23ea41714d940e", "rev": "d928d6deb18274b12edfc10681e52e50b51c3e35",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -248,6 +323,7 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]
@ -313,6 +389,7 @@
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixvim", "nixvim",
"nixpkgs" "nixpkgs"
] ]

View file

@ -10,21 +10,22 @@
url = "github:Gerg-L/spicetify-nix"; url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = { nixvim.url = "github:youwen5/neovim-flake";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
}; };
};
outputs = { outputs =
{
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
... ...
} @ inputs: { }@inputs:
{
formatter."x86_64-linux" = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter."x86_64-linux" = nixpkgs.legacyPackages.x86_64-linux.alejandra;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = {
inherit inputs;
};
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
@ -34,7 +35,9 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {
inherit inputs;
};
users.kaitotlex = { users.kaitotlex = {
imports = [ imports = [
./home.nix ./home.nix

View file

@ -1,5 +1,4 @@
{ {
config,
pkgs, pkgs,
inputs, inputs,
... ...
@ -82,7 +81,7 @@
# productivity # productivity
hugo # static site generator hugo # static site generator
glow # markdown previewer in terminal glow # markdown previewer in terminal
obsidian #markdown previewer obsidian # markdown previewer
thunderbird-unwrapped # Full Feature Email Client thunderbird-unwrapped # Full Feature Email Client
# LaTeX stuff # LaTeX stuff
@ -118,7 +117,6 @@
kanagawa-gtk-theme kanagawa-gtk-theme
kanagawa-icon-theme kanagawa-icon-theme
# system tools # system tools
sysstat sysstat
lm_sensors # for `sensors` command lm_sensors # for `sensors` command
@ -131,8 +129,8 @@
signal-desktop signal-desktop
gh gh
]; inputs.nixvim.packages.${pkgs.system}.default
];
services.dunst.enable = true; services.dunst.enable = true;
@ -178,9 +176,20 @@
"DP-1" "DP-1"
"HDMI-A-1" "HDMI-A-1"
]; ];
modules-left = ["hyprland/workspaces" "sway/submap" "wlr/taskbar"]; modules-left = [
modules-center = ["hyprland/window" "custom/hello-from-waybar"]; "hyprland/workspaces"
modules-right = ["mpd" "custom/mymodule#with-css-id" "temperature"]; "sway/submap"
"wlr/taskbar"
];
modules-center = [
"hyprland/window"
"custom/hello-from-waybar"
];
modules-right = [
"mpd"
"custom/mymodule#with-css-id"
"temperature"
];
"hyprland/workspaces" = { "hyprland/workspaces" = {
disable-scroll = true; disable-scroll = true;
@ -289,29 +298,6 @@
programs.fzf.enable = true; 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 # This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards # when a new home Manager release introduces backwards

View file

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