more basic setup

This commit is contained in:
Osman Faruk Bayram 2024-12-14 02:30:55 +03:00
parent 950f27047d
commit b4eb1fed61
5 changed files with 121 additions and 76 deletions

View file

@ -1,6 +0,0 @@
{
plugins = {
# bufferline.enable = true;
# web-devicons.enable = true;
};
}

View file

@ -1,4 +1,9 @@
{ {
# Import all your configuration modules here options = {
imports = [ ./bufferline.nix ]; # Enable relative line numbers
number = true;
relativenumber = true;
};
} }

View file

@ -0,0 +1,3 @@
{
}

96
flake.lock generated
View file

@ -36,24 +36,6 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nixvim", "nixvim",
@ -214,39 +196,49 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": { "locked": {
"lastModified": 1733935885, "lastModified": 1729445390,
"narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=", "narHash": "sha256-TxJ7RZLlBkKWZos1ai3eWIH0fBq1G6SVE+q3dW+0qRU=",
"owner": "nixos", "owner": "Gerschtli",
"repo": "nixpkgs", "repo": "nix-formatter-pack",
"rev": "5a48e3c2e435e95103d56590188cfed7b70e108c", "rev": "9f4bcf647cad2edafda7e1143071e0daf37cbc41",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "Gerschtli",
"ref": "nixpkgs-unstable", "repo": "nix-formatter-pack",
"repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733096140, "lastModified": 1733940404,
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
"type": "tarball", "owner": "nixos",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" "repo": "nixpkgs",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
"type": "github"
}, },
"original": { "original": {
"type": "tarball", "owner": "nixos",
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
@ -270,6 +262,38 @@
"type": "github" "type": "github"
} }
}, },
"nmd": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -295,7 +319,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim" "nixvim": "nixvim"
} }

View file

@ -1,50 +1,69 @@
{ {
description = "A nixvim configuration"; description = "NixVim config heavily inspired by AstroNvim";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Nix formatting pack
# https://gerschtli.github.io/nix-formatter-pack/nix-formatter-pack-options.html
nix-formatter-pack = {
url = "github:Gerschtli/nix-formatter-pack";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-parts.url = "github:hercules-ci/flake-parts";
}; };
outputs = outputs =
{ nixvim, flake-parts, ... }@inputs: { nixpkgs
flake-parts.lib.mkFlake { inherit inputs; } { , nixvim
systems = [ , nix-formatter-pack
"x86_64-linux" , ...
"aarch64-linux" }:
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ pkgs, system, ... }:
let let
nixvimLib = nixvim.lib.${system}; forAllSystems = nixpkgs.lib.genAttrs [
nixvim' = nixvim.legacyPackages.${system}; "aarch64-linux"
nixvimModule = { "i686-linux"
inherit pkgs; "x86_64-linux"
module = import ./config; # import the module directly "aarch64-darwin"
# You can use `extraSpecialArgs` to pass additional arguments to your module files "x86_64-darwin"
extraSpecialArgs = { ];
# inherit (inputs) foo;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in in
{ {
checks = { formatter = forAllSystems (system:
# Run `nix flake check .` to verify that your config is not broken nix-formatter-pack.lib.mkFormatter {
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; pkgs = nixpkgs.legacyPackages.${system};
};
packages = { config.tools = {
# Lets you run `nix run .` to start nixvim deadnix.enable = true;
default = nvim; nixpkgs-fmt.enable = true;
}; statix.enable = true;
}; };
}
);
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
mkNixvim = specialArgs:
nixvim.legacyPackages.${system}.makeNixvimWithModule {
inherit pkgs;
module = ./config;
extraSpecialArgs = specialArgs // {
inherit pkgs;
};
};
in
{
default = mkNixvim { };
lite = mkNixvim { withLSP = false; };
}
);
}; };
} }