clean up lib

This commit is contained in:
NotAShelf 2023-03-31 17:42:15 +03:00
parent 89c0cc0373
commit c97a621b71
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
7 changed files with 12 additions and 55 deletions

View file

@ -33,7 +33,9 @@
};
nixosModules.default = {
home-manager.sharedModules = [./lib/hm-module.nix];
home-manager.sharedModules = [
./lib/module
];
nixpkgs.overlays = [
inputs.tidalcycles.overlays.default
inputs.self.overlays.default
@ -42,7 +44,7 @@
homeManagerModules.default = {
imports = [
./lib/hm-module.nix
./lib/module
];
};
};

View file

@ -1,5 +1,5 @@
{lib}: {
dag = import ./dag.nix {inherit lib;};
booleans = import ./booleans.nix {inherit lib;};
types = import ./types.nix {inherit lib;};
types = import ./types {inherit lib;};
}

View file

@ -1,45 +0,0 @@
# Home Manager module
{
self,
config,
pkgs,
lib ? pkgs.lib,
...
}: let
cfg = config.programs.neovim-flake;
set = self.packages.neovim-maximal {mainConfig = cfg.settings;};
in
with lib; {
meta.maintainers = [maintainers.notashelf];
options.programs.neovim-flake = {
enable = mkEnableOption "A NeoVim IDE with a focus on configurability and extensibility.";
settings = mkOption {
type = types.attrsOf types.anything;
default = {};
example = literalExpression ''
{
vim.viAlias = false;
vim.vimAlias = true;
vim.lsp = {
enable = true;
formatOnSave = true;
lightbulb.enable = true;
lspsaga.enable = false;
nvimCodeActionMenu.enable = true;
trouble.enable = true;
lspSignature.enable = true;
rust.enable = false;
nix = true;
};
}
'';
description = "Attribute set of neoflake preferences.";
};
};
config = mkIf cfg.enable {
home.packages = [set.neovim];
};
}

View file

@ -1,7 +0,0 @@
{lib}: let
typesDag = import ./types-dag.nix {inherit lib;};
typesPlugin = import ./types-plugin.nix {inherit lib;};
in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt;
}

7
lib/types/default.nix Normal file
View file

@ -0,0 +1,7 @@
{lib}: let
typesDag = import ./dag.nix {inherit lib;};
typesPlugin = import ./plugins.nix {inherit lib;};
in {
inherit (typesDag) dagOf;
inherit (typesPlugin) pluginsOpt;
}