neovim: add a bunch of configuration

This commit is contained in:
Anthony Rodriguez 2024-09-24 23:47:40 +02:00
parent 402926b78b
commit 9078b65d49
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
5 changed files with 84 additions and 81 deletions

View file

@ -683,11 +683,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1727149466,
"narHash": "sha256-xOZq7IhHrkLhjdhfcdaDY4Ru2o0C9jtuoEpUtGGFYJE=",
"lastModified": 1727186381,
"narHash": "sha256-T6vSJAvbYSBsaUkwh2adbIt7liE2xpcRhmlosMNZnDo=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "901346e38b81c236305e29934dd02c1f64bd8621",
"rev": "8f991cc8bc417ddbd1d5c7732268255557c13f4a",
"type": "github"
},
"original": {
@ -848,11 +848,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1727148426,
"narHash": "sha256-R0mIsBwxtX6i54XvM02JXTAq5xmbmOvYyGWc5GiOIxI=",
"lastModified": 1727179231,
"narHash": "sha256-Jm9w3lBmX5D2IKhmpGUvb4XXEK8h3rqGv1LETphJEiY=",
"owner": "notashelf",
"repo": "nvf",
"rev": "316f25a0f62696b289ad4b944789beaae7fa9415",
"rev": "8e96f0aaa325b992d17a3e7c9613344680375791",
"type": "github"
},
"original": {
@ -1985,11 +1985,11 @@
"plugin-nvim-treesitter-context": {
"flake": false,
"locked": {
"lastModified": 1716388265,
"narHash": "sha256-EY5Si6t7LXcxOP3ubGAAMd3lgbeaCOCIybSKi1Ucx98=",
"lastModified": 1726947805,
"narHash": "sha256-5oN/vyhSqDqjLEzECj01A7A+Yq7U1H1HXLbzkC1Ljqw=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "f62bfe19e0fbc13ae95649dfb3cf22f4ff85b683",
"rev": "3d5390c49e3f8fe457b376df2a49aa39d75b7911",
"type": "github"
},
"original": {

View file

@ -1,17 +1,14 @@
{
description = "nezia's nixos configuration";
outputs =
{
outputs = {
nixpkgs,
home-manager,
nixvim,
nvf,
sops-nix,
stylix,
...
}@inputs:
let
} @ inputs: let
username = "nezia";
system = "x86_64-linux";
@ -24,14 +21,16 @@
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
nixvim.homeManagerModules.nixvim
];
home-manager.extraSpecialArgs = {
extraSpecialArgs = {
inherit inputs system;
};
};
}
{
_module.args = {
@ -40,17 +39,15 @@
}
];
configureSystem =
hostname: homeConfig:
configureSystem = hostname: homeConfig:
nixpkgs.lib.nixosSystem {
system = system;
modules = commonModules hostname ++ [ { home-manager.users."${username}" = import homeConfig; } ];
inherit system;
modules = commonModules hostname ++ [{home-manager.users."${username}" = import homeConfig;}];
specialArgs = {
inherit inputs;
};
};
in
{
in {
nixosConfigurations = {
vamos = configureSystem "vamos" ./home/laptop;
solaire = configureSystem "solaire" ./home/desktop;

View file

@ -2,7 +2,6 @@ _: {
imports = [
./git.nix
./gnupg.nix
# ./wezterm.nix
./browsers.nix
./miscellaneous.nix
];

View file

@ -1,6 +1,4 @@
{ inputs, ... }:
{
{inputs, ...}: {
imports = [
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
@ -12,7 +10,7 @@
enable = true;
keyboards = {
default = {
ids = [ "*" ];
ids = ["*"];
settings = {
main = {
capslock = "overload(control, esc)";
@ -21,5 +19,8 @@
};
};
};
modules.neovim.enable = true;
modules = {
neovim.enable = true;
wezterm.enable = true;
};
}

View file

@ -5,11 +5,9 @@
pkgs,
username,
...
}:
let
}: let
cfg = config.modules.neovim;
in
{
in {
options.modules.neovim.enable = lib.mkEnableOption "neovim";
config = lib.mkIf cfg.enable {
@ -18,7 +16,7 @@ in
};
home-manager.users.${username} = {
imports = [ inputs.nvf.homeManagerModules.default ];
imports = [inputs.nvf.homeManagerModules.default];
programs.nvf = {
enable = true;
@ -39,25 +37,40 @@ in
''
];
maps = {
normal = {
"<leader>m" = {
silent = true;
action = "<cmd>make<CR>";
}; # Same as nnoremap <leader>m <silent> <cmd>make<CR>
"<leader>t" = {
silent = true;
action = "<cmd>Neotree toggle<CR>";
};
};
};
theme = {
enable = true;
name = "catppuccin";
style = "frappe";
};
maps = {
normal = {
"<leader>t" = {
action = "<CMD>Neotree toggle<CR>";
silent = true;
};
visuals = {
enable = true;
nvimWebDevicons.enable = true;
};
ui = {
noice.enable = true;
};
statusline.lualine = {
enable = true;
theme = "catppuccin";
};
git.enable = true;
lsp = {
enable = true;
lspSignature.enable = true;
@ -110,14 +123,7 @@ in
};
binds.whichKey.enable = true;
visuals.nvimWebDevicons.enable = true;
filetree.neo-tree = {
enable = true;
setupOpts = {
git_status_async = true;
};
};
filetree.neo-tree.enable = true;
telescope.enable = true;
};