feat: some neovim customizaion
This commit is contained in:
parent
e2fab632ef
commit
39643701c8
10 changed files with 263 additions and 66 deletions
|
|
@ -1,6 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
|
|
@ -16,7 +14,7 @@
|
|||
|
||||
users.users.prever = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
extraGroups = ["wheel"];
|
||||
packages = with pkgs; [
|
||||
git
|
||||
tree
|
||||
|
|
@ -24,27 +22,24 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
wget
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
|
||||
networking.firewall.allowedTCPPorts = [22 80 443];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
|
||||
nix = {
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
optimise.automatic = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home-manager.users.prever.home.stateVersion = "25.11";
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
|
|
|
|||
147
flake.lock
generated
147
flake.lock
generated
|
|
@ -1,5 +1,44 @@
|
|||
{
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -21,6 +60,34 @@
|
|||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1774388614,
|
||||
|
|
@ -37,10 +104,88 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
17
flake.nix
17
flake.nix
|
|
@ -8,15 +8,24 @@
|
|||
url = "github:nix-community/home-manager/release-25.11";
|
||||
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
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nixvim,
|
||||
...
|
||||
}: {
|
||||
nixosConfigurations."prever" = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
home-manager.nixosModules.default
|
||||
nixvim.nixosModules.nixvim
|
||||
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
|
|
|||
|
|
@ -1,25 +1,27 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7d06eddb-8692-4fff-8308-f860ca6aeb55";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/7d06eddb-8692-4fff-8308-f860ca6aeb55";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/7aa0eb64-3587-4dce-9fc2-fcdc4a712abb"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/7aa0eb64-3587-4dce-9fc2-fcdc4a712abb";}
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{...}:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./fish.nix
|
||||
./nginx.nix
|
||||
./tmux.nix
|
||||
./nvim.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,4 +30,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
2
modules/minecraft.nix
Normal file
2
modules/minecraft.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{...}: {
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
{...}:
|
||||
{
|
||||
{...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
user = "prever";
|
||||
|
|
|
|||
43
modules/nvim.nix
Normal file
43
modules/nvim.nix
Normal 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
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +1,13 @@
|
|||
{...}:
|
||||
{
|
||||
home-manager.users.perver = {
|
||||
{pkgs, ...}: {
|
||||
home-manager.users.prever = {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
newSession = true;
|
||||
shell = "fish";
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
gruvbox
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue