summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock129
-rw-r--r--flake.nix90
2 files changed, 144 insertions, 75 deletions
diff --git a/flake.lock b/flake.lock
index a95c1d5..f75cd04 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,6 +1,42 @@
{
"nodes": {
+ "devshell": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1713532798,
+ "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
"flake-compat": {
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "revCount": 57,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
+ }
+ },
+ "flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@@ -24,11 +60,11 @@
]
},
"locked": {
- "lastModified": 1706830856,
- "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
+ "lastModified": 1715865404,
+ "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
+ "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github"
},
"original": {
@@ -37,6 +73,21 @@
"type": "github"
}
},
+ "flake-root": {
+ "locked": {
+ "lastModified": 1713493429,
+ "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
+ "owner": "srid",
+ "repo": "flake-root",
+ "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
+ "type": "github"
+ },
+ "original": {
+ "owner": "srid",
+ "repo": "flake-root",
+ "type": "github"
+ }
+ },
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -64,11 +115,11 @@
]
},
"locked": {
- "lastModified": 1703887061,
- "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
- "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
@@ -85,11 +136,11 @@
]
},
"locked": {
- "lastModified": 1706955260,
- "narHash": "sha256-W3y0j77IDVbmbajudHoUr46RpswujUCl+D5Vru53UsI=",
+ "lastModified": 1716457508,
+ "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "880d9bc2110f7cae59698f715b8ca42cdc53670c",
+ "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"type": "github"
},
"original": {
@@ -106,11 +157,11 @@
]
},
"locked": {
- "lastModified": 1706833576,
- "narHash": "sha256-w7BL0EWRts+nD1lbLECIuz6fRzmmV+z8oWwoY7womR0=",
+ "lastModified": 1716511055,
+ "narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=",
"owner": "lnl7",
"repo": "nix-darwin",
- "rev": "bdbae6ecff8fcc322bf6b9053c0b984912378af7",
+ "rev": "0bea8222f6e83247dd13b055d83e64bce02ee532",
"type": "github"
},
"original": {
@@ -121,11 +172,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1707268954,
- "narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=",
+ "lastModified": 1716509168,
+ "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1",
+ "rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"type": "github"
},
"original": {
@@ -137,11 +188,11 @@
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1706732774,
- "narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=",
+ "lastModified": 1716509168,
+ "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d",
+ "rev": "bfb7a882678e518398ce9a31a881538679f6f092",
"type": "github"
},
"original": {
@@ -153,18 +204,22 @@
},
"nixvim": {
"inputs": {
+ "devshell": "devshell",
+ "flake-compat": "flake-compat",
"flake-parts": "flake-parts",
+ "flake-root": "flake-root",
"home-manager": "home-manager",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
- "pre-commit-hooks": "pre-commit-hooks"
+ "pre-commit-hooks": "pre-commit-hooks",
+ "treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1707474531,
- "narHash": "sha256-XoWqoTIdGpDYkHXTCmUNb7AxbBzDtpKmZIisnxt7nDQ=",
+ "lastModified": 1716717390,
+ "narHash": "sha256-Hd8ky86xAFDrUqNPPx0bO/1x6WUEyWNLrdTEVShAMb8=",
"owner": "nix-community",
"repo": "nixvim",
- "rev": "3bbb3d5453e69f868da7549d19bbdb5a2a49efb2",
+ "rev": "beb86eec7cad226d100d2841aae09fc2d4e152a8",
"type": "github"
},
"original": {
@@ -175,8 +230,7 @@
},
"pre-commit-hooks": {
"inputs": {
- "flake-compat": "flake-compat",
- "flake-utils": "flake-utils",
+ "flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@@ -188,11 +242,11 @@
]
},
"locked": {
- "lastModified": 1706424699,
- "narHash": "sha256-Q3RBuOpZNH2eFA1e+IHgZLAOqDD9SKhJ/sszrL8bQD4=",
+ "lastModified": 1716213921,
+ "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
- "rev": "7c54e08a689b53c8a1e5d70169f2ec9e2a68ffaf",
+ "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
"type": "github"
},
"original": {
@@ -221,6 +275,27 @@
"repo": "default",
"type": "github"
}
+ },
+ "treefmt-nix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1715940852,
+ "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "type": "github"
+ }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
index bca4e90..9b6f797 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,9 +5,9 @@
};
outputs = {
- self,
nixpkgs,
nixvim,
+ self,
}: let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
npkgs = nixvim.legacyPackages.x86_64-linux;
@@ -15,67 +15,61 @@
packages.x86_64-linux.default = npkgs.makeNixvimWithModule {
module = {
config = {
+ opts = {mouse = "";};
+ colorschemes.kanagawa = {
+ enable = true;
+ settings.transparent = true;
+ };
extraPackages = [
- pkgs.alejandra
- pkgs.black
- pkgs.cargo
- pkgs.cmake-format
pkgs.go
pkgs.rustfmt
- pkgs.shfmt
- pkgs.yamlfmt
];
- options = {mouse = "";};
- colorschemes.kanagawa = {
- enable = true;
- transparent = true;
- };
plugins = {
ledger.enable = true;
- lsp = {
+ lsp-format.enable = true;
+ vim-css-color.enable = true;
+ none-ls = {
enable = true;
- servers = {
- bashls.enable = true;
- nixd.enable = true;
- ruff-lsp.enable = true;
- gopls.enable = true;
+ sources = {
+ formatting = {
+ shfmt = {
+ enable = true;
+ withArgs = "{ extra_args = {'-i', '4', '-s'}}";
+ };
+ alejandra.enable = true;
+ };
};
};
- rustaceanvim.enable = true;
- conform-nvim = {
+ lsp = {
enable = true;
- formatAfterSave.lspFallback = false;
- formattersByFt = {
- cmake = ["cmake_format"];
- go = ["gofmt"];
- nix = ["alejandra"];
- python = ["black"];
- rust = ["rustfmt"];
- yaml = ["yamlfmt"];
- _ = ["shfmt"];
- };
- formatters.shfmt = {
- prepend_args = ["-i" "4" "-s"];
- };
- formatters.rustfmt = {
- prepend_args = ["--edition" "2021"];
+ servers = {
+ cmake.enable = true;
+ gopls.enable = true;
+ ruff.enable = true;
+ nixd.enable = true;
+ bashls.enable = true;
+ rust-analyzer = {
+ enable = true;
+ installCargo = true;
+ installRustc = true;
+ };
};
};
luasnip.enable = true;
- nvim-cmp = {
+ cmp = {
enable = true;
- snippet.expand = "luasnip";
- autoEnableSources = true;
- sources = [
- {name = "nvim_lsp";}
- {name = "path";}
- {name = "buffer";}
- ];
- mapping = {
- "<CR>" = "cmp.mapping.confirm({ select = true })";
- "<Tab>" = {
- action = ''
- cmp.mapping(function(fallback)
+ settings = {
+ autoEnableSources = true;
+ sources = [
+ {name = "nvim_lsp";}
+ {name = "path";}
+ {name = "buffer";}
+ {name = "luasnip";}
+ ];
+ mapping = {
+ "<CR>" = "cmp.mapping.confirm({ select = true })";
+ "<Tab>" = ''
+ cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item({
behavior = cmp.SelectBehavior.Select