diff --git a/flake.nix b/flake.nix index 36632c1..a0ab89e 100644 --- a/flake.nix +++ b/flake.nix @@ -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 ]; }; }; diff --git a/lib/default.nix b/lib/default.nix index bb4a271..873f31b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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;}; } diff --git a/lib/hm-module.nix b/lib/hm-module.nix deleted file mode 100644 index 4648966..0000000 --- a/lib/hm-module.nix +++ /dev/null @@ -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]; - }; - } diff --git a/lib/types.nix b/lib/types.nix deleted file mode 100644 index 8625f18..0000000 --- a/lib/types.nix +++ /dev/null @@ -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; -} diff --git a/lib/types-dag.nix b/lib/types/dag.nix similarity index 100% rename from lib/types-dag.nix rename to lib/types/dag.nix diff --git a/lib/types/default.nix b/lib/types/default.nix new file mode 100644 index 0000000..fca45ba --- /dev/null +++ b/lib/types/default.nix @@ -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; +} diff --git a/lib/types-plugin.nix b/lib/types/plugins.nix similarity index 100% rename from lib/types-plugin.nix rename to lib/types/plugins.nix