create packages for overlays

This commit is contained in:
Ivan Kirilov Dimitrov 2024-07-05 22:07:52 +02:00
parent ffceb60bb8
commit a1ed6a69fa
No known key found for this signature in database
GPG Key ID: 0BDAD4B211C49294

View File

@ -2,19 +2,34 @@ top@{ inputs, ... }: {
imports = [ ./nixos ./home ]; imports = [ ./nixos ./home ];
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
flake.stateVersion = "24.05"; flake.stateVersion = "24.05";
perSystem = perSystem@{ system, ... }: { perSystem = perSystem@{ config, system, pkgs, ... }: {
config.packages = {
nvim = inputs.ide.nvim.${system}.standalone.default {
autoCmd = [
{
callback.__raw = /*lua*/ ''
function() require("otter").activate() end
'';
event = [ "BufEnter" "BufWinEnter" "BufWritePost" ];
pattern = [ "*.nix" ];
}
];
plugins.lsp.servers = {
bashls.enable = true;
pylsp.enable = true;
lua-ls.enable = true;
};
extraPlugins = with pkgs.vimPlugins; [ otter-nvim ];
};
scripts = (pkgs.buildEnv { name = "scripts"; paths = [ ./. ]; });
};
config._module.args = { config._module.args = {
pkgs = import inputs.nixpkgs { pkgs = import inputs.nixpkgs {
inherit system; inherit system;
overlays = [ overlays = [
(final: prev: { (final: prev: {
nvim = inputs.ide.nvim.${system}.standalone.default { nvim = config.packages.nvim;
plugins.lsp.servers = { scripts = config.packages.scripts;
bashls.enable = true;
nushell.enable = true;
};
};
scripts = (prev.buildEnv { name = "scripts"; paths = [ ./. ]; });
}) })
inputs.sal.overlays.default inputs.sal.overlays.default
]; ];