Compare commits
4 Commits
b81735b885
...
958e91c836
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | 958e91c836 | |
Moritz Böhme | b87d7b387a | |
Moritz Böhme | fc4caeb1ec | |
Moritz Böhme | 19fd153a6d |
|
@ -13,4 +13,34 @@ lib.makeExtensible (self: rec {
|
||||||
rev = input.shortRev or "dirty";
|
rev = input.shortRev or "dirty";
|
||||||
in
|
in
|
||||||
"unstable-${date}_${rev}";
|
"unstable-${date}_${rev}";
|
||||||
|
|
||||||
|
mapModules = f: dir:
|
||||||
|
let
|
||||||
|
filter = name: type:
|
||||||
|
let
|
||||||
|
isPublic = !(lib.hasPrefix "_" name);
|
||||||
|
isSomething = type != null;
|
||||||
|
isModule =
|
||||||
|
let
|
||||||
|
path = "${toString dir}/${name}";
|
||||||
|
isDefault = type == "directory" && builtins.pathExists "${path}/default.nix";
|
||||||
|
isFile = type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix";
|
||||||
|
in
|
||||||
|
isDefault || isFile;
|
||||||
|
in
|
||||||
|
isPublic && isSomething && isModule;
|
||||||
|
|
||||||
|
mkModule = name: _:
|
||||||
|
let
|
||||||
|
path = "${toString dir}/${name}";
|
||||||
|
normalizedName =
|
||||||
|
if name == "default.nix"
|
||||||
|
then name
|
||||||
|
else lib.removeSuffix ".nix" name;
|
||||||
|
in
|
||||||
|
lib.nameValuePair normalizedName (f path);
|
||||||
|
in
|
||||||
|
lib.mapAttrs' mkModule (lib.filterAttrs filter (builtins.readDir dir));
|
||||||
|
|
||||||
|
mapModules' = f: dir: lib.attrValues (mapModules f dir);
|
||||||
})
|
})
|
||||||
|
|
|
@ -85,12 +85,12 @@ in
|
||||||
bezier = circ, 0.785, 0.135, 0.15, 0.86
|
bezier = circ, 0.785, 0.135, 0.15, 0.86
|
||||||
bezier = back, 0.68, -0.55, 0.265, 1.55
|
bezier = back, 0.68, -0.55, 0.265, 1.55
|
||||||
|
|
||||||
|
animation = windows, 1, 4, default, slide
|
||||||
animation = windows, 1, 3, circ
|
animation = windowsIn, 1, 4, circ, slide
|
||||||
animation = windowsOut, 1, 2, quint
|
animation = windowsOut, 1, 4, circ, slide
|
||||||
animation = border, 1, 2, sine
|
animation = border, 1, 2, sine
|
||||||
animation = fade, 1, 2, sine
|
animation = fade, 1, 4, sine
|
||||||
animation = workspaces, 1, 5, circ
|
animation = workspaces, 1, 5, circ, fade
|
||||||
}
|
}
|
||||||
|
|
||||||
dwindle {
|
dwindle {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config
|
{ config
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
, inputs
|
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -9,12 +8,18 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.nvim;
|
cfg = config.my.programs.nvim;
|
||||||
|
|
||||||
mkPlugin = name: {
|
mkPlugin = fileName:
|
||||||
plugin = pkgs.vimPlugins.${name};
|
let
|
||||||
|
path = ./plugins + "/${fileName}";
|
||||||
|
pluginName = lib.removeSuffix ".lua" fileName;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
plugin = pkgs.vimPlugins.${pluginName};
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = lib.readFile (./plugins + "/${name}.lua");
|
config = lib.readFile path;
|
||||||
};
|
};
|
||||||
|
pluginFileNames = builtins.attrNames (builtins.readDir ./plugins);
|
||||||
|
pluginsWithConfig = builtins.map mkPlugin pluginFileNames;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.nvim.enable = mkEnableOption "nvim";
|
options.my.programs.nvim.enable = mkEnableOption "nvim";
|
||||||
|
@ -51,29 +56,7 @@ in
|
||||||
taplo
|
taplo
|
||||||
yamlfmt
|
yamlfmt
|
||||||
];
|
];
|
||||||
plugins = builtins.map mkPlugin [
|
plugins = with pkgs.vimPlugins; [
|
||||||
"catppuccin-nvim"
|
|
||||||
"comment-nvim"
|
|
||||||
"copilot-lua"
|
|
||||||
"dashboard-nvim"
|
|
||||||
"formatter-nvim"
|
|
||||||
"gitsigns-nvim"
|
|
||||||
"lualine-nvim"
|
|
||||||
"noice-nvim"
|
|
||||||
"nvim-autopairs"
|
|
||||||
"nvim-lastplace"
|
|
||||||
"nvim-surround"
|
|
||||||
"nvim-tree-lua"
|
|
||||||
"nvim-treesitter-textsubjects"
|
|
||||||
"nvim-ts-context-commentstring"
|
|
||||||
"orgmode"
|
|
||||||
"smartcolumn-nvim"
|
|
||||||
"telescope-fzf-native-nvim"
|
|
||||||
"telescope-nvim"
|
|
||||||
"telescope-zoxide"
|
|
||||||
"which-key-nvim"
|
|
||||||
"todo-comments-nvim"
|
|
||||||
] ++ (with pkgs.vimPlugins; [
|
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
copilot-cmp
|
copilot-cmp
|
||||||
|
@ -84,17 +67,17 @@ in
|
||||||
lspsaga-nvim-original
|
lspsaga-nvim-original
|
||||||
lualine-lsp-progress
|
lualine-lsp-progress
|
||||||
luasnip
|
luasnip
|
||||||
nui-nvim # for noice-nvim
|
nui-nvim
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-ufo
|
nvim-ufo
|
||||||
nvim-web-devicons # for dashboard-nvim
|
nvim-web-devicons
|
||||||
plenary-nvim # for telescope, neogit
|
plenary-nvim
|
||||||
popup-nvim
|
popup-nvim
|
||||||
promise-async
|
promise-async
|
||||||
vim-lion
|
vim-lion
|
||||||
]);
|
] ++ pluginsWithConfig;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{ inputs, lib }:
|
{ inputs, lib }:
|
||||||
|
|
||||||
lib.composeManyExtensions [
|
lib.composeManyExtensions
|
||||||
(import ./channels.nix { inherit inputs lib; })
|
(lib.my.mapModules' (file: import file { inherit inputs lib; }) ./.)
|
||||||
(import ./packages.nix { inherit inputs lib; })
|
|
||||||
(import ./vimPlugins.nix { inherit inputs lib; })
|
|
||||||
(import ./wayland.nix { inherit inputs lib; })
|
|
||||||
(import ./lib.nix { inherit inputs lib; })
|
|
||||||
]
|
|
||||||
|
|
Loading…
Reference in New Issue