feat(nixvim): base my vim config upon nixvim

This commit is contained in:
2025-12-12 16:11:13 +01:00
parent 68843be871
commit 9e167f82d3
3 changed files with 103 additions and 13 deletions

71
flake.lock generated
View File

@@ -1,5 +1,26 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1765495779,
"narHash": "sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "5635c32d666a59ec9a55cab87e898889869f7b71",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -7,11 +28,11 @@
]
},
"locked": {
"lastModified": 1765337252,
"narHash": "sha256-HuWQp8fM25fyWflbuunQkQI62Hg0ecJxWD52FAgmxqY=",
"lastModified": 1765480374,
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "13cc1efd78b943b98c08d74c9060a5b59bf86921",
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
"type": "github"
},
"original": {
@@ -36,6 +57,28 @@
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1765549401,
"narHash": "sha256-/7jUlBsI2DCm9LOF4upS7+kMYM4K78dPpHO5pCKYV6k=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "a80557e1425ad9438dde7652b12fd5a449df6f00",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"noctalia": {
"inputs": {
"nixpkgs": [
@@ -43,11 +86,11 @@
]
},
"locked": {
"lastModified": 1765420707,
"narHash": "sha256-lX0WxWosQbm3DrZhscVTiLLpJcoZvaQaZoP+eNt75wE=",
"lastModified": 1765548066,
"narHash": "sha256-HEzdYU0EvLRikJvNgKIjVgcJ6ohKA99V6FI0pX2ig0A=",
"owner": "noctalia-dev",
"repo": "noctalia-shell",
"rev": "298b2f5c794d4641cde21cf20422224bf8a60f99",
"rev": "95a67718ad756b9ec4fdc8ab336a461e89c60d5e",
"type": "github"
},
"original": {
@@ -60,8 +103,24 @@
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"noctalia": "noctalia"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@@ -16,9 +16,14 @@
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
# nixvim
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{self, nixpkgs, home-manager, ... }: let
outputs = inputs@{self, nixpkgs, home-manager, nixvim, ... }: let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
@@ -51,13 +56,19 @@
./hosts/neon/hardware-configuration.nix
# import noctalia shell configs
./hosts/neon/noctalia.nix
# Add home-manager form my user as a module
# import home-manager as a module
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aaron = import ./hosts/neon/home.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
# User specific inputs
home-manager.users.aaron = {
imports = [
nixvim.homeModules.nixvim
./hosts/neon/home.nix
];
};
}
];
};

View File

@@ -1,10 +1,32 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
# user config
home.username = "aaron";
home.homeDirectory = "/home/aaron";
# nixvim config
programs.nixvim = {
globals.mapleader = " ";
enable = true;
viAlias = false;
vimAlias = true;
opts = {
number = true;
relativenumber = true;
shiftwidth = 2;
tabstop = 2;
expandtab = true;
incsearch = true;
};
colorschemes.nord.enable = true;
plugins.lualine.enable = true;
plugins.nix.enable = true;
plugins.treesitter.enable = true;
plugins.telescope.enable = true;
plugins.web-devicons.enable = true;
};
# user packages
home.packages = with pkgs; [
discord
@@ -45,7 +67,7 @@
powerline-symbols
nerd-fonts.sauce-code-pro
];
# configure git
programs.git.settings = {
enable = true;
@@ -93,10 +115,8 @@
# enable syncthing for user
services.syncthing.enable = true;
# enable home manager
programs.home-manager.enable = true;
# don't change
home.stateVersion = "25.11";
}