diff --git a/config/bufferline.nix b/config/bufferline.nix deleted file mode 100644 index 8473f6a..0000000 --- a/config/bufferline.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - plugins = { - # bufferline.enable = true; - # web-devicons.enable = true; - }; -} diff --git a/config/default.nix b/config/default.nix index fb318ab..a92b6dd 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,4 +1,9 @@ { - # Import all your configuration modules here - imports = [ ./bufferline.nix ]; + options = { + # Enable relative line numbers + number = true; + relativenumber = true; + + + }; } diff --git a/config/plugins/default.nix b/config/plugins/default.nix new file mode 100644 index 0000000..0e0dcd2 --- /dev/null +++ b/config/plugins/default.nix @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/flake.lock b/flake.lock index a988c99..9fd605b 100644 --- a/flake.lock +++ b/flake.lock @@ -36,24 +36,6 @@ } }, "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": { "nixpkgs-lib": [ "nixvim", @@ -214,39 +196,49 @@ "type": "github" } }, - "nixpkgs": { + "nix-formatter-pack": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "nmd": "nmd", + "nmt": "nmt" + }, "locked": { - "lastModified": 1733935885, - "narHash": "sha256-xyiHLs6KJ1fxeGmcCxKjJE4yJknVJxbC8Y/ZRYyC8WE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5a48e3c2e435e95103d56590188cfed7b70e108c", + "lastModified": 1729445390, + "narHash": "sha256-TxJ7RZLlBkKWZos1ai3eWIH0fBq1G6SVE+q3dW+0qRU=", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "rev": "9f4bcf647cad2edafda7e1143071e0daf37cbc41", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", "type": "github" } }, - "nixpkgs-lib": { + "nixpkgs": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "lastModified": 1733940404, + "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixvim": { "inputs": { "devshell": "devshell", "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", "git-hooks": "git-hooks", "home-manager": "home-manager", "nix-darwin": "nix-darwin", @@ -270,6 +262,38 @@ "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": { "inputs": { "flake-utils": "flake-utils", @@ -295,7 +319,7 @@ }, "root": { "inputs": { - "flake-parts": "flake-parts", + "nix-formatter-pack": "nix-formatter-pack", "nixpkgs": "nixpkgs", "nixvim": "nixvim" } diff --git a/flake.nix b/flake.nix index c6ac067..6cf00b2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,50 +1,69 @@ { - description = "A nixvim configuration"; + description = "NixVim config heavily inspired by AstroNvim"; 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 = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-parts.url = "github:hercules-ci/flake-parts"; }; outputs = - { nixvim, flake-parts, ... }@inputs: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ - "x86_64-linux" + { nixpkgs + , nixvim + , nix-formatter-pack + , ... + }: + let + forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-linux" - "x86_64-darwin" + "i686-linux" + "x86_64-linux" "aarch64-darwin" + "x86_64-darwin" ]; + in + { + formatter = forAllSystems (system: + nix-formatter-pack.lib.mkFormatter { + pkgs = nixpkgs.legacyPackages.${system}; - perSystem = - { pkgs, system, ... }: - let - nixvimLib = nixvim.lib.${system}; - nixvim' = nixvim.legacyPackages.${system}; - nixvimModule = { - inherit pkgs; - module = import ./config; # import the module directly - # You can use `extraSpecialArgs` to pass additional arguments to your module files - extraSpecialArgs = { - # inherit (inputs) foo; - }; + config.tools = { + deadnix.enable = true; + nixpkgs-fmt.enable = true; + statix.enable = true; }; - nvim = nixvim'.makeNixvimWithModule nixvimModule; + } + ); + + packages = forAllSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + mkNixvim = specialArgs: + nixvim.legacyPackages.${system}.makeNixvimWithModule { + inherit pkgs; + + module = ./config; + + extraSpecialArgs = specialArgs // { + inherit pkgs; + + }; + }; in { - checks = { - # Run `nix flake check .` to verify that your config is not broken - default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; - }; - - packages = { - # Lets you run `nix run .` to start nixvim - default = nvim; - }; - }; + default = mkNixvim { }; + lite = mkNixvim { withLSP = false; }; + } + ); }; -} +} \ No newline at end of file