diff --git a/config/default.nix b/config/default.nix index a2b89ad..08f8e69 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{...}: { # Import all your configuration modules here # imports = [./bufferline.nix]; imports = [ @@ -45,13 +44,13 @@ autoCmd = [ { - event = [ "BufEnter" ]; - pattern = [ "*" ]; + event = ["BufEnter"]; + pattern = ["*"]; command = "setlocal cursorline"; } { - event = [ "BufLeave" ]; - pattern = [ "*" ]; + event = ["BufLeave"]; + pattern = ["*"]; command = "setlocal nocursorline"; } ]; diff --git a/config/plugins/cmp.nix b/config/plugins/cmp.nix index ea7b08b..6073086 100644 --- a/config/plugins/cmp.nix +++ b/config/plugins/cmp.nix @@ -2,9 +2,7 @@ plugins.cmp = { enable = true; settings = { - completion = { - keyword_length = 2; - }; + completion = {keyword_length = 2;}; mapping = { "" = "cmp.mapping.select_next_item()"; @@ -24,12 +22,12 @@ ''; sources = [ - { name = "nvim_lsp"; } - { name = "buffer"; } - { name = "cmdline"; } - { name = "cmp-clippy"; } - { name = "luasnip"; } - { name = "path"; } + {name = "nvim_lsp";} + {name = "buffer";} + {name = "cmdline";} + {name = "cmp-clippy";} + {name = "luasnip";} + {name = "path";} ]; }; }; diff --git a/config/plugins/lsp.nix b/config/plugins/lsp.nix index 5781845..608b15f 100644 --- a/config/plugins/lsp.nix +++ b/config/plugins/lsp.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { plugins.lsp = { enable = true; @@ -75,7 +74,7 @@ # nix nixd = { enable = true; - settings.formatting.command = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ]; + settings.formatting.command = ["${pkgs.alejandra}/bin/alejandra"]; }; }; }; diff --git a/config/plugins/rhubarb.nix b/config/plugins/rhubarb.nix index 55029e0..2d72bb8 100644 --- a/config/plugins/rhubarb.nix +++ b/config/plugins/rhubarb.nix @@ -1,17 +1,16 @@ -{ pkgs, ... }: -{ - extraPlugins = with pkgs.vimPlugins; [ rhubarb ]; +{pkgs, ...}: { + extraPlugins = with pkgs.vimPlugins; [rhubarb]; keymaps = [ { action = "GBrowse"; key = "bro"; - mode = [ "n" ]; + mode = ["n"]; } { action = ":GBrowse"; key = "bro"; - mode = [ "v" ]; + mode = ["v"]; } ]; } diff --git a/config/plugins/telescope.nix b/config/plugins/telescope.nix index b23e558..eb9eed8 100644 --- a/config/plugins/telescope.nix +++ b/config/plugins/telescope.nix @@ -11,12 +11,8 @@ }; settings.defaults.mappings = { "i" = { - "" = { - __raw = "require('telescope.actions').cycle_history_next"; - }; - "" = { - __raw = "require('telescope.actions').cycle_history_prev"; - }; + "" = {__raw = "require('telescope.actions').cycle_history_next";}; + "" = {__raw = "require('telescope.actions').cycle_history_prev";}; }; }; }; diff --git a/config/plugins/vim-obsession.nix b/config/plugins/vim-obsession.nix index 58cf01f..115d5aa 100644 --- a/config/plugins/vim-obsession.nix +++ b/config/plugins/vim-obsession.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { extraPlugins = [ (pkgs.vimUtils.buildVimPlugin { name = "vim-obsession"; diff --git a/flake.lock b/flake.lock index 6298391..4d8a047 100644 --- a/flake.lock +++ b/flake.lock @@ -40,11 +40,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -109,11 +109,11 @@ ] }, "locked": { - "lastModified": 1734797603, - "narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -152,11 +152,11 @@ ] }, "locked": { - "lastModified": 1734862405, - "narHash": "sha256-bXZJvUMJ2A6sIpYcCUAGjYCD5UDzmpmQCdmJSkPhleU=", + "lastModified": 1731604581, + "narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", "owner": "nix-community", "repo": "home-manager", - "rev": "cb27edb5221d2f2920a03155f8becc502cf60e35", + "rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", "type": "github" }, "original": { @@ -201,11 +201,11 @@ ] }, "locked": { - "lastModified": 1733570843, - "narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=", + "lastModified": 1731642829, + "narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "a35b08d09efda83625bef267eb24347b446c80b8", + "rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a", "type": "github" }, "original": { @@ -216,11 +216,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735291276, - "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -232,23 +232,23 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", + "lastModified": 1730504152, + "narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" } }, "nixpkgs_2": { "locked": { - "lastModified": 1734649271, - "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "lastModified": 1731319897, + "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "rev": "dc460ec76cbff0e66e269457d7b728432263166c", "type": "github" }, "original": { @@ -271,11 +271,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1735343514, - "narHash": "sha256-CZGsEGSRN5PQnf3ciNFdlpCDorvyo6+YQ1cPQ1ebVxk=", + "lastModified": 1731780782, + "narHash": "sha256-CG3rcxcZEViYEUTAXatqXrW0Gn9tQvydF+lLYH+0VPA=", "owner": "nix-community", "repo": "nixvim", - "rev": "0307cdf297cd6bdafd55a66d69c54b55c482edf8", + "rev": "9d99d7cfdbd7f94da9571a4d7bbb9de185241935", "type": "github" }, "original": { @@ -294,11 +294,11 @@ ] }, "locked": { - "lastModified": 1733773348, - "narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=", + "lastModified": 1731582522, + "narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=", "owner": "NuschtOS", "repo": "search", - "rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9", + "rev": "13300b2297c51368e0892c3ebe220f688014fe15", "type": "github" }, "original": { @@ -337,11 +337,11 @@ ] }, "locked": { - "lastModified": 1734704479, - "narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=", + "lastModified": 1730321837, + "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f", + "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 96b69c9..cdfc0ef 100644 --- a/flake.nix +++ b/flake.nix @@ -7,13 +7,12 @@ flake-parts.url = "github:hercules-ci/flake-parts"; }; - outputs = - { - nixvim, - flake-parts, - ... - }@inputs: - flake-parts.lib.mkFlake { inherit inputs; } { + outputs = { + nixvim, + flake-parts, + ... + } @ inputs: + flake-parts.lib.mkFlake {inherit inputs;} { systems = [ "x86_64-linux" "aarch64-linux" @@ -21,36 +20,33 @@ "aarch64-darwin" ]; - 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; - }; - }; - nvim = nixvim'.makeNixvimWithModule nixvimModule; - 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; + 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; }; }; + nvim = nixvim'.makeNixvimWithModule nixvimModule; + 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; + }; + }; } // { hydraJobs = {