feat: some neovim customizaion

This commit is contained in:
dprin 2026-03-28 18:26:22 +01:00
parent e2fab632ef
commit 39643701c8
10 changed files with 263 additions and 66 deletions

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }: {pkgs, ...}: {
{
boot.loader.grub = { boot.loader.grub = {
enable = true; enable = true;
device = "/dev/sda"; device = "/dev/sda";
@ -24,7 +22,6 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim
wget wget
]; ];
@ -41,10 +38,8 @@
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
}; };
}; };
home-manager.users.prever.home.stateVersion = "25.11"; home-manager.users.prever.home.stateVersion = "25.11";
system.stateVersion = "25.11"; system.stateVersion = "25.11";
} }

147
flake.lock generated
View file

@ -1,5 +1,44 @@
{ {
"nodes": { "nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -21,6 +60,34 @@
"type": "github" "type": "github"
} }
}, },
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1774388614, "lastModified": 1774388614,
@ -37,10 +104,88 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_2"
},
"locked": {
"lastModified": 1769049374,
"narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.11",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768249818,
"narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=",
"owner": "NuschtOS",
"repo": "search",
"rev": "b6f77b88e9009bfde28e2130e218e5123dc66796",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

View file

@ -8,15 +8,24 @@
url = "github:nix-community/home-manager/release-25.11"; url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim = {
url = "github:nix-community/nixvim/nixos-25.11";
# If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-<version>"`
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, home-manager, ... }: let outputs = {
system = "x86_64-linux"; nixpkgs,
pkgs = nixpkgs.legacyPackages.${system}; home-manager,
in { nixvim,
...
}: {
nixosConfigurations."prever" = nixpkgs.lib.nixosSystem { nixosConfigurations."prever" = nixpkgs.lib.nixosSystem {
modules = [ modules = [
home-manager.nixosModules.default home-manager.nixosModules.default
nixvim.nixosModules.nixvim
./hardware-configuration.nix ./hardware-configuration.nix
./configuration.nix ./configuration.nix

View file

@ -1,11 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = lib,
[ (modulesPath + "/profiles/qemu-guest.nix") modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
@ -13,13 +15,13 @@
boot.kernelModules = []; boot.kernelModules = [];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/7d06eddb-8692-4fff-8308-f860ca6aeb55"; device = "/dev/disk/by-uuid/7d06eddb-8692-4fff-8308-f860ca6aeb55";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/7aa0eb64-3587-4dce-9fc2-fcdc4a712abb"; } {device = "/dev/disk/by-uuid/7aa0eb64-3587-4dce-9fc2-fcdc4a712abb";}
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -1,8 +1,8 @@
{...}: {...}: {
{
imports = [ imports = [
./fish.nix ./fish.nix
./nginx.nix ./nginx.nix
./tmux.nix ./tmux.nix
./nvim.nix
]; ];
} }

View file

@ -30,4 +30,3 @@
}; };
}; };
} }

2
modules/minecraft.nix Normal file
View file

@ -0,0 +1,2 @@
{...}: {
}

View file

@ -1,5 +1,4 @@
{...}: {...}: {
{
services.nginx = { services.nginx = {
enable = true; enable = true;
user = "prever"; user = "prever";

43
modules/nvim.nix Normal file
View file

@ -0,0 +1,43 @@
{pkgs, ...}: {
programs.nixvim = {
enable = true;
globals.mapleader = " ";
opts = {
relativenumber = true;
};
colorschemes.ayu.enable = true;
autoCmd = [
{
event = "BufWritePre";
pattern = "*.nix";
callback = {
__raw = "function(args) require('conform').format({ bufnr = args.buf }) end";
};
}
];
plugins.nix.enable = true;
plugins.treesitter.enable = true;
plugins.lspconfig.enable = true;
plugins.blink-cmp.enable = true;
plugins.telescope.enable = true;
plugins.conform-nvim = {
enable = true;
settings = {
formatters_by_ft = {
nix = ["alejandra"];
};
};
};
lsp.servers.nil_ls.enable = true;
};
users.users.prever.packages = [
pkgs.alejandra
];
}

View file

@ -1,10 +1,13 @@
{...}: {pkgs, ...}: {
{ home-manager.users.prever = {
home-manager.users.perver = {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
newSession = true; newSession = true;
shell = "fish"; shell = "${pkgs.fish}/bin/fish";
plugins = with pkgs.tmuxPlugins; [
gruvbox
];
}; };
}; };
} }